Skip to content

Commit

Permalink
test fetching by output name
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiq committed May 10, 2024
1 parent bfebbbb commit e551f23
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/BasicForParticleSystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@
cutoff=cutoff,
unitcell=sides,
output=0.0,
output_name=:gravitational_potential
)
naive = CellListMap.map_naive!((x, y, i, j, d2, u) -> potential(i, j, d2, u, mass), 0.0, x, y, Box(sides, cutoff))
system.parallel = false
@test map_pairwise!((x, y, i, j, d2, u) -> potential(i, j, d2, u, mass), system) naive
system.parallel = true
@test map_pairwise!((x, y, i, j, d2, u) -> potential(i, j, d2, u, mass), system) naive
# Test fetching by output name
@test system.gravitational_potential naive

# Same but for non-periodic systems
system = ParticleSystem(
Expand Down

0 comments on commit e551f23

Please sign in to comment.