Skip to content

Commit 7b56e96

Browse files
committed
Add neighbor lists NHS to tests
1 parent 0260b60 commit 7b56e96

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test/neighborhood_search.jl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,14 @@
9090
]
9191

9292
seeds = [1, 2]
93-
@testset verbose=true "$(length(cloud_size))D with $(prod(cloud_size)) Particles ($(seed == 1 ? "`initialize!`" : "`update!`"))" for cloud_size in cloud_sizes,
94-
seed in seeds
93+
name(size, seed) = "$(length(size))D with $(prod(size)) Particles " *
94+
"($(seed == 1 ? "`initialize!`" : "`update!`"))"
95+
@testset verbose=true "$(name(cloud_size, seed)))" for cloud_size in cloud_sizes,
96+
seed in seeds
9597

9698
coords = point_cloud(cloud_size, seed = seed)
9799
NDIMS = length(cloud_size)
100+
n_particles = size(coords, 2)
98101
search_radius = 2.5
99102

100103
# Use different coordinates for `initialize!` and then `update!` with the
@@ -114,11 +117,13 @@
114117
end
115118

116119
neighborhood_searches = [
117-
GridNeighborhoodSearch{NDIMS}(search_radius, size(coords, 2)),
120+
GridNeighborhoodSearch{NDIMS}(search_radius, n_particles),
121+
NeighborListsNeighborhoodSearch{NDIMS}(search_radius, n_particles),
118122
]
119123

120124
neighborhood_searches_names = [
121125
"`GridNeighborhoodSearch`",
126+
"`NeighborListsNeighborhoodSearch`",
122127
]
123128

124129
@testset "$(neighborhood_searches_names[i])" for i in eachindex(neighborhood_searches_names)

0 commit comments

Comments
 (0)