waLBerla 7.2
Loading...
Searching...
No Matches
walberla::mesa_pd::data::SparseLinkedCells Struct Reference

#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.
 
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.
 

Public Attributes

math::AABB domain_ {}
 local domain covered by this data structure
 
Vector3< int > numCellsPerDim_ {}
 number of linked cells per dimension
 
Vec3 cellDiameter_ {}
 
Vec3 invCellDiameter_ {}
 
std::atomic< int > infiniteParticles_ {}
 data structure for particles to large for the cells
 
std::vector< std::atomic< int > > cells_ {}
 actual cell data structure
 
std::vector< size_tnonEmptyCells_ {}
 list of cells containing particles
 

Constructor & Destructor Documentation

◆ SparseLinkedCells() [1/2]

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

◆ SparseLinkedCells() [2/2]

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

Member Function Documentation

◆ clear()

void walberla::mesa_pd::data::SparseLinkedCells::clear ( )
inline

◆ forEachParticlePair()

template<typename Selector , typename Accessor , typename Func , typename... Args>
void walberla::mesa_pd::data::SparseLinkedCells::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 particle index

< particle to be checked against

< neighbor particle index

< neighbor particle index

< neighbor cell index

< current particle index

< neighbor particle index

◆ forEachParticlePairHalf()

template<typename Selector , typename Accessor , typename Func , typename... Args>
void walberla::mesa_pd::data::SparseLinkedCells::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 particle index

< particle to be checked against

< neighbor particle index

< neighbor particle index

< neighbor cell index

< current particle index

< neighbor particle index

Member Data Documentation

◆ cellDiameter_

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

◆ cells_

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

actual cell data structure

◆ domain_

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

local domain covered by this data structure

◆ infiniteParticles_

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

data structure for particles to large for the cells

◆ invCellDiameter_

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

◆ nonEmptyCells_

std::vector<size_t> walberla::mesa_pd::data::SparseLinkedCells::nonEmptyCells_ {}

list of cells containing particles

◆ numCellsPerDim_

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

number of linked cells per dimension


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