24#ifndef HEMO_PARTICLEGRID_H
25#define HEMO_PARTICLEGRID_H
42 return plint(std::floor(x + 0.5));
77 void build(
const std::vector<HemoCellParticle> & particles,
const plb::Dot3D & location,
plint nx,
plint ny,
Cell list that bins the particles of one atomic block onto its lattice nodes.
Definition particleGrid.h:67
std::vector< unsigned int > particleIndices
particle indices, grouped per node
Definition particleGrid.h:95
std::vector< unsigned int > nodeStart
nx*ny*nz+1 offsets into particleIndices
Definition particleGrid.h:94
plint nx
Definition particleGrid.h:93
const unsigned int * begin(unsigned int node) const
First particle index of node node (see class description).
Definition particleGrid.h:83
plint nz
Definition particleGrid.h:93
unsigned int count(unsigned int node) const
Number of particles binned in node node.
Definition particleGrid.h:87
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.
Definition particleGrid.h:81
std::vector< unsigned int > nodeOfParticle
scratch: node of each particle (or sentinel)
Definition particleGrid.h:96
plint getNz() const
Definition particleGrid.h:90
plint ny
Definition particleGrid.h:93
void build(const std::vector< HemoCellParticle > &particles, const plb::Dot3D &location, plint nx, plint ny, plint nz)
(Re)build the grid.
Definition particleGrid.cpp:30
const unsigned int * end(unsigned int node) const
One past the last particle index of node node.
Definition particleGrid.h:85
plint getNx() const
Definition particleGrid.h:88
plint getNy() const
Definition particleGrid.h:89
double T
Definition constant_defaults.h:137
long int plint
Definition constant_defaults.h:149
void computePairRepulsion(std::vector< HemoCellParticle > &particles, const ParticleGrid &grid, const T r_const, const T r_cutoff)
Accumulate the pairwise inter-cell repulsion force into sv.force_repulsion of all binned particles.
Definition particleGrid.cpp:116
plint nearestNode(T x)
The lattice node nearest to a coordinate [lattice units].
Definition particleGrid.h:41