Skip to content

num::verlet_list_2d

Defined in header <spatial/verlet_list.hpp>

template <field scalar>
class verlet_list_2d;

List of each particle's neighbours within \(r_c + r_s\), in 2D (Verlet list). Valid until a particle moves \(r_s / 2\).

Members

member description
verlet_list_2d(scalar cutoff, scalar skin) Construct an empty list with cutoff \(r_c\) and skin \(r_s\).
template <position_accessor_2d<scalar> PosAccessor> void build(PosAccessor &&get_pos, int n, const cell_list_2d<scalar> &cl) Build the list again from a cell list.
template <position_accessor_2d<scalar> PosAccessor> bool needs_rebuild(PosAccessor &&get_pos, int n) const Test whether a particle has moved more than \(r_s / 2\) since the last build.
integer_range neighbors(int i) const noexcept Return the neighbours of particle i.
scalar cutoff() const noexcept Return the cutoff \(r_c\).
scalar skin() const noexcept Return the skin \(r_s\).
scalar ext_cutoff() const noexcept Return the extended cutoff \(r_c + r_s\).
int n_particles() const noexcept