walberla::blockforest::StructuredBlockForest Class Reference

#include <StructuredBlockForest.h>

+ Inheritance diagram for walberla::blockforest::StructuredBlockForest:

Classes

class  CellBoundingBoxHandling
 

Public Member Functions

 StructuredBlockForest (const shared_ptr< BlockForest > &blockForest, const uint_t blockXCells, const uint_t blockYCells, const uint_t blockZCells)
 
const BlockForestgetBlockForest () const
 
BlockForestgetBlockForest ()
 
const shared_ptr< BlockForest > & getBlockForestPointer ()
 
shared_ptr< const BlockForestgetBlockForestPointer () const
 
bool blockExists (const Cell &cell, const uint_t level=0) const override
 Returns true if there exists a block on level "level" at cell coordinate "cell" [Periodicity is not considered! For mapping cell coordinates to the periodic simulation space see 'mapToPeriodicDomain'. More...
 
bool blockExistsLocally (const Cell &cell, const uint_t level=0) const override
 Returns true if locally there exists a block on level "level" at cell coordinate "cell" [Periodicity is not considered! For mapping cell coordinates to the periodic simulation space see 'mapToPeriodicDomain'. More...
 
bool blockExistsRemotely (const Cell &cell, const uint_t level=0) const override
 Returns true if remotely there exists a block on level "level" at cell coordinate "cell" [Periodicity is not considered! For mapping cell coordinates to the periodic simulation space see 'mapToPeriodicDomain'. More...
 
void getBlockID (IBlockID &id, const Cell &cell, const uint_t level=0) const override
 Returns the block ID that corresponds to the block located on level "level" at cell coordinate "cell" [Periodicity is not considered! For mapping cell coordinates to the periodic simulation space see 'mapToPeriodicDomain'. More...
 
uint_t getLevel (const IBlock &block) const override
 must return the level the block "block" is assigned to (must be an unsigned integer in the range [0,'number-of-levels') ) More...
 
uint_t getNumberOfXCells (const IBlock &block) const override
 number of local cells of block "block" in x direction More...
 
uint_t getNumberOfYCells (const IBlock &block) const override
 number of local cells of block "block" in y direction More...
 
uint_t getNumberOfZCells (const IBlock &block) const override
 number of local cells of block "block" in z direction More...
 
uint_t getNumberOfCells (const IBlock &block, const uint_t index) const override
 number of local cells of block "block" in x/y/z direction More...
 
uint_t getProcess () const
 
uint_t getProcessIdBytes () const
 
uint_t getXSize () const
 
uint_t getYSize () const
 
uint_t getZSize () const
 
uint_t getSize (const uint_t index) const
 
real_t getRootBlockXSize () const
 
real_t getRootBlockYSize () const
 
real_t getRootBlockZSize () const
 
bool storesUniformBlockGrid () const
 
uint_t getDepth () const
 
uint_t getNumberOfLevels () const
 
uint_t getTreeIdDigits () const
 
uint_t getBlockIdBytes () const
 
uint_t getNumberOfBlocks () const
 
uint_t getNumberOfBlocks (const uint_t level) const
 
void getBlocks (std::vector< const Block * > &blocks, const uint_t level) const
 
void getBlocks (std::vector< Block * > &blocks, const uint_t level)
 
const BlockgetRootBlock (const uint_t x, const uint_t y, const uint_t z) const
 
BlockgetRootBlock (const uint_t x, const uint_t y, const uint_t z)
 
bool rootBlockExists (const uint_t x, const uint_t y, const uint_t z) const
 
bool rootBlockExistsLocally (const uint_t x, const uint_t y, const uint_t z) const
 
bool rootBlockExistsRemotely (const uint_t x, const uint_t y, const uint_t z) const
 
void getRootBlockAABB (AABB &aabb, const uint_t x, const uint_t y, const uint_t z) const
 
void getRootBlockState (Set< SUID > &state, const uint_t x, const uint_t y, const uint_t z) const
 
void getRootBlockProcessRank (uint_t &rank, const uint_t x, const uint_t y, const uint_t z) const
 
const BlockForest::BlockInformationgetBlockInformation () const
 
uint_t getLevelFromBlockId (const BlockID &id) const
 
uint_t getAABBFromBlockId (AABB &aabb, const BlockID &id) const
 
void getForestCoordinates (uint_t &x, uint_t &y, uint_t &z, const BlockID &id) const
 
void getRootBlockCoordinates (uint_t &x, uint_t &y, uint_t &z, const BlockID &id) const
 
void getRootBlockID (BlockID &id, const uint_t x, const uint_t y, const uint_t z) const
 
bool insertBuffersIntoProcessNetwork () const
 
const std::vector< uint_t > & getNeighborhood () const
 
internal::BlockDataHandlingAdder addBlockData (const std::string &identifier=std::string())
 
template<typename T >
BlockDataID addBlockData (const shared_ptr< T > &dataHandling, const std::string &identifier=std::string(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename T >
BlockDataID addBlockData (std::function< T *(IBlock *const block) > function, const std::string &identifier=std::string(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename T >
BlockDataID loadBlockData (const std::string &file, const shared_ptr< T > &dataHandling, const std::string &identifier=std::string(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
void refresh ()
 
uint_t getNumberOfXCellsPerBlock () const
 
uint_t getNumberOfYCellsPerBlock () const
 
uint_t getNumberOfZCellsPerBlock () const
 
uint_t getNumberOfCellsPerBlock (const uint_t index) const
 
bool blockExists (const real_t x, const real_t y, const real_t z) const
 
bool blockExists (const Vector3< real_t > &p) const
 
bool blockExists (const IBlockID &id) const
 
virtual bool blockExists (const Cell &cell, const uint_t level=0) const=0
 Returns true if there exists a block on level "level" at cell coordinate "cell" [Periodicity is not considered! For mapping cell coordinates to the periodic simulation space see 'mapToPeriodicDomain'. More...
 
bool blockExistsLocally (const real_t x, const real_t y, const real_t z) const
 
bool blockExistsLocally (const Vector3< real_t > &p) const
 
bool blockExistsLocally (const IBlockID &id) const
 
virtual bool blockExistsLocally (const Cell &cell, const uint_t level=0) const=0
 Returns true if locally there exists a block on level "level" at cell coordinate "cell" [Periodicity is not considered! For mapping cell coordinates to the periodic simulation space see 'mapToPeriodicDomain'. More...
 
bool blockExistsRemotely (const real_t x, const real_t y, const real_t z) const
 
bool blockExistsRemotely (const Vector3< real_t > &p) const
 
bool blockExistsRemotely (const IBlockID &id) const
 
virtual bool blockExistsRemotely (const Cell &cell, const uint_t level=0) const=0
 Returns true if remotely there exists a block on level "level" at cell coordinate "cell" [Periodicity is not considered! For mapping cell coordinates to the periodic simulation space see 'mapToPeriodicDomain'. More...
 
uint_t getNumberOfXCells (const uint_t level=0) const
 number of global cells in x direction (within the simulation domain on level "level") More...
 
virtual uint_t getNumberOfXCells (const IBlock &block) const=0
 number of local cells of block "block" in x direction More...
 
uint_t getNumberOfYCells (const uint_t level=0) const
 number of global cells in y direction (within the simulation domain on level "level") More...
 
virtual uint_t getNumberOfYCells (const IBlock &block) const=0
 number of local cells of block "block" in y direction More...
 
uint_t getNumberOfZCells (const uint_t level=0) const
 number of global cells in z direction (within the simulation domain on level "level") More...
 
virtual uint_t getNumberOfZCells (const IBlock &block) const=0
 number of local cells of block "block" in z direction More...
 
uint_t getNumberOfCells (const uint_t index, const uint_t level=0) const
 number of global cells in x/y/z direction (within the simulation domain on level "level") More...
 
virtual uint_t getNumberOfCells (const IBlock &block, const uint_t index) const=0
 number of local cells of block "block" in x/y/z direction More...
 
void getBlocks (std::vector< const IBlock * > &blocks) const
 
void getBlocks (std::vector< IBlock * > &blocks)
 
- Public Member Functions inherited from walberla::domain_decomposition::StructuredBlockStorage
const BlockStoragegetBlockStorage () const
 
BlockStoragegetBlockStorage ()
 
const shared_ptr< BlockStorage > & getBlockStoragePointer ()
 
shared_ptr< const BlockStoragegetBlockStoragePointer () const
 
uint_t getNumberOfLevels () const
 
bool operator== (const StructuredBlockStorage &rhs) const
 The following members are not used for checking if two StructuredBlockStorage objects are equal: blockCellBBId_. More...
 
bool operator!= (const StructuredBlockStorage &rhs) const
 
const AABB & getDomain () const
 
bool isXPeriodic () const
 
bool isYPeriodic () const
 
bool isZPeriodic () const
 
bool isPeriodic (const uint_t index) const
 
void mapToPeriodicDomain (real_t &x, real_t &y, real_t &z) const
 
void mapToPeriodicDomain (Vector3< real_t > &p) const
 
bool periodicIntersect (const math::AABB &box1, const math::AABB &box2) const
 
bool periodicIntersect (const math::AABB &box1, const math::AABB &box2, const real_t _dx) const
 
iterator begin (const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
iterator end ()
 
const_iterator begin (const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet()) const
 
const_iterator end () const
 
uint_t getNumberOfBlocks () const
 
uint_t size () const
 
bool empty () const
 
void getBlocks (std::vector< const IBlock * > &blocks) const
 
void getBlocks (std::vector< IBlock * > &blocks)
 
void getBlocksContainedWithinAABB (std::vector< const IBlock * > &blocks, const AABB &aabb) const
 
void getBlocksContainedWithinAABB (std::vector< IBlock * > &blocks, const AABB &aabb)
 
void getBlocksOverlappedByAABB (std::vector< const IBlock * > &blocks, const AABB &aabb) const
 
void getBlocksOverlappedByAABB (std::vector< IBlock * > &blocks, const AABB &aabb)
 
const IBlockgetBlock (const IBlockID &id) const
 
IBlockgetBlock (const IBlockID &id)
 
const IBlockgetBlock (const IBlockID::IDType &id) const
 
IBlockgetBlock (const IBlockID::IDType &id)
 
const IBlockgetBlock (const real_t x, const real_t y, const real_t z) const
 
IBlockgetBlock (const real_t x, const real_t y, const real_t z)
 
const IBlockgetBlock (const Vector3< real_t > &p) const
 
IBlockgetBlock (const Vector3< real_t > &p)
 
bool containsGlobalBlockInformation () const
 
void getAllBlocks (std::vector< shared_ptr< IBlockID > > &blocks) const
 
bool blockExists (const real_t x, const real_t y, const real_t z) const
 
bool blockExistsLocally (const real_t x, const real_t y, const real_t z) const
 
bool blockExistsRemotely (const real_t x, const real_t y, const real_t z) const
 
bool blockExists (const Vector3< real_t > &p) const
 
bool blockExistsLocally (const Vector3< real_t > &p) const
 
bool blockExistsRemotely (const Vector3< real_t > &p) const
 
bool blockExists (const IBlockID &id) const
 
bool blockExistsLocally (const IBlockID &id) const
 
bool blockExistsRemotely (const IBlockID &id) const
 
void getBlockID (IBlockID &id, const real_t x, const real_t y, const real_t z) const
 
void getBlockID (IBlockID &id, const Vector3< real_t > &p) const
 
AABB getAABB (const IBlockID &id) const
 
Set< SUID > getState (const IBlockID &id) const
 
uint_t getProcessRank (const IBlockID &id) const
 
void getAABB (AABB &aabb, const IBlockID &id) const
 
void getState (Set< SUID > &state, const IBlockID &id) const
 
void getProcessRank (uint_t &rank, const IBlockID &id) const
 
bool atDomainXMinBorder (const IBlock &block) const
 
bool atDomainXMaxBorder (const IBlock &block) const
 
bool atDomainYMinBorder (const IBlock &block) const
 
bool atDomainYMaxBorder (const IBlock &block) const
 
bool atDomainZMinBorder (const IBlock &block) const
 
bool atDomainZMaxBorder (const IBlock &block) const
 
bool atDomainMinBorder (const uint_t index, const IBlock &block) const
 
bool atDomainMaxBorder (const uint_t index, const IBlock &block) const
 
const std::vector< uint_t > & getNeighboringProcesses () const
 
std::map< uint_t, std::vector< Vector3< real_t > > > getNeighboringProcessOffsets () const
 
internal::BlockDataHandlingAdder addBlockData (const std::string &identifier=std::string())
 
template<typename T >
BlockDataID addBlockData (const shared_ptr< T > &dataHandling, const std::string &identifier=std::string(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename T >
BlockDataID addBlockData (std::function< T *(IBlock *const block) > function, const std::string &identifier=std::string(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
template<typename T >
BlockDataID loadBlockData (const std::string &file, const shared_ptr< T > &dataHandling, const std::string &identifier=std::string(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
void saveBlockData (const std::string &file, const BlockDataID &id)
 
void serializeBlockData (const BlockDataID &id, mpi::SendBuffer &buffer)
 
void deserializeBlockData (const BlockDataID &id, mpi::RecvBuffer &buffer)
 
void clearBlockData (const BlockDataID &id)
 
uint_t numberOfBlockDataItems () const
 
std::vector< std::string > getBlockDataIdentifiers () const
 
const std::string & getBlockDataIdentifier (const ConstBlockDataID &id) const
 
const CellIntervalgetDomainCellBB (const uint_t level=0) const
 the global cell coordinate space of the simulation on level "level" More...
 
uint_t getNumberOfXCells (const uint_t level=0) const
 number of global cells in x direction (within the simulation domain on level "level") More...
 
uint_t getNumberOfYCells (const uint_t level=0) const
 number of global cells in y direction (within the simulation domain on level "level") More...
 
uint_t getNumberOfZCells (const uint_t level=0) const
 number of global cells in z direction (within the simulation domain on level "level") More...
 
uint_t getNumberOfCells (const uint_t index, const uint_t level=0) const
 number of global cells in x/y/z direction (within the simulation domain on level "level") More...
 
void mapToPeriodicDomain (Cell &cell, const uint_t level=0) const
 This function can be used to transform any cell on level "level" into the periodic cell simulation space. More...
 
Cell getCell (const real_t x, const real_t y, const real_t z, const uint_t level=0) const
 For documentation see member function "void getCell( Cell & cell, const real_t x, const real_t y, const real_t z, const uint_t level ) const". More...
 
Cell getCell (const Vector3< real_t > &p, const uint_t level=0) const
 
void getCell (Cell &cell, const real_t x, const real_t y, const real_t z, const uint_t level=0) const
 Maps any point in 3D space to a cell coordinate within the global cell coordinate space on level "level". More...
 
void getCell (Cell &cell, const Vector3< real_t > &p, const uint_t level=0) const
 
Vector3< real_tgetCellCenter (const Cell &cell, const uint_t level=0) const
 For documentation see member function "void getCellCenter( real_t & x, real_t & y, real_t & z, const Cell & cell, const uint_t level ) const". More...
 
void getCellCenter (real_t &x, real_t &y, real_t &z, const Cell &cell, const uint_t level=0) const
 Returns the location (within the global 3D simulation space) of the center of cell "cell" on level "level". More...
 
void getCellCenter (Vector3< real_t > &p, const Cell &cell, const uint_t level=0) const
 
AABB getCellAABB (const Cell &cell, const uint_t level=0) const
 For documentation see member function "void getCellAABB( AABB& aabb, const Cell& cell, const uint_t level ) const". More...
 
void getCellAABB (AABB &aabb, const Cell &cell, const uint_t level=0) const
 Returns the axis-aligned bounding box (with respect to the global 3D simulation space) that covers the cell "cell" on level "level". More...
 
CellInterval getCellBBFromAABB (const AABB &aabb, const uint_t level=0) const
 For documentation see member function "void getCellBBFromAABB( CellInterval& cellBB, const AABB& aabb, const uint_t level ) const". More...
 
CellInterval getCellBBFromCellAlignedAABB (const AABB &aabb, const uint_t level=0) const
 For documentation see member function "void getCellBBFromCellAlignedAABB( CellInterval& cellBB, const AABB& aabb, const uint_t level ) const". More...
 
void getCellBBFromAABB (CellInterval &cellBB, const AABB &aabb, const uint_t level=0) const
 Transforms any axis-aligned bounding box within the 3D simulation space into a cell bounding box with respect to the grid refinement level "level". More...
 
void getCellBBFromCellAlignedAABB (CellInterval &cellBB, const AABB &aabb, const uint_t level=0) const
 Transforms an axis-aligned bounding box within the 3D simulation space that is perfectly aligned with the overlaying cell grid on grid refinement level "level" into a cell bounding box. More...
 
bool isCellAlignedAABB (const AABB &aabb, const uint_t level=0) const
 Checks whether a given axis-aligned bounding box is aligned with the overlaying cell grid on level "level". More...
 
AABB getAABBFromCellBB (const CellInterval &cellBB, const uint_t level=0) const
 For documentation see member function "void getAABBFromCellBB( AABB& aabb, const CellInterval& cellBB, const uint_t level ) const". More...
 
void getAABBFromCellBB (AABB &aabb, const CellInterval &cellBB, const uint_t level=0) const
 Returns an axis-aligned bounding box within the 3D simulation space that covers the area defined by the cell bounding box "cellBB" on level "level". More...
 
const IBlockgetBlock (const Cell &cell, const uint_t level=0) const
 Returns the block located at global cell coordinate "cell" on grid level "level" (returns 'NULL' if the block doesn't exist locally!). More...
 
IBlockgetBlock (const Cell &cell, const uint_t level=0)
 Returns the block located at global cell coordinate "cell" on grid level "level" (returns 'NULL' if the block doesn't exist locally!). More...
 
void createCellBoundingBoxes ()
 Adds a cell bounding box to every block as a block data "item". More...
 
ConstBlockDataID getBlockCellBBId () const
 Returns the block data ID required for accessing the cell bounding box of blocks - fails in debug mode if no block cell bounding boxes have been created via "createCellBoundingBoxes()". More...
 
const CellIntervalgetBlockCellBB (const IBlock &block) const
 Returns the cell bounding box of block "block". More...
 
Cell getBlockLocalCell (const IBlock &block, const real_t x, const real_t y, const real_t z) const
 For documentation see member function "void getBlockLocalCell( Cell& localCell, const IBlock& block, const real_t x, const real_t y, const real_t z ) const". More...
 
Cell getBlockLocalCell (const IBlock &block, const Vector3< real_t > &p) const
 
void getBlockLocalCell (Cell &localCell, const IBlock &block, const real_t x, const real_t y, const real_t z) const
 Maps any point in 3D space to a cell coordinate within the local cell coordinate space of the block "block". More...
 
void getBlockLocalCell (Cell &localCell, const IBlock &block, const Vector3< real_t > &p) const
 
Vector3< real_tgetBlockLocalCellCenter (const IBlock &block, const Cell &localCell) const
 For documentation see member function "void getBlockLocalCellCenter( const IBlock & block, const Cell & localCell, real_t & x, real_t & y, real_t & z ) const". More...
 
void getBlockLocalCellCenter (const IBlock &block, const Cell &localCell, real_t &x, real_t &y, real_t &z) const
 Returns the location (within the global 3D simulation space) of the center of block "block"s local cell "localCell". More...
 
void getBlockLocalCellCenter (const IBlock &block, const Cell &localCell, Vector3< real_t > &p) const
 
AABB getBlockLocalCellAABB (const IBlock &block, const Cell &localCell) const
 For documentation see member function "void getBlockLocalCellAABB( const IBlock & block, const Cell & localCell, AABB & aabb ) const". More...
 
void getBlockLocalCellAABB (const IBlock &block, const Cell &localCell, AABB &aabb) const
 Returns the axis-aligned bounding box (with respect to the global 3D simulation space) that covers block "block"s local cell "localCell". More...
 
void transformGlobalToBlockLocal (Vector3< real_t > &local, const IBlock &block, const Vector3< real_t > &global) const
 Transforms a global point "global" (assumed to be located on the same grid level than the block "block" resides on) into the block local point "local". More...
 
void transformGlobalToBlockLocal (Vector3< real_t > &point, const IBlock &block) const
 Transforms a global point (assumed to be located on the same grid level than the block "block" resides on) into a block local point. More...
 
void transformBlockLocalToGlobal (Vector3< real_t > &global, const IBlock &block, const Vector3< real_t > &local) const
 Transforms the block local point "local" into the global point "global" (the global point is given with respect to the grid level the block "block" resides on). More...
 
void transformBlockLocalToGlobal (Vector3< real_t > &point, const IBlock &block) const
 Transforms a block local point into a global point (the global point is given with respect to the grid level the block "block" resides on). More...
 
void transformGlobalToBlockLocalCell (Cell &local, const IBlock &block, const Cell &global) const
 Transforms the global cell coordinate "global" (assumed to be located on the same grid level than the block "block" resides on) into the block local cell coordinate "local". More...
 
void transformGlobalToBlockLocalCell (Cell &cell, const IBlock &block) const
 Transforms a global cell coordinate (assumed to be located on the same grid level than the block "block" resides on) into a block local cell coordinate. More...
 
void transformBlockLocalToGlobalCell (Cell &global, const IBlock &block, const Cell &local) const
 Transforms the block local cell coordinate "local" into the global cell coordinate "global" (the global cell is given with respect to the grid level the block "block" resides on). More...
 
void transformBlockLocalToGlobalCell (Cell &cell, const IBlock &block) const
 Transforms a block local cell coordinate into a global cell coordinate (the global cell is given with respect to the grid level the block "block" resides on). More...
 
void transformGlobalToBlockLocalCellInterval (CellInterval &local, const IBlock &block, const CellInterval &global) const
 Transforms the global cell interval "global" (assumed to be located on the same grid level than the block "block" resides on) into the block local cell interval "local". More...
 
void transformGlobalToBlockLocalCellInterval (CellInterval &interval, const IBlock &block) const
 Transforms a global cell interval (assumed to be located on the same grid level than the block "block" resides on) into a block local cell interval. More...
 
void transformBlockLocalToGlobalCellInterval (CellInterval &global, const IBlock &block, const CellInterval &local) const
 Transforms the block local cell interval "local" into the global cell interval "global" (the global cell interval is given with respect to the grid level the block "block" resides on). More...
 
void transformBlockLocalToGlobalCellInterval (CellInterval &interval, const IBlock &block) const
 Transforms a block local cell interval into a global cell interval (the global cell interval is given with respect to the grid level the block "block" resides on). More...
 
StructuredBlockDataAdder addStructuredBlockData (const std::string &identifier=std::string())
 Must be used if multiple initialization functions with different selection attributes are registered for initializing the same block data "item". More...
 
template<typename T >
BlockDataID addStructuredBlockData (std::function< T *(IBlock *const block, StructuredBlockStorage *const storage) > function, const std::string &identifier=std::string(), const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 This function can be used for initializing a new block data "item". More...
 

Protected Member Functions

bool equal (const StructuredBlockStorage *rhs) const override
 
BlockDataID addCellBoundingBoxesAsBlockData (const std::string &identifier) override
 
- Protected Member Functions inherited from walberla::domain_decomposition::StructuredBlockStorage
 StructuredBlockStorage (const shared_ptr< BlockStorage > &blockStorage, const std::vector< uint_t > &xCells, const std::vector< uint_t > &yCells, const std::vector< uint_t > &zCells)
 Every derived class must call this constructor! More...
 
virtual ~StructuredBlockStorage ()=default
 Must not be made public! No one should be allowed to delete a variable of type 'StructuredBlockStorage*'. More...
 
void resetCellDecomposition (const std::vector< uint_t > &xCells, const std::vector< uint_t > &yCells, const std::vector< uint_t > &zCells)
 
CellIntervalinitializeCellBoundingBox (IBlock *const block) const
 

Static Private Member Functions

static std::vector< uint_tconstructNumberOfCells (uint_t cells, const uint_t levels)
 
static void resetCellDecompositionInStorage (StructuredBlockForest &storage)
 

Private Attributes

shared_ptr< BlockForestblockForest_
 
uint_t blockCells_ [3]
 

Friends

class CellBoundingBoxHandling
 

Additional Inherited Members

- Public Types inherited from walberla::domain_decomposition::StructuredBlockStorage
using const_iterator = BlockStorage::const_iterator
 
using iterator = BlockStorage::iterator
 

Constructor & Destructor Documentation

◆ StructuredBlockForest()

walberla::blockforest::StructuredBlockForest::StructuredBlockForest ( const shared_ptr< BlockForest > &  blockForest,
const uint_t  blockXCells,
const uint_t  blockYCells,
const uint_t  blockZCells 
)
inline

Member Function Documentation

◆ addBlockData() [1/3]

template<typename T >
BlockDataID walberla::blockforest::StructuredBlockForest::addBlockData ( const shared_ptr< T > &  dataHandling,
const std::string &  identifier = std::string(),
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
inline

◆ addBlockData() [2/3]

internal::BlockDataHandlingAdder walberla::blockforest::StructuredBlockForest::addBlockData ( const std::string &  identifier = std::string())
inline

◆ addBlockData() [3/3]

template<typename T >
BlockDataID walberla::blockforest::StructuredBlockForest::addBlockData ( std::function< T *(IBlock *const block) >  function,
const std::string &  identifier = std::string(),
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
inline

◆ addCellBoundingBoxesAsBlockData()

BlockDataID walberla::blockforest::StructuredBlockForest::addCellBoundingBoxesAsBlockData ( const std::string &  identifier)
inlineoverrideprotectedvirtual

◆ blockExists() [1/5]

bool walberla::blockforest::StructuredBlockForest::blockExists ( const Cell cell,
const uint_t  level = 0 
) const
overridevirtual

Returns true if there exists a block on level "level" at cell coordinate "cell" [Periodicity is not considered! For mapping cell coordinates to the periodic simulation space see 'mapToPeriodicDomain'.

]. This member function is guaranteed to work properly only if 'containsGlobalBlockInformation() == true'.

Implements walberla::domain_decomposition::StructuredBlockStorage.

◆ blockExists() [2/5]

virtual bool walberla::domain_decomposition::StructuredBlockStorage::blockExists

Returns true if there exists a block on level "level" at cell coordinate "cell" [Periodicity is not considered! For mapping cell coordinates to the periodic simulation space see 'mapToPeriodicDomain'.

]. This member function is guaranteed to work properly only if 'containsGlobalBlockInformation() == true'.

◆ blockExists() [3/5]

bool walberla::domain_decomposition::StructuredBlockStorage::blockExists
inline

◆ blockExists() [4/5]

bool walberla::domain_decomposition::StructuredBlockStorage::blockExists
inline

◆ blockExists() [5/5]

bool walberla::domain_decomposition::StructuredBlockStorage::blockExists
inline

◆ blockExistsLocally() [1/5]

bool walberla::blockforest::StructuredBlockForest::blockExistsLocally ( const Cell cell,
const uint_t  level = 0 
) const
inlineoverridevirtual

Returns true if locally there exists a block on level "level" at cell coordinate "cell" [Periodicity is not considered! For mapping cell coordinates to the periodic simulation space see 'mapToPeriodicDomain'.

]. This member function is always guaranteed to work properly, even if 'containsGlobalBlockInformation() == false'.

Implements walberla::domain_decomposition::StructuredBlockStorage.

◆ blockExistsLocally() [2/5]

virtual bool walberla::domain_decomposition::StructuredBlockStorage::blockExistsLocally

Returns true if locally there exists a block on level "level" at cell coordinate "cell" [Periodicity is not considered! For mapping cell coordinates to the periodic simulation space see 'mapToPeriodicDomain'.

]. This member function is always guaranteed to work properly, even if 'containsGlobalBlockInformation() == false'.

◆ blockExistsLocally() [3/5]

bool walberla::domain_decomposition::StructuredBlockStorage::blockExistsLocally
inline

◆ blockExistsLocally() [4/5]

bool walberla::domain_decomposition::StructuredBlockStorage::blockExistsLocally
inline

◆ blockExistsLocally() [5/5]

bool walberla::domain_decomposition::StructuredBlockStorage::blockExistsLocally
inline

◆ blockExistsRemotely() [1/5]

bool walberla::blockforest::StructuredBlockForest::blockExistsRemotely ( const Cell cell,
const uint_t  level = 0 
) const
inlineoverridevirtual

Returns true if remotely there exists a block on level "level" at cell coordinate "cell" [Periodicity is not considered! For mapping cell coordinates to the periodic simulation space see 'mapToPeriodicDomain'.

]. This member function is guaranteed to work properly only if 'containsGlobalBlockInformation() == true'.

Implements walberla::domain_decomposition::StructuredBlockStorage.

◆ blockExistsRemotely() [2/5]

virtual bool walberla::domain_decomposition::StructuredBlockStorage::blockExistsRemotely

Returns true if remotely there exists a block on level "level" at cell coordinate "cell" [Periodicity is not considered! For mapping cell coordinates to the periodic simulation space see 'mapToPeriodicDomain'.

]. This member function is guaranteed to work properly only if 'containsGlobalBlockInformation() == true'.

◆ blockExistsRemotely() [3/5]

bool walberla::domain_decomposition::StructuredBlockStorage::blockExistsRemotely
inline

◆ blockExistsRemotely() [4/5]

bool walberla::domain_decomposition::StructuredBlockStorage::blockExistsRemotely
inline

◆ blockExistsRemotely() [5/5]

bool walberla::domain_decomposition::StructuredBlockStorage::blockExistsRemotely
inline

◆ constructNumberOfCells()

std::vector< uint_t > walberla::blockforest::StructuredBlockForest::constructNumberOfCells ( uint_t  cells,
const uint_t  levels 
)
inlinestaticprivate

◆ equal()

bool walberla::blockforest::StructuredBlockForest::equal ( const StructuredBlockStorage rhs) const
inlineoverrideprotectedvirtual

◆ getAABBFromBlockId()

uint_t walberla::blockforest::StructuredBlockForest::getAABBFromBlockId ( AABB &  aabb,
const BlockID id 
) const
inline

◆ getBlockForest() [1/2]

BlockForest& walberla::blockforest::StructuredBlockForest::getBlockForest ( )
inline

◆ getBlockForest() [2/2]

const BlockForest& walberla::blockforest::StructuredBlockForest::getBlockForest ( ) const
inline

◆ getBlockForestPointer() [1/2]

const shared_ptr< BlockForest >& walberla::blockforest::StructuredBlockForest::getBlockForestPointer ( )
inline

◆ getBlockForestPointer() [2/2]

shared_ptr< const BlockForest > walberla::blockforest::StructuredBlockForest::getBlockForestPointer ( ) const
inline

◆ getBlockID()

void walberla::blockforest::StructuredBlockForest::getBlockID ( IBlockID id,
const Cell cell,
const uint_t  level = 0 
) const
overridevirtual

Returns the block ID that corresponds to the block located on level "level" at cell coordinate "cell" [Periodicity is not considered! For mapping cell coordinates to the periodic simulation space see 'mapToPeriodicDomain'.

]. For local blocks, this function is always guaranteed to work. For remote blocks, this function is guaranteed to work properly only if 'containsGlobalBlockInformation() == true'. If the request cannot be satisfied (for example if no block exists on level "level" at cell coordinate "cell"), the simulation must be aborted and the call to this function must not return!

Implements walberla::domain_decomposition::StructuredBlockStorage.

◆ getBlockIdBytes()

uint_t walberla::blockforest::StructuredBlockForest::getBlockIdBytes ( ) const
inline

◆ getBlockInformation()

const BlockForest::BlockInformation& walberla::blockforest::StructuredBlockForest::getBlockInformation ( ) const
inline

◆ getBlocks() [1/4]

void walberla::blockforest::StructuredBlockForest::getBlocks ( std::vector< Block * > &  blocks,
const uint_t  level 
)
inline

◆ getBlocks() [2/4]

void walberla::blockforest::StructuredBlockForest::getBlocks ( std::vector< const Block * > &  blocks,
const uint_t  level 
) const
inline

◆ getBlocks() [3/4]

void walberla::domain_decomposition::StructuredBlockStorage::getBlocks
inline

◆ getBlocks() [4/4]

void walberla::domain_decomposition::StructuredBlockStorage::getBlocks
inline

◆ getDepth()

uint_t walberla::blockforest::StructuredBlockForest::getDepth ( ) const
inline

◆ getForestCoordinates()

void walberla::blockforest::StructuredBlockForest::getForestCoordinates ( uint_t x,
uint_t y,
uint_t z,
const BlockID id 
) const
inline

◆ getLevel()

uint_t walberla::blockforest::StructuredBlockForest::getLevel ( const IBlock block) const
inlineoverridevirtual

must return the level the block "block" is assigned to (must be an unsigned integer in the range [0,'number-of-levels') )

Implements walberla::domain_decomposition::StructuredBlockStorage.

◆ getLevelFromBlockId()

uint_t walberla::blockforest::StructuredBlockForest::getLevelFromBlockId ( const BlockID id) const
inline

◆ getNeighborhood()

const std::vector< uint_t >& walberla::blockforest::StructuredBlockForest::getNeighborhood ( ) const
inline

◆ getNumberOfBlocks() [1/2]

uint_t walberla::blockforest::StructuredBlockForest::getNumberOfBlocks ( ) const
inline

◆ getNumberOfBlocks() [2/2]

uint_t walberla::blockforest::StructuredBlockForest::getNumberOfBlocks ( const uint_t  level) const
inline

◆ getNumberOfCells() [1/3]

uint_t walberla::blockforest::StructuredBlockForest::getNumberOfCells ( const IBlock block,
const uint_t  index 
) const
inlineoverridevirtual

number of local cells of block "block" in x/y/z direction

Implements walberla::domain_decomposition::StructuredBlockStorage.

◆ getNumberOfCells() [2/3]

virtual uint_t walberla::domain_decomposition::StructuredBlockStorage::getNumberOfCells

number of local cells of block "block" in x/y/z direction

◆ getNumberOfCells() [3/3]

uint_t walberla::domain_decomposition::StructuredBlockStorage::getNumberOfCells
inline

number of global cells in x/y/z direction (within the simulation domain on level "level")

◆ getNumberOfCellsPerBlock()

uint_t walberla::blockforest::StructuredBlockForest::getNumberOfCellsPerBlock ( const uint_t  index) const
inline

◆ getNumberOfLevels()

uint_t walberla::blockforest::StructuredBlockForest::getNumberOfLevels ( ) const
inline

◆ getNumberOfXCells() [1/3]

uint_t walberla::blockforest::StructuredBlockForest::getNumberOfXCells ( const IBlock block) const
inlineoverridevirtual

number of local cells of block "block" in x direction

Implements walberla::domain_decomposition::StructuredBlockStorage.

◆ getNumberOfXCells() [2/3]

virtual uint_t walberla::domain_decomposition::StructuredBlockStorage::getNumberOfXCells

number of local cells of block "block" in x direction

◆ getNumberOfXCells() [3/3]

uint_t walberla::domain_decomposition::StructuredBlockStorage::getNumberOfXCells
inline

number of global cells in x direction (within the simulation domain on level "level")

◆ getNumberOfXCellsPerBlock()

uint_t walberla::blockforest::StructuredBlockForest::getNumberOfXCellsPerBlock ( ) const
inline

◆ getNumberOfYCells() [1/3]

uint_t walberla::blockforest::StructuredBlockForest::getNumberOfYCells ( const IBlock block) const
inlineoverridevirtual

number of local cells of block "block" in y direction

Implements walberla::domain_decomposition::StructuredBlockStorage.

◆ getNumberOfYCells() [2/3]

virtual uint_t walberla::domain_decomposition::StructuredBlockStorage::getNumberOfYCells

number of local cells of block "block" in y direction

◆ getNumberOfYCells() [3/3]

uint_t walberla::domain_decomposition::StructuredBlockStorage::getNumberOfYCells
inline

number of global cells in y direction (within the simulation domain on level "level")

◆ getNumberOfYCellsPerBlock()

uint_t walberla::blockforest::StructuredBlockForest::getNumberOfYCellsPerBlock ( ) const
inline

◆ getNumberOfZCells() [1/3]

uint_t walberla::blockforest::StructuredBlockForest::getNumberOfZCells ( const IBlock block) const
inlineoverridevirtual

number of local cells of block "block" in z direction

Implements walberla::domain_decomposition::StructuredBlockStorage.

◆ getNumberOfZCells() [2/3]

virtual uint_t walberla::domain_decomposition::StructuredBlockStorage::getNumberOfZCells

number of local cells of block "block" in z direction

◆ getNumberOfZCells() [3/3]

uint_t walberla::domain_decomposition::StructuredBlockStorage::getNumberOfZCells
inline

number of global cells in z direction (within the simulation domain on level "level")

◆ getNumberOfZCellsPerBlock()

uint_t walberla::blockforest::StructuredBlockForest::getNumberOfZCellsPerBlock ( ) const
inline

◆ getProcess()

uint_t walberla::blockforest::StructuredBlockForest::getProcess ( ) const
inline

◆ getProcessIdBytes()

uint_t walberla::blockforest::StructuredBlockForest::getProcessIdBytes ( ) const
inline

◆ getRootBlock() [1/2]

Block* walberla::blockforest::StructuredBlockForest::getRootBlock ( const uint_t  x,
const uint_t  y,
const uint_t  z 
)
inline

◆ getRootBlock() [2/2]

const Block* walberla::blockforest::StructuredBlockForest::getRootBlock ( const uint_t  x,
const uint_t  y,
const uint_t  z 
) const
inline

◆ getRootBlockAABB()

void walberla::blockforest::StructuredBlockForest::getRootBlockAABB ( AABB &  aabb,
const uint_t  x,
const uint_t  y,
const uint_t  z 
) const
inline

◆ getRootBlockCoordinates()

void walberla::blockforest::StructuredBlockForest::getRootBlockCoordinates ( uint_t x,
uint_t y,
uint_t z,
const BlockID id 
) const
inline

◆ getRootBlockID()

void walberla::blockforest::StructuredBlockForest::getRootBlockID ( BlockID id,
const uint_t  x,
const uint_t  y,
const uint_t  z 
) const
inline

◆ getRootBlockProcessRank()

void walberla::blockforest::StructuredBlockForest::getRootBlockProcessRank ( uint_t rank,
const uint_t  x,
const uint_t  y,
const uint_t  z 
) const
inline

◆ getRootBlockState()

void walberla::blockforest::StructuredBlockForest::getRootBlockState ( Set< SUID > &  state,
const uint_t  x,
const uint_t  y,
const uint_t  z 
) const
inline

◆ getRootBlockXSize()

real_t walberla::blockforest::StructuredBlockForest::getRootBlockXSize ( ) const
inline

◆ getRootBlockYSize()

real_t walberla::blockforest::StructuredBlockForest::getRootBlockYSize ( ) const
inline

◆ getRootBlockZSize()

real_t walberla::blockforest::StructuredBlockForest::getRootBlockZSize ( ) const
inline

◆ getSize()

uint_t walberla::blockforest::StructuredBlockForest::getSize ( const uint_t  index) const
inline

◆ getTreeIdDigits()

uint_t walberla::blockforest::StructuredBlockForest::getTreeIdDigits ( ) const
inline

◆ getXSize()

uint_t walberla::blockforest::StructuredBlockForest::getXSize ( ) const
inline

◆ getYSize()

uint_t walberla::blockforest::StructuredBlockForest::getYSize ( ) const
inline

◆ getZSize()

uint_t walberla::blockforest::StructuredBlockForest::getZSize ( ) const
inline

◆ insertBuffersIntoProcessNetwork()

bool walberla::blockforest::StructuredBlockForest::insertBuffersIntoProcessNetwork ( ) const
inline

◆ loadBlockData()

template<typename T >
BlockDataID walberla::blockforest::StructuredBlockForest::loadBlockData ( const std::string &  file,
const shared_ptr< T > &  dataHandling,
const std::string &  identifier = std::string(),
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
inline

◆ refresh()

void walberla::blockforest::StructuredBlockForest::refresh ( )
inline

◆ resetCellDecompositionInStorage()

void walberla::blockforest::StructuredBlockForest::resetCellDecompositionInStorage ( StructuredBlockForest storage)
inlinestaticprivate

◆ rootBlockExists()

bool walberla::blockforest::StructuredBlockForest::rootBlockExists ( const uint_t  x,
const uint_t  y,
const uint_t  z 
) const
inline

◆ rootBlockExistsLocally()

bool walberla::blockforest::StructuredBlockForest::rootBlockExistsLocally ( const uint_t  x,
const uint_t  y,
const uint_t  z 
) const
inline

◆ rootBlockExistsRemotely()

bool walberla::blockforest::StructuredBlockForest::rootBlockExistsRemotely ( const uint_t  x,
const uint_t  y,
const uint_t  z 
) const
inline

◆ storesUniformBlockGrid()

bool walberla::blockforest::StructuredBlockForest::storesUniformBlockGrid ( ) const
inline

Friends And Related Function Documentation

◆ CellBoundingBoxHandling

friend class CellBoundingBoxHandling
friend

Member Data Documentation

◆ blockCells_

uint_t walberla::blockforest::StructuredBlockForest::blockCells_[3]
private

◆ blockForest_

shared_ptr< BlockForest > walberla::blockforest::StructuredBlockForest::blockForest_
private

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