using PointNeighbors
nhs = GridNeighborhoodSearch{3}()
# Initialize the NHS to find neighbors in x of particles in x
initialize!(nhs, x, x)
# Simple example: just count the neighbors of each particle
n_neighbors = zeros(Int, 1000);
foreach_point_neighbor(x, x, nhs) do i, j, pos_diff, distance
n_neighbors[i] += 1
end
When no search_radius is specified, this example just runs and doesn't find any neighbors.