Maps the moving bodies into the simulation domain and updates the mapping.
Cells that are inside a body, will be marked with the 'obstacle' flag. 'Inside' means that the cell center is contained in the body. Thus, the body has to provide a valid containsPoint(x,y,z) function.
Cells that in the last time step were inside the body but are now outside of it, i.e. the body 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 required that the mapping has been initialized with one of the free functions from below.
The 'mappingBodySelectorFct' can be used to decide which bodies should be mapped or not.
#include <BodyMapping.h>
Public Types | |
using | PdfField_T = lbm::PdfField< LatticeModel_T > |
using | FlagField_T = typename BoundaryHandling_T::FlagField |
using | flag_t = typename BoundaryHandling_T::flag_t |
using | BodyField_T = Field< pe::BodyID, 1 > |
Public Member Functions | |
BodyMapping (const shared_ptr< StructuredBlockStorage > &blockStorage, const BlockDataID &pdfFieldID, const BlockDataID &boundaryHandlingID, const BlockDataID &bodyStorageID, const shared_ptr< pe::BodyStorage > &globalBodyStorage, const BlockDataID &bodyFieldID, const Destroyer_T &destroyer, const FlagUID &obstacle, const FlagUID &formerObstacle, const std::function< bool(pe::BodyID)> &mappingBodySelectorFct=selectRegularBodies) | |
BodyMapping (const shared_ptr< StructuredBlockStorage > &blockStorage, const BlockDataID &pdfFieldID, const BlockDataID &boundaryHandlingID, const BlockDataID &bodyStorageID, const shared_ptr< pe::BodyStorage > &globalBodyStorage, const BlockDataID &bodyFieldID, const FlagUID &obstacle, const FlagUID &formerObstacle, const std::function< bool(pe::BodyID)> &mappingBodySelectorFct=selectRegularBodies) | |
void | operator() (IBlock *const block) |
Private Member Functions | |
void | mapBodyAndUpdateMapping (pe::BodyID body, IBlock *const block, PdfField_T *pdfField, BoundaryHandling_T *boundaryHandling, FlagField_T *flagField, BodyField_T *bodyField, const flag_t &obstacle, const flag_t &formerObstacle, real_t dx, real_t dy, real_t dz) |
Private Attributes | |
shared_ptr< StructuredBlockStorage > | blockStorage_ |
const BlockDataID | pdfFieldID_ |
const BlockDataID | boundaryHandlingID_ |
const BlockDataID | bodyStorageID_ |
shared_ptr< pe::BodyStorage > | globalBodyStorage_ |
const BlockDataID | bodyFieldID_ |
Destroyer_T | destroyer_ |
const FlagUID | obstacle_ |
const FlagUID | formerObstacle_ |
std::function< bool(pe::BodyID)> | mappingBodySelectorFct_ |
using walberla::pe_coupling::BodyMapping< LatticeModel_T, BoundaryHandling_T, Destroyer_T, conserveMomentum >::BodyField_T = Field<pe::BodyID, 1> |
using walberla::pe_coupling::BodyMapping< LatticeModel_T, BoundaryHandling_T, Destroyer_T, conserveMomentum >::flag_t = typename BoundaryHandling_T::flag_t |
using walberla::pe_coupling::BodyMapping< LatticeModel_T, BoundaryHandling_T, Destroyer_T, conserveMomentum >::FlagField_T = typename BoundaryHandling_T::FlagField |
using walberla::pe_coupling::BodyMapping< LatticeModel_T, BoundaryHandling_T, Destroyer_T, conserveMomentum >::PdfField_T = lbm::PdfField<LatticeModel_T> |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |