Base class for structured block storages (the entire simulation space is partitioned into blocks [see class 'IBlock'], the blocks are partitioned into cells, and structured block storages manage those blocks)
The class 'StructuredBlockStorage' already provides some basic functionality that every structured block storage will possess - regardless of the actual implementation of any derived class. Every structured block storage ...
Structured block storages build upon block storages (see class 'BlockStorage'), every structured block storage encapsulates an object of type BlockStorage (see member function getBlockStorage()). 'StructuredBlockStorage' also acts as an interface class which requires every derived class to implement a set of functions that, for example, can be used to retrieve locally allocated blocks that are located at a certain position within the global cell coordinate space. For more information on which functions must be implemented by a derived class refer to the documentation of the public interface of 'StructuredBlockStorage'.
Attention: Immediately after constructing an instance of a class derived from StructuredBlockStorage the member method "createCellBoundingBoxes()" should be called. Otherwise no block is assigned a cell bounding box and all the transformation methods (-> transforming block local cells to a global cells and vice versa) are not available.
#include <StructuredBlockStorage.h>
Classes | |
class | CellBoundingBoxHandling |
class | StructuredBlockDataAdder |
helper class for adding multiple block data initialization functions More... | |
Public Types | |
using | const_iterator = BlockStorage::const_iterator |
using | iterator = BlockStorage::iterator |
Public Member Functions | |
const BlockStorage & | getBlockStorage () const |
BlockStorage & | getBlockStorage () |
const shared_ptr< BlockStorage > & | getBlockStoragePointer () |
shared_ptr< const BlockStorage > | getBlockStoragePointer () 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 IBlock * | getBlock (const IBlockID &id) const |
IBlock * | getBlock (const IBlockID &id) |
const IBlock * | getBlock (const IBlockID::IDType &id) const |
IBlock * | getBlock (const IBlockID::IDType &id) |
const IBlock * | getBlock (const real_t x, const real_t y, const real_t z) const |
IBlock * | getBlock (const real_t x, const real_t y, const real_t z) |
const IBlock * | getBlock (const Vector3< real_t > &p) const |
IBlock * | getBlock (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 CellInterval & | getDomainCellBB (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_t > | getCellCenter (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 IBlock * | getBlock (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... | |
IBlock * | getBlock (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... | |
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... | |
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... | |
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... | |
virtual void | getBlockID (IBlockID &id, const Cell &cell, const uint_t level=0) const =0 |
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... | |
virtual uint_t | getLevel (const IBlock &block) const =0 |
must return the level the block "block" is assigned to (must be an unsigned integer in the range [0,'number-of-levels') ) 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 CellInterval & | getBlockCellBB (const IBlock &block) const |
Returns the cell bounding box of block "block". More... | |
virtual uint_t | getNumberOfXCells (const IBlock &block) const =0 |
number of local cells of block "block" in x direction More... | |
virtual uint_t | getNumberOfYCells (const IBlock &block) const =0 |
number of local cells of block "block" in y direction More... | |
virtual uint_t | getNumberOfZCells (const IBlock &block) const =0 |
number of local cells of block "block" in z direction 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... | |
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_t > | getBlockLocalCellCenter (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 | |
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) |
virtual bool | equal (const StructuredBlockStorage *rhs) const =0 |
CellInterval * | initializeCellBoundingBox (IBlock *const block) const |
virtual BlockDataID | addCellBoundingBoxesAsBlockData (const std::string &identifier) |
Private Member Functions | |
StructuredBlockStorage () | |
Must not be made public or protected! Derived classes must call one of the available public/protected constructors. More... | |
Private Member Functions inherited from walberla::NonCopyable | |
NonCopyable ()=default | |
~NonCopyable ()=default | |
Private Attributes | |
shared_ptr< BlockStorage > | blockStorage_ |
reference to an encapsulated object of type class BlockStorage (the object itself must be stored as a member in the derived class) More... | |
uint_t | levels_ |
number of different grid levels managed by this block storage (every grid level has its own cell size dx/dy/dz) More... | |
std::vector< CellInterval > | domainCellBB_ |
cell bounding box for the entire simulation domain for every level (always starts at (0,0,0)) [min & max included!] More... | |
std::vector< real_t > | dx_ |
for every level: ( domain x width ) / ( number of cells in x direction ) More... | |
std::vector< real_t > | dy_ |
for every level: ( domain y width ) / ( number of cells in y direction ) More... | |
std::vector< real_t > | dz_ |
for every level: ( domain z width ) / ( number of cells in z direction ) More... | |
bool | blockCellBBCreated_ |
flag for checking whether or not a cell bounding box has already been added as a block data "item" to all blocks More... | |
BlockDataID | blockCellBBId_ |
block data ID for accessing a block's cell bounding box More... | |
Friends | |
class | CellBoundingBoxHandling |
using walberla::domain_decomposition::StructuredBlockStorage::const_iterator = BlockStorage::const_iterator |
|
protected |
Every derived class must call this constructor!
|
protectedvirtualdefault |
Must not be made public! No one should be allowed to delete a variable of type 'StructuredBlockStorage*'.
|
private |
Must not be made public or protected! Derived classes must call one of the available public/protected constructors.
|
inline |
|
inline |
|
inline |
|
inlineprotectedvirtual |
Reimplemented in walberla::blockforest::StructuredBlockForest.
|
inline |
Must be used if multiple initialization functions with different selection attributes are registered for initializing the same block data "item".
A 'BlockDataID' that corresponds to this block data "item" is returned. "BlockDataCreator" and "StructuredBlockDataCreator" structures may be mixed.
Usage: BlockDataID id = blockStorage.addBlockData( "[optional block data identifier]" ) << StructuredBlockDataCreator( ... ) << BlockDataCreator( ... ) << ... ;
|
inline |
This function can be used for initializing a new block data "item".
A 'BlockDataID' that corresponds to this block data "item" is returned. This block data ID must be used to access/retrieve block data (see function 'getData' of class 'IBlock'). If multiple initialization functions with different selection attributes shall be used for initializing the same block data "item" see member function "addStructuredBlockData( const std::string& identifier )"
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
pure virtual |
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'.
Implemented in walberla::blockforest::StructuredBlockForest.
|
inline |
|
inline |
|
inline |
|
pure virtual |
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'.
Implemented in walberla::blockforest::StructuredBlockForest.
|
inline |
|
inline |
|
inline |
|
pure virtual |
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'.
Implemented in walberla::blockforest::StructuredBlockForest.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void walberla::domain_decomposition::StructuredBlockStorage::createCellBoundingBoxes | ( | ) |
Adds a cell bounding box to every block as a block data "item".
For accessing this cell bounding box see member functions "getBlockCellBBId()" and "getBlockCellBB( [const] IBlock& block )".
|
inline |
|
inline |
|
inline |
|
inline |
|
protectedpure virtual |
Implemented in walberla::blockforest::StructuredBlockForest.
|
inline |
|
inline |
void walberla::domain_decomposition::StructuredBlockStorage::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".
|
inline |
For documentation see member function "void getAABBFromCellBB( AABB& aabb, const CellInterval& cellBB, const uint_t level ) const".
|
inline |
|
inline |
Returns the block located at global cell coordinate "cell" on grid level "level" (returns 'NULL' if the block doesn't exist locally!).
Attention: Periodicity is not considered! For mapping cell coordinates to the periodic simulation space see member function 'mapToPeriodicDomain'.
|
inline |
Returns the block located at global cell coordinate "cell" on grid level "level" (returns 'NULL' if the block doesn't exist locally!).
Attention: Periodicity is not considered! For mapping cell coordinates to the periodic simulation space see member function 'mapToPeriodicDomain'.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns the cell bounding box of block "block".
In debug mode: fails if no block cell bounding boxes have been created via "createCellBoundingBoxes()".
Remember: Every block resides on exactly one grid level, and all blocks managed by a structured block storage are assigned a corresponding cell bounding box as block data once "createCellBoundingBoxes()" is called.
|
inline |
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()".
(remember: every block resides on exactly one grid level, and all blocks managed by a
|
inline |
|
inline |
|
pure virtual |
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!
Implemented in walberla::blockforest::StructuredBlockForest.
|
inline |
|
inline |
|
inline |
Maps any point in 3D space to a cell coordinate within the local cell coordinate space of the block "block".
Points located on any of the three "min" faces of a cell (= the three faces that include the lower left/min corner of the cell) are considered to be part of the cell - points located on any of the three "max" faces are NOT!
|
inline |
|
inline |
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".
|
inline |
|
inline |
For documentation see member function "void getBlockLocalCellAABB( const IBlock & block, const Cell & localCell, AABB & aabb ) const".
|
inline |
Returns the axis-aligned bounding box (with respect to the global 3D simulation space) that covers block "block"s local cell "localCell".
|
inline |
For documentation see member function "void getBlockLocalCellCenter( const IBlock & block, const Cell & localCell, real_t & x, real_t & y, real_t & z ) const".
|
inline |
Returns the location (within the global 3D simulation space) of the center of block "block"s local cell "localCell".
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Maps any point in 3D space to a cell coordinate within the global cell coordinate space on level "level".
Points located on any of the three "min" faces of a cell (= the three faces that include the lower left/min corner of the cell) are considered to be part of the cell - points located on any of the three "max" faces are NOT!
[Attention: Periodicity is not considered! For mapping cell coordinates to the periodic simulation space see member function 'mapToPeriodicDomain'.]
|
inline |
|
inline |
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".
|
inline |
|
inline |
Returns the axis-aligned bounding box (with respect to the global 3D simulation space) that covers the cell "cell" on level "level".
|
inline |
For documentation see member function "void getCellAABB( AABB& aabb, const Cell& cell, const uint_t level ) const".
void walberla::domain_decomposition::StructuredBlockStorage::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".
Attention: If you know that your axis-aligned bounding box is perfectly aligned with the cell grid you should use the member function "getCellBBFromCellAlignedAABB" in order to be save from floating point inaccuracies.
|
inline |
For documentation see member function "void getCellBBFromAABB( CellInterval& cellBB, const AABB& aabb, const uint_t level ) const".
void walberla::domain_decomposition::StructuredBlockStorage::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.
Attention: This function should only be used if the corners of the axis-aligned bounding box "aabb" are located precisely on the border between eight cells (see member function "isCellAlignedAABB" for checking whether a given axis-aligned bounding box is aligned with the overlaying cell grid or not). For transforming arbitrary axis-aligned bounding boxes see member function "getCellBBFromAABB".
|
inline |
For documentation see member function "void getCellBBFromCellAlignedAABB( CellInterval& cellBB, const AABB& aabb, const uint_t level ) const".
|
inline |
For documentation see member function "void getCellCenter( real_t & x, real_t & y, real_t & z, const Cell & cell, const uint_t level ) const".
|
inline |
Returns the location (within the global 3D simulation space) of the center of cell "cell" on level "level".
|
inline |
|
inline |
|
inline |
the global cell coordinate space of the simulation on level "level"
|
pure virtual |
must return the level the block "block" is assigned to (must be an unsigned integer in the range [0,'number-of-levels') )
Implemented in walberla::blockforest::StructuredBlockForest.
|
inline |
|
inline |
|
inline |
|
pure virtual |
number of local cells of block "block" in x/y/z direction
Implemented in walberla::blockforest::StructuredBlockForest.
|
inline |
number of global cells in x/y/z direction (within the simulation domain on level "level")
|
inline |
|
pure virtual |
number of local cells of block "block" in x direction
Implemented in walberla::blockforest::StructuredBlockForest.
|
inline |
number of global cells in x direction (within the simulation domain on level "level")
|
pure virtual |
number of local cells of block "block" in y direction
Implemented in walberla::blockforest::StructuredBlockForest.
|
inline |
number of global cells in y direction (within the simulation domain on level "level")
|
pure virtual |
number of local cells of block "block" in z direction
Implemented in walberla::blockforest::StructuredBlockForest.
|
inline |
number of global cells in z direction (within the simulation domain on level "level")
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
bool walberla::domain_decomposition::StructuredBlockStorage::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".
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void walberla::domain_decomposition::StructuredBlockStorage::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.
For example, if the simulation is periodic in x direction and the simulation domain spans from x = 0 to x = 9, then a cell located at x = 38 is mapped to x = 8, and a cell located at x = -13 is mapped to x = 7.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
The following members are not used for checking if two StructuredBlockStorage objects are equal: blockCellBBId_.
|
inline |
|
inline |
|
protected |
|
inline |
|
inline |
|
inline |
|
inline |
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).
|
inline |
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).
|
inline |
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).
|
inline |
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).
|
inline |
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).
|
inline |
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).
|
inline |
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".
|
inline |
Transforms a global point (assumed to be located on the same grid level than the block "block" resides on) into a block local point.
|
inline |
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.
|
inline |
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".
|
inline |
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.
|
inline |
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".
|
friend |
|
private |
flag for checking whether or not a cell bounding box has already been added as a block data "item" to all blocks
|
private |
block data ID for accessing a block's cell bounding box
|
private |
reference to an encapsulated object of type class BlockStorage (the object itself must be stored as a member in the derived class)
|
private |
cell bounding box for the entire simulation domain for every level (always starts at (0,0,0)) [min & max included!]
|
private |
for every level: ( domain x width ) / ( number of cells in x direction )
|
private |
for every level: ( domain y width ) / ( number of cells in y direction )
|
private |
for every level: ( domain z width ) / ( number of cells in z direction )
|
private |
number of different grid levels managed by this block storage (every grid level has its own cell size dx/dy/dz)