walberla::lbm_mesapd_coupling::MovingParticleMapping< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, ParticleSelector_T > Class Template Reference

Detailed Description

template<typename PdfField_T, typename BoundaryHandling_T, typename ParticleAccessor_T, typename ParticleSelector_T>
class walberla::lbm_mesapd_coupling::MovingParticleMapping< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, ParticleSelector_T >

Maps the moving particles into the simulation domain and updates the mapping.

Cells that are inside a particle, will be marked with the 'obstacle' flag. 'Inside' means that the cell center is contained in the particle. Thus, a containsPoint function has to be available for all particles/shapes.

Cells that in the last time step were inside the particle but are now outside of it, i.e. the particle has moved, will be marked with the 'formerObstacle' flag. The 'formerObstacle' flag is used in a second step by the PDFReconstruction class (see PDFReconstruction.h) to re-initialize the missing PDFs. Afterwards, the 'formerObstacle' flag is removed and the 'fluid' flag is set.

It is not strictly required that the mapping has been initialized with the mapping kernel from below.

The 'mappingParticleSelector' can be used to include/exclude certain particles from the mapping.

#include <MovingParticleMapping.h>

Public Types

using FlagField_T = typename BoundaryHandling_T::FlagField
 
using flag_t = typename BoundaryHandling_T::flag_t
 

Public Member Functions

 MovingParticleMapping (const shared_ptr< StructuredBlockStorage > &blockStorage, const BlockDataID &pdfFieldID, const BlockDataID &boundaryHandlingID, const BlockDataID &particleFieldID, const shared_ptr< ParticleAccessor_T > &ac, const FlagUID &obstacle, const FlagUID &formerObstacle, const ParticleSelector_T &mappingParticleSelector, bool conserveMomentumWhenMapping)
 
void operator() (IBlock *const block)
 

Private Member Functions

void mapParticleAndUpdateMapping (const size_t particleIdx, IBlock *const block, PdfField_T *pdfField, BoundaryHandling_T *boundaryHandling, FlagField_T *flagField, ParticleField_T *particleField, const flag_t &obstacle, const flag_t &formerObstacle, real_t dx, real_t dy, real_t dz)
 

Private Attributes

shared_ptr< StructuredBlockStorageblockStorage_
 
const BlockDataID pdfFieldID_
 
const BlockDataID boundaryHandlingID_
 
const BlockDataID particleFieldID_
 
shared_ptr< ParticleAccessor_T > ac_
 
const FlagUID obstacle_
 
const FlagUID formerObstacle_
 
ParticleSelector_T mappingParticleSelector_
 
bool conserveMomentumWhenMapping_
 

Member Typedef Documentation

◆ flag_t

template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T , typename ParticleSelector_T >
using walberla::lbm_mesapd_coupling::MovingParticleMapping< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, ParticleSelector_T >::flag_t = typename BoundaryHandling_T::flag_t

◆ FlagField_T

template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T , typename ParticleSelector_T >
using walberla::lbm_mesapd_coupling::MovingParticleMapping< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, ParticleSelector_T >::FlagField_T = typename BoundaryHandling_T::FlagField

Constructor & Destructor Documentation

◆ MovingParticleMapping()

template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T , typename ParticleSelector_T >
walberla::lbm_mesapd_coupling::MovingParticleMapping< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, ParticleSelector_T >::MovingParticleMapping ( const shared_ptr< StructuredBlockStorage > &  blockStorage,
const BlockDataID pdfFieldID,
const BlockDataID boundaryHandlingID,
const BlockDataID particleFieldID,
const shared_ptr< ParticleAccessor_T > &  ac,
const FlagUID &  obstacle,
const FlagUID &  formerObstacle,
const ParticleSelector_T &  mappingParticleSelector,
bool  conserveMomentumWhenMapping 
)
inline

Member Function Documentation

◆ mapParticleAndUpdateMapping()

template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T , typename ParticleSelector_T >
void walberla::lbm_mesapd_coupling::MovingParticleMapping< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, ParticleSelector_T >::mapParticleAndUpdateMapping ( const size_t  particleIdx,
IBlock *const  block,
PdfField_T pdfField,
BoundaryHandling_T boundaryHandling,
FlagField_T flagField,
ParticleField_T particleField,
const flag_t obstacle,
const flag_t formerObstacle,
real_t  dx,
real_t  dy,
real_t  dz 
)
inlineprivate

◆ operator()()

template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T , typename ParticleSelector_T >
void walberla::lbm_mesapd_coupling::MovingParticleMapping< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, ParticleSelector_T >::operator() ( IBlock *const  block)
inline

Member Data Documentation

◆ ac_

template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T , typename ParticleSelector_T >
shared_ptr<ParticleAccessor_T> walberla::lbm_mesapd_coupling::MovingParticleMapping< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, ParticleSelector_T >::ac_
private

◆ blockStorage_

template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T , typename ParticleSelector_T >
shared_ptr<StructuredBlockStorage> walberla::lbm_mesapd_coupling::MovingParticleMapping< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, ParticleSelector_T >::blockStorage_
private

◆ boundaryHandlingID_

template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T , typename ParticleSelector_T >
const BlockDataID walberla::lbm_mesapd_coupling::MovingParticleMapping< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, ParticleSelector_T >::boundaryHandlingID_
private

◆ conserveMomentumWhenMapping_

template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T , typename ParticleSelector_T >
bool walberla::lbm_mesapd_coupling::MovingParticleMapping< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, ParticleSelector_T >::conserveMomentumWhenMapping_
private

◆ formerObstacle_

template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T , typename ParticleSelector_T >
const FlagUID walberla::lbm_mesapd_coupling::MovingParticleMapping< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, ParticleSelector_T >::formerObstacle_
private

◆ mappingParticleSelector_

template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T , typename ParticleSelector_T >
ParticleSelector_T walberla::lbm_mesapd_coupling::MovingParticleMapping< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, ParticleSelector_T >::mappingParticleSelector_
private

◆ obstacle_

template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T , typename ParticleSelector_T >
const FlagUID walberla::lbm_mesapd_coupling::MovingParticleMapping< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, ParticleSelector_T >::obstacle_
private

◆ particleFieldID_

template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T , typename ParticleSelector_T >
const BlockDataID walberla::lbm_mesapd_coupling::MovingParticleMapping< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, ParticleSelector_T >::particleFieldID_
private

◆ pdfFieldID_

template<typename PdfField_T , typename BoundaryHandling_T , typename ParticleAccessor_T , typename ParticleSelector_T >
const BlockDataID walberla::lbm_mesapd_coupling::MovingParticleMapping< PdfField_T, BoundaryHandling_T, ParticleAccessor_T, ParticleSelector_T >::pdfFieldID_
private

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