walberla::mesa_pd::data::LinkedCells Struct Reference

#include <LinkedCells.h>

Public Member Functions

 LinkedCells (const math::AABB &domain, const real_t cellDiameter)
 
 LinkedCells (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_ {}
 
Vector3< int > numCellsPerDim_ {}
 
Vec3 cellDiameter_ {}
 
Vec3 invCellDiameter_ {}
 
std::atomic< int > infiniteParticles_ {}
 
std::vector< std::atomic< int > > cells_ {}
 

Constructor & Destructor Documentation

◆ LinkedCells() [1/2]

walberla::mesa_pd::data::LinkedCells::LinkedCells ( const math::AABB domain,
const real_t  cellDiameter 
)
inline

◆ LinkedCells() [2/2]

walberla::mesa_pd::data::LinkedCells::LinkedCells ( const math::AABB domain,
const Vec3 cellDiameter 
)
inline

Member Function Documentation

◆ clear()

void walberla::mesa_pd::data::LinkedCells::clear ( )

◆ forEachParticlePair()

template<typename Selector , typename Accessor , typename Func , typename... Args>
void walberla::mesa_pd::data::LinkedCells::forEachParticlePair ( const bool  openmp,
const Selector &  selector,
Accessor &  acForLC,
Func &&  func,
Args &&...  args 
) const
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

func( *this, i, j, std::forward<Args>(args)... );
Parameters
openmpenables/disables OpenMP parallelization of the kernel call

< current cell index

< current particle index

< particle to be checked against

< neighbor particle index

< neighbor cell index

< neighbor particle index

< neighbor particle index

◆ forEachParticlePairHalf()

template<typename Selector , typename Accessor , typename Func , typename... Args>
void walberla::mesa_pd::data::LinkedCells::forEachParticlePairHalf ( const bool  openmp,
const Selector &  selector,
Accessor &  acForLC,
Func &&  func,
Args &&...  args 
) const
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

func( *this, i, j, std::forward<Args>(args)... );
Parameters
openmpenables/disables OpenMP parallelization of the kernel call

< current cell index

< current particle index

< particle to be checked against

< neighbor particle index

< neighbor cell index

< neighbor particle index

< neighbor particle index

Member Data Documentation

◆ cellDiameter_

Vec3 walberla::mesa_pd::data::LinkedCells::cellDiameter_ {}

◆ cells_

std::vector< std::atomic<int> > walberla::mesa_pd::data::LinkedCells::cells_ {}

◆ domain_

math::AABB walberla::mesa_pd::data::LinkedCells::domain_ {}

◆ infiniteParticles_

std::atomic<int> walberla::mesa_pd::data::LinkedCells::infiniteParticles_ {}

◆ invCellDiameter_

Vec3 walberla::mesa_pd::data::LinkedCells::invCellDiameter_ {}

◆ numCellsPerDim_

Vector3<int> walberla::mesa_pd::data::LinkedCells::numCellsPerDim_ {}

The documentation for this struct was generated from the following file: