Class to manage the reconstruction of PDFs that is needed when cells are becoming uncovered by moving obstacles.
Due to the explicit mapping of bodies into the fluid domain via flags, the PDFs of cells that turned from obstacle to fluid are missing and must be reconstructed in order to continue with the simulation. This class is to be used as a sweep in a LBM simulation with moving obstacles and calls for each cell that is tagged as 'formerObstacle' the specified reconstructor (see Reconstructor.h for the available variants). After the successful reconstruction of all PDFs, the flags are updated to 'fluid'. For small obstacle fractions, an optimized variant is available that only looks for 'formerObstacle' cells in the vicinity of available bodies. It is activated via the 'optimizeForSmallObstacleFraction' argument in the constructor.
The 'movingBodySelectorFct' can be used to decide which bodies should be check for reconstruction (only used when 'optimizeForSmallObstacleFraction' is chosen).
#include <PDFReconstruction.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 | |
PDFReconstruction (const shared_ptr< StructuredBlockStorage > &blockStorage, const BlockDataID &pdfFieldID, const BlockDataID &boundaryHandlingID, const BlockDataID &bodyStorageID, const shared_ptr< pe::BodyStorage > &globalBodyStorage, const BlockDataID &bodyFieldID, const Reconstructer_T &reconstructor, const FlagUID &formerObstacle, const FlagUID &fluid, const std::function< bool(pe::BodyID)> &movingBodySelectorFct=selectRegularBodies, const bool optimizeForSmallObstacleFraction=false) | |
void | operator() (IBlock *const block) |
Private Member Functions | |
void | reconstructPDFsInCells (const CellInterval &cells, IBlock *const block, PdfField_T *pdfField, FlagField_T *flagField, BodyField_T *bodyField, const flag_t &formerObstacle) |
void | updateFlags (const CellInterval &cells, BoundaryHandling_T *boundaryHandling, FlagField_T *flagField, BodyField_T *bodyField, const flag_t &formerObstacle, const flag_t &fluid) |
Private Attributes | |
shared_ptr< StructuredBlockStorage > | blockStorage_ |
const BlockDataID | pdfFieldID_ |
const BlockDataID | boundaryHandlingID_ |
const BlockDataID | bodyStorageID_ |
shared_ptr< pe::BodyStorage > | globalBodyStorage_ |
const BlockDataID | bodyFieldID_ |
Reconstructer_T | reconstructor_ |
const FlagUID | formerObstacle_ |
const FlagUID | fluid_ |
std::function< bool(pe::BodyID)> | movingBodySelectorFct_ |
const bool | optimizeForSmallObstacleFraction_ |
using walberla::pe_coupling::PDFReconstruction< LatticeModel_T, BoundaryHandling_T, Reconstructer_T, conserveMomentum, includeGhostLayers >::BodyField_T = Field<pe::BodyID, 1> |
using walberla::pe_coupling::PDFReconstruction< LatticeModel_T, BoundaryHandling_T, Reconstructer_T, conserveMomentum, includeGhostLayers >::flag_t = typename BoundaryHandling_T::flag_t |
using walberla::pe_coupling::PDFReconstruction< LatticeModel_T, BoundaryHandling_T, Reconstructer_T, conserveMomentum, includeGhostLayers >::FlagField_T = typename BoundaryHandling_T::FlagField |
using walberla::pe_coupling::PDFReconstruction< LatticeModel_T, BoundaryHandling_T, Reconstructer_T, conserveMomentum, includeGhostLayers >::PdfField_T = lbm::PdfField<LatticeModel_T> |
|
inline |
void walberla::pe_coupling::PDFReconstruction< LatticeModel_T, BoundaryHandling_T, Reconstructer_T, conserveMomentum, includeGhostLayers >::operator() | ( | IBlock *const | block | ) |
|
inlineprivate |
|
inlineprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |