#include <SparseLinkedCells.h>
Public Member Functions | |
SparseLinkedCells (const math::AABB &domain, const real_t cellDiameter) | |
SparseLinkedCells (const math::AABB &domain, const Vec3 &cellDiameter) | |
void | clear () |
template<typename Selector , typename Accessor , typename Func , typename... Args> | |
void | forEachParticlePair (const bool openmp, const Selector &selector, Accessor &acForLC, Func &&func, Args &&... args) const |
Calls the provided functor func for all particle pairs. More... | |
template<typename Selector , typename Accessor , typename Func , typename... Args> | |
void | forEachParticlePairHalf (const bool openmp, const Selector &selector, Accessor &acForLC, Func &&func, Args &&... args) const |
Calls the provided functor func for all particle pairs. More... | |
Public Attributes | |
math::AABB | domain_ {} |
local domain covered by this data structure More... | |
Vector3< int > | numCellsPerDim_ {} |
number of linked cells per dimension More... | |
Vec3 | cellDiameter_ {} |
Vec3 | invCellDiameter_ {} |
std::atomic< int > | infiniteParticles_ {} |
data structure for particles to large for the cells More... | |
std::vector< std::atomic< int > > | cells_ {} |
actual cell data structure More... | |
std::vector< size_t > | nonEmptyCells_ {} |
list of cells containing particles More... | |
|
inline |
|
inline |
void walberla::mesa_pd::data::SparseLinkedCells::clear | ( | ) |
|
inline |
Calls the provided functor func
for all particle pairs.
Additional arguments can be provided. No pairs with twice the same particle. Call syntax for the provided functor
openmp | enables/disables OpenMP parallelization of the kernel call |
< current particle index
< particle to be checked against
< neighbor particle index
< neighbor particle index
< neighbor cell index
< current particle index
< neighbor particle index
|
inline |
Calls the provided functor func
for all particle pairs.
Additional arguments can be provided. No pairs with twice the same particle are generated. No pair is called twice! Call syntax for the provided functor
openmp | enables/disables OpenMP parallelization of the kernel call |
< current particle index
< particle to be checked against
< neighbor particle index
< neighbor particle index
< neighbor cell index
< current particle index
< neighbor particle index
Vec3 walberla::mesa_pd::data::SparseLinkedCells::cellDiameter_ {} |
std::vector< std::atomic<int> > walberla::mesa_pd::data::SparseLinkedCells::cells_ {} |
actual cell data structure
math::AABB walberla::mesa_pd::data::SparseLinkedCells::domain_ {} |
local domain covered by this data structure
std::atomic<int> walberla::mesa_pd::data::SparseLinkedCells::infiniteParticles_ {} |
data structure for particles to large for the cells
Vec3 walberla::mesa_pd::data::SparseLinkedCells::invCellDiameter_ {} |
std::vector<size_t> walberla::mesa_pd::data::SparseLinkedCells::nonEmptyCells_ {} |
list of cells containing particles
Vector3<int> walberla::mesa_pd::data::SparseLinkedCells::numCellsPerDim_ {} |
number of linked cells per dimension