Skip to content

num::cell_list_3d

Defined in header <spatial/cell_list_3d.hpp>

template <field scalar>
class cell_list_3d;

Counting-sorted 3D spatial bins for local-neighbor iteration.

Members

member description
cell_list_3d(scalar cell_size, scalar xmin, scalar xmax, scalar ymin, scalar ymax, scalar zmin, scalar zmax) Cover the bounding box with padded cubic cells.
template <position_accessor_2d<scalar> PosAccessor> void build(PosAccessor &&get_pos, int n) Rebuild by counting-sort over cell ids.
template <typename F> void query(scalar px, scalar py, scalar pz, F &&f) const Call f(j) for candidate particles near (px, py, pz).
template <typename F> void iterate_pairs(F &&f) const Visit each candidate pair once.
int nx() const noexcept Return cell-grid dimensions and stored particle count.
int ny() const noexcept
int nz() const noexcept
int n_particles() const noexcept