Cell list that bins the particles of one atomic block onto its lattice nodes.
More...
|
| void | build (const std::vector< HemoCellParticle > &particles, const plb::Dot3D &location, plint nx, plint ny, plint nz) |
| | (Re)build the grid.
|
| |
| unsigned int | index (plint x, plint y, plint z) const |
| | Linear index of block-local node (x,y,z); the caller guarantees it is inside the grid.
|
| |
| const unsigned int * | begin (unsigned int node) const |
| | First particle index of node node (see class description).
|
| |
| const unsigned int * | end (unsigned int node) const |
| | One past the last particle index of node node.
|
| |
| unsigned int | count (unsigned int node) const |
| | Number of particles binned in node node.
|
| |
| plint | getNx () const |
| |
| plint | getNy () const |
| |
| plint | getNz () const |
| |
Cell list that bins the particles of one atomic block onto its lattice nodes.
Used for short-range neighbour searches (particle-particle repulsion, particle-wall repulsion, solidification). Each particle is assigned to the nearest node, nearestNode(position - location), per axis. Particles whose node falls outside [0,nx) x [0,ny) x [0,nz) are not binned.
Storage is compressed (CSR-like): nodeStart holds nx*ny*nz+1 offsets into particleIndices, so the particles of node n are particleIndices[nodeStart[n] .. nodeStart[n+1]). Unlike the previous fixed-capacity grid there is no limit on the number of particles per node, and no capacity checks are needed while filling it. Within a node, particle indices are stored in ascending order.
The stored indices refer to the particle vector passed to build(). Any insertion, removal or reordering of that vector, and any change of particle positions, invalidates the grid; the owner must rebuild it before use.
Not thread safe; one instance per atomic block.