Skip to content

Commit e3dd7b3

Browse files
committed
Extract search radius
1 parent 8e42045 commit e3dd7b3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/neighborhood_search.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,15 @@
9191

9292
coords = point_cloud(cloud_size, seed = seed)
9393
NDIMS = length(cloud_size)
94+
search_radius = 2.5
9495

9596
# Use different coordinates for `initialize!` and then `update!` with the
9697
# correct coordinates to make sure that `update!` is working as well.
9798
coords_initialize = point_cloud(cloud_size, seed = 1)
9899

99100
# Compute expected neighbor lists by brute-force looping over all particles
100101
# as potential neighbors (`TrivialNeighborhoodSearch`).
101-
trivial_nhs = TrivialNeighborhoodSearch{NDIMS}(2.5, axes(coords, 2))
102+
trivial_nhs = TrivialNeighborhoodSearch{NDIMS}(search_radius, axes(coords, 2))
102103

103104
neighbors_expected = [Int[] for _ in axes(coords, 2)]
104105

@@ -109,7 +110,7 @@
109110
end
110111

111112
neighborhood_searches = [
112-
GridNeighborhoodSearch{NDIMS}(2.5, size(coords, 2)),
113+
GridNeighborhoodSearch{NDIMS}(search_radius, size(coords, 2)),
113114
]
114115

115116
neighborhood_searches_names = [

0 commit comments

Comments
 (0)