Skip to content

Initializing a template NHS doesn't throw an error #123

@efaulhaber

Description

@efaulhaber
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions