|
numerics
|
#include <verlet_list.hpp>
Public Member Functions | |
| VerletList2D (Scalar cutoff, Scalar skin) | |
| template<typename PosAccessor > | |
| void | build (PosAccessor &&get_pos, int n, const CellList2D< Scalar > &cl) |
| Build the neighbour list using a pre-built CellList2D. | |
| template<typename PosAccessor > | |
| bool | needs_rebuild (PosAccessor &&get_pos, int n) const |
| Check whether any particle has moved far enough to invalidate the cached list. O(n), very cheap (just arithmetic, no memory allocation). | |
| IntRange | neighbors (int i) const noexcept |
| Cached neighbours of particle i (within cutoff + skin). | |
| Scalar | cutoff () const noexcept |
| Scalar | skin () const noexcept |
| Scalar | ext_cutoff () const noexcept |
| int | n_particles () const noexcept |
Definition at line 49 of file verlet_list.hpp.
|
inline |
| cutoff | Interaction cutoff (e.g. 2h for SPH). |
| skin | Skin thickness added to cutoff for the cached list. Larger skin -> fewer rebuilds but more cache entries. Typical: 0.3*cutoff (molecular dynamics) or 0.5*cutoff (SPH, faster particle motion). |
Definition at line 56 of file verlet_list.hpp.
|
inline |
Build the neighbour list using a pre-built CellList2D.
The cell list must have been built with cell_size >= cutoff + skin so that a single 3x3 query covers the full extended cutoff.
PosAccessor: callable int -> std::pair<Scalar, Scalar>
Definition at line 68 of file verlet_list.hpp.
References num::ipow().
|
inlinenoexcept |
Definition at line 119 of file verlet_list.hpp.
|
inlinenoexcept |
Definition at line 121 of file verlet_list.hpp.
|
inlinenoexcept |
Definition at line 122 of file verlet_list.hpp.
|
inline |
Check whether any particle has moved far enough to invalidate the cached list. O(n), very cheap (just arithmetic, no memory allocation).
Returns true if the cell list and Verlet list must be rebuilt before the next force evaluation.
Definition at line 99 of file verlet_list.hpp.
References num::ipow().
|
inlinenoexcept |
Cached neighbours of particle i (within cutoff + skin).
Caller should still distance-filter to the true cutoff.
Definition at line 114 of file verlet_list.hpp.
References num::ipow().
|
inlinenoexcept |
Definition at line 120 of file verlet_list.hpp.