walberla::domain_decomposition::StructuredBlockStorage Class Referenceabstract

Detailed Description

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 ...

  • ... encapsulates an object of type BlockStorage and thereby provides the same functionality than the class BlockStorage. For documentation of this functionality see class BlockStorage.
  • ... may have multiple different grid refinement levels.
  • ... possesses an axis-aligned cell bounding box for every grid refinement level. Each of these cell bounding boxes covers the entire simulation space/domain and starts at (0,0,0). A cell bounding box is always represented as a cell interval (see class 'CellInterval').
  • ... knows the cell size dx/dy/dz (these three values may be identical) of each grid refinement level.
  • ... provides a mechanism for adding a cell bounding box to every block as a block data "item" (see member function "createCellBoundingBoxes()"). This cell bounding box represents the region within the global cell coordinate space that is covered by this block. The cell bounding box is always given in relation to the grid level the corresponding block is located on (-> every block is required to be assigned to one of the available grid refinement levels, see member function "getLevel( const IBlock& block )").
  • ... provides mapping mechanisms between the cell coordinate space and the underlying 3D simulation space
  • ... provides mapping mechanisms between block local and simulation global cell coordinates (every block has its own local cell coordinate space starting at (0,0,0)).

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>

+ Inheritance diagram for walberla::domain_decomposition::StructuredBlockStorage:

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 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...
 
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 CellIntervalgetBlockCellBB (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_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

 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
 
CellIntervalinitializeCellBoundingBox (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< BlockStorageblockStorage_
 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< CellIntervaldomainCellBB_
 cell bounding box for the entire simulation domain for every level (always starts at (0,0,0)) [min & max included!] More...
 
std::vector< real_tdx_
 for every level: ( domain x width ) / ( number of cells in x direction ) More...
 
std::vector< real_tdy_
 for every level: ( domain y width ) / ( number of cells in y direction ) More...
 
std::vector< real_tdz_
 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
 

Member Typedef Documentation

◆ const_iterator

◆ iterator

Constructor & Destructor Documentation

◆ StructuredBlockStorage() [1/2]

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 
)
protected

Every derived class must call this constructor!

◆ ~StructuredBlockStorage()

virtual walberla::domain_decomposition::StructuredBlockStorage::~StructuredBlockStorage ( )
protectedvirtualdefault

Must not be made public! No one should be allowed to delete a variable of type 'StructuredBlockStorage*'.

◆ StructuredBlockStorage() [2/2]

walberla::domain_decomposition::StructuredBlockStorage::StructuredBlockStorage ( )
private

Must not be made public or protected! Derived classes must call one of the available public/protected constructors.

Member Function Documentation

◆ addBlockData() [1/3]

template<typename T >
BlockDataID walberla::domain_decomposition::StructuredBlockStorage::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::domain_decomposition::StructuredBlockStorage::addBlockData ( const std::string &  identifier = std::string())
inline

◆ addBlockData() [3/3]

template<typename T >
BlockDataID walberla::domain_decomposition::StructuredBlockStorage::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::domain_decomposition::StructuredBlockStorage::addCellBoundingBoxesAsBlockData ( const std::string &  identifier)
inlineprotectedvirtual

◆ addStructuredBlockData() [1/2]

StructuredBlockDataAdder walberla::domain_decomposition::StructuredBlockStorage::addStructuredBlockData ( const std::string &  identifier = std::string())
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( ... ) << ... ;

◆ addStructuredBlockData() [2/2]

template<typename T >
BlockDataID walberla::domain_decomposition::StructuredBlockStorage::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() 
)
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 )"

◆ atDomainMaxBorder()

bool walberla::domain_decomposition::StructuredBlockStorage::atDomainMaxBorder ( const uint_t  index,
const IBlock block 
) const
inline

◆ atDomainMinBorder()

bool walberla::domain_decomposition::StructuredBlockStorage::atDomainMinBorder ( const uint_t  index,
const IBlock block 
) const
inline

◆ atDomainXMaxBorder()

bool walberla::domain_decomposition::StructuredBlockStorage::atDomainXMaxBorder ( const IBlock block) const
inline

◆ atDomainXMinBorder()

bool walberla::domain_decomposition::StructuredBlockStorage::atDomainXMinBorder ( const IBlock block) const
inline

◆ atDomainYMaxBorder()

bool walberla::domain_decomposition::StructuredBlockStorage::atDomainYMaxBorder ( const IBlock block) const
inline

◆ atDomainYMinBorder()

bool walberla::domain_decomposition::StructuredBlockStorage::atDomainYMinBorder ( const IBlock block) const
inline

◆ atDomainZMaxBorder()

bool walberla::domain_decomposition::StructuredBlockStorage::atDomainZMaxBorder ( const IBlock block) const
inline

◆ atDomainZMinBorder()

bool walberla::domain_decomposition::StructuredBlockStorage::atDomainZMinBorder ( const IBlock block) const
inline

◆ begin() [1/2]

iterator walberla::domain_decomposition::StructuredBlockStorage::begin ( const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
inline

◆ begin() [2/2]

const_iterator walberla::domain_decomposition::StructuredBlockStorage::begin ( const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
) const
inline

◆ blockExists() [1/4]

virtual bool walberla::domain_decomposition::StructuredBlockStorage::blockExists ( const Cell cell,
const uint_t  level = 0 
) const
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.

◆ blockExists() [2/4]

bool walberla::domain_decomposition::StructuredBlockStorage::blockExists ( const IBlockID id) const
inline

◆ blockExists() [3/4]

bool walberla::domain_decomposition::StructuredBlockStorage::blockExists ( const real_t  x,
const real_t  y,
const real_t  z 
) const
inline

◆ blockExists() [4/4]

bool walberla::domain_decomposition::StructuredBlockStorage::blockExists ( const Vector3< real_t > &  p) const
inline

◆ blockExistsLocally() [1/4]

virtual bool walberla::domain_decomposition::StructuredBlockStorage::blockExistsLocally ( const Cell cell,
const uint_t  level = 0 
) const
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.

◆ blockExistsLocally() [2/4]

bool walberla::domain_decomposition::StructuredBlockStorage::blockExistsLocally ( const IBlockID id) const
inline

◆ blockExistsLocally() [3/4]

bool walberla::domain_decomposition::StructuredBlockStorage::blockExistsLocally ( const real_t  x,
const real_t  y,
const real_t  z 
) const
inline

◆ blockExistsLocally() [4/4]

bool walberla::domain_decomposition::StructuredBlockStorage::blockExistsLocally ( const Vector3< real_t > &  p) const
inline

◆ blockExistsRemotely() [1/4]

virtual bool walberla::domain_decomposition::StructuredBlockStorage::blockExistsRemotely ( const Cell cell,
const uint_t  level = 0 
) const
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.

◆ blockExistsRemotely() [2/4]

bool walberla::domain_decomposition::StructuredBlockStorage::blockExistsRemotely ( const IBlockID id) const
inline

◆ blockExistsRemotely() [3/4]

bool walberla::domain_decomposition::StructuredBlockStorage::blockExistsRemotely ( const real_t  x,
const real_t  y,
const real_t  z 
) const
inline

◆ blockExistsRemotely() [4/4]

bool walberla::domain_decomposition::StructuredBlockStorage::blockExistsRemotely ( const Vector3< real_t > &  p) const
inline

◆ clearBlockData()

void walberla::domain_decomposition::StructuredBlockStorage::clearBlockData ( const BlockDataID id)
inline

◆ containsGlobalBlockInformation()

bool walberla::domain_decomposition::StructuredBlockStorage::containsGlobalBlockInformation ( ) const
inline

◆ createCellBoundingBoxes()

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 )".

◆ deserializeBlockData()

void walberla::domain_decomposition::StructuredBlockStorage::deserializeBlockData ( const BlockDataID id,
mpi::RecvBuffer buffer 
)
inline

◆ empty()

bool walberla::domain_decomposition::StructuredBlockStorage::empty ( ) const
inline

◆ end() [1/2]

iterator walberla::domain_decomposition::StructuredBlockStorage::end ( )
inline

◆ end() [2/2]

const_iterator walberla::domain_decomposition::StructuredBlockStorage::end ( ) const
inline

◆ equal()

virtual bool walberla::domain_decomposition::StructuredBlockStorage::equal ( const StructuredBlockStorage rhs) const
protectedpure virtual

◆ getAABB() [1/2]

void walberla::domain_decomposition::StructuredBlockStorage::getAABB ( AABB &  aabb,
const IBlockID id 
) const
inline

◆ getAABB() [2/2]

AABB walberla::domain_decomposition::StructuredBlockStorage::getAABB ( const IBlockID id) const
inline

◆ getAABBFromCellBB() [1/2]

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".

◆ getAABBFromCellBB() [2/2]

AABB walberla::domain_decomposition::StructuredBlockStorage::getAABBFromCellBB ( const CellInterval cellBB,
const uint_t  level = 0 
) const
inline

For documentation see member function "void getAABBFromCellBB( AABB& aabb, const CellInterval& cellBB, const uint_t level ) const".

◆ getAllBlocks()

void walberla::domain_decomposition::StructuredBlockStorage::getAllBlocks ( std::vector< shared_ptr< IBlockID > > &  blocks) const
inline

◆ getBlock() [1/10]

IBlock * walberla::domain_decomposition::StructuredBlockStorage::getBlock ( const Cell cell,
const uint_t  level = 0 
)
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'.

◆ getBlock() [2/10]

const IBlock * walberla::domain_decomposition::StructuredBlockStorage::getBlock ( const Cell cell,
const uint_t  level = 0 
) const
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'.

◆ getBlock() [3/10]

IBlock* walberla::domain_decomposition::StructuredBlockStorage::getBlock ( const IBlockID id)
inline

◆ getBlock() [4/10]

const IBlock* walberla::domain_decomposition::StructuredBlockStorage::getBlock ( const IBlockID id) const
inline

◆ getBlock() [5/10]

IBlock* walberla::domain_decomposition::StructuredBlockStorage::getBlock ( const IBlockID::IDType id)
inline

◆ getBlock() [6/10]

const IBlock* walberla::domain_decomposition::StructuredBlockStorage::getBlock ( const IBlockID::IDType id) const
inline

◆ getBlock() [7/10]

IBlock* walberla::domain_decomposition::StructuredBlockStorage::getBlock ( const real_t  x,
const real_t  y,
const real_t  z 
)
inline

◆ getBlock() [8/10]

const IBlock* walberla::domain_decomposition::StructuredBlockStorage::getBlock ( const real_t  x,
const real_t  y,
const real_t  z 
) const
inline

◆ getBlock() [9/10]

IBlock* walberla::domain_decomposition::StructuredBlockStorage::getBlock ( const Vector3< real_t > &  p)
inline

◆ getBlock() [10/10]

const IBlock* walberla::domain_decomposition::StructuredBlockStorage::getBlock ( const Vector3< real_t > &  p) const
inline

◆ getBlockCellBB()

const CellInterval & walberla::domain_decomposition::StructuredBlockStorage::getBlockCellBB ( const IBlock block) const
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.

◆ getBlockCellBBId()

ConstBlockDataID walberla::domain_decomposition::StructuredBlockStorage::getBlockCellBBId ( ) const
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

◆ getBlockDataIdentifier()

const std::string& walberla::domain_decomposition::StructuredBlockStorage::getBlockDataIdentifier ( const ConstBlockDataID id) const
inline

◆ getBlockDataIdentifiers()

std::vector< std::string > walberla::domain_decomposition::StructuredBlockStorage::getBlockDataIdentifiers ( ) const
inline

◆ getBlockID() [1/3]

virtual void walberla::domain_decomposition::StructuredBlockStorage::getBlockID ( IBlockID id,
const Cell cell,
const uint_t  level = 0 
) const
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.

◆ getBlockID() [2/3]

void walberla::domain_decomposition::StructuredBlockStorage::getBlockID ( IBlockID id,
const real_t  x,
const real_t  y,
const real_t  z 
) const
inline

◆ getBlockID() [3/3]

void walberla::domain_decomposition::StructuredBlockStorage::getBlockID ( IBlockID id,
const Vector3< real_t > &  p 
) const
inline

◆ getBlockLocalCell() [1/4]

void walberla::domain_decomposition::StructuredBlockStorage::getBlockLocalCell ( Cell localCell,
const IBlock block,
const real_t  x,
const real_t  y,
const real_t  z 
) const
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!

◆ getBlockLocalCell() [2/4]

void walberla::domain_decomposition::StructuredBlockStorage::getBlockLocalCell ( Cell localCell,
const IBlock block,
const Vector3< real_t > &  p 
) const
inline

◆ getBlockLocalCell() [3/4]

Cell walberla::domain_decomposition::StructuredBlockStorage::getBlockLocalCell ( const IBlock block,
const real_t  x,
const real_t  y,
const real_t  z 
) const
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".

◆ getBlockLocalCell() [4/4]

Cell walberla::domain_decomposition::StructuredBlockStorage::getBlockLocalCell ( const IBlock block,
const Vector3< real_t > &  p 
) const
inline

◆ getBlockLocalCellAABB() [1/2]

AABB walberla::domain_decomposition::StructuredBlockStorage::getBlockLocalCellAABB ( const IBlock block,
const Cell localCell 
) const
inline

For documentation see member function "void getBlockLocalCellAABB( const IBlock & block, const Cell & localCell, AABB & aabb ) const".

◆ getBlockLocalCellAABB() [2/2]

void walberla::domain_decomposition::StructuredBlockStorage::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".

◆ getBlockLocalCellCenter() [1/3]

Vector3< real_t > walberla::domain_decomposition::StructuredBlockStorage::getBlockLocalCellCenter ( const IBlock block,
const Cell localCell 
) const
inline

For documentation see member function "void getBlockLocalCellCenter( const IBlock & block, const Cell & localCell, real_t & x, real_t & y, real_t & z ) const".

◆ getBlockLocalCellCenter() [2/3]

void walberla::domain_decomposition::StructuredBlockStorage::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".

◆ getBlockLocalCellCenter() [3/3]

void walberla::domain_decomposition::StructuredBlockStorage::getBlockLocalCellCenter ( const IBlock block,
const Cell localCell,
Vector3< real_t > &  p 
) const
inline

◆ getBlocks() [1/2]

void walberla::domain_decomposition::StructuredBlockStorage::getBlocks ( std::vector< const IBlock * > &  blocks) const
inline

◆ getBlocks() [2/2]

void walberla::domain_decomposition::StructuredBlockStorage::getBlocks ( std::vector< IBlock * > &  blocks)
inline

◆ getBlocksContainedWithinAABB() [1/2]

void walberla::domain_decomposition::StructuredBlockStorage::getBlocksContainedWithinAABB ( std::vector< const IBlock * > &  blocks,
const AABB &  aabb 
) const
inline

◆ getBlocksContainedWithinAABB() [2/2]

void walberla::domain_decomposition::StructuredBlockStorage::getBlocksContainedWithinAABB ( std::vector< IBlock * > &  blocks,
const AABB &  aabb 
)
inline

◆ getBlocksOverlappedByAABB() [1/2]

void walberla::domain_decomposition::StructuredBlockStorage::getBlocksOverlappedByAABB ( std::vector< const IBlock * > &  blocks,
const AABB &  aabb 
) const
inline

◆ getBlocksOverlappedByAABB() [2/2]

void walberla::domain_decomposition::StructuredBlockStorage::getBlocksOverlappedByAABB ( std::vector< IBlock * > &  blocks,
const AABB &  aabb 
)
inline

◆ getBlockStorage() [1/2]

BlockStorage& walberla::domain_decomposition::StructuredBlockStorage::getBlockStorage ( )
inline

◆ getBlockStorage() [2/2]

const BlockStorage& walberla::domain_decomposition::StructuredBlockStorage::getBlockStorage ( ) const
inline

◆ getBlockStoragePointer() [1/2]

const shared_ptr< BlockStorage >& walberla::domain_decomposition::StructuredBlockStorage::getBlockStoragePointer ( )
inline

◆ getBlockStoragePointer() [2/2]

shared_ptr< const BlockStorage > walberla::domain_decomposition::StructuredBlockStorage::getBlockStoragePointer ( ) const
inline

◆ getCell() [1/4]

void walberla::domain_decomposition::StructuredBlockStorage::getCell ( Cell cell,
const real_t  x,
const real_t  y,
const real_t  z,
const uint_t  level = 0 
) const
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'.]

◆ getCell() [2/4]

void walberla::domain_decomposition::StructuredBlockStorage::getCell ( Cell cell,
const Vector3< real_t > &  p,
const uint_t  level = 0 
) const
inline

◆ getCell() [3/4]

Cell walberla::domain_decomposition::StructuredBlockStorage::getCell ( const real_t  x,
const real_t  y,
const real_t  z,
const uint_t  level = 0 
) const
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".

◆ getCell() [4/4]

Cell walberla::domain_decomposition::StructuredBlockStorage::getCell ( const Vector3< real_t > &  p,
const uint_t  level = 0 
) const
inline

◆ getCellAABB() [1/2]

void walberla::domain_decomposition::StructuredBlockStorage::getCellAABB ( AABB &  aabb,
const Cell cell,
const uint_t  level = 0 
) const
inline

Returns the axis-aligned bounding box (with respect to the global 3D simulation space) that covers the cell "cell" on level "level".

◆ getCellAABB() [2/2]

AABB walberla::domain_decomposition::StructuredBlockStorage::getCellAABB ( const Cell cell,
const uint_t  level = 0 
) const
inline

For documentation see member function "void getCellAABB( AABB& aabb, const Cell& cell, const uint_t level ) const".

◆ getCellBBFromAABB() [1/2]

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.

◆ getCellBBFromAABB() [2/2]

CellInterval walberla::domain_decomposition::StructuredBlockStorage::getCellBBFromAABB ( const AABB &  aabb,
const uint_t  level = 0 
) const
inline

For documentation see member function "void getCellBBFromAABB( CellInterval& cellBB, const AABB& aabb, const uint_t level ) const".

◆ getCellBBFromCellAlignedAABB() [1/2]

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".

◆ getCellBBFromCellAlignedAABB() [2/2]

CellInterval walberla::domain_decomposition::StructuredBlockStorage::getCellBBFromCellAlignedAABB ( const AABB &  aabb,
const uint_t  level = 0 
) const
inline

For documentation see member function "void getCellBBFromCellAlignedAABB( CellInterval& cellBB, const AABB& aabb, const uint_t level ) const".

◆ getCellCenter() [1/3]

Vector3< real_t > walberla::domain_decomposition::StructuredBlockStorage::getCellCenter ( const Cell cell,
const uint_t  level = 0 
) 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".

◆ getCellCenter() [2/3]

void walberla::domain_decomposition::StructuredBlockStorage::getCellCenter ( real_t x,
real_t y,
real_t z,
const Cell cell,
const uint_t  level = 0 
) const
inline

Returns the location (within the global 3D simulation space) of the center of cell "cell" on level "level".

◆ getCellCenter() [3/3]

void walberla::domain_decomposition::StructuredBlockStorage::getCellCenter ( Vector3< real_t > &  p,
const Cell cell,
const uint_t  level = 0 
) const
inline

◆ getDomain()

const AABB& walberla::domain_decomposition::StructuredBlockStorage::getDomain ( ) const
inline

◆ getDomainCellBB()

const CellInterval & walberla::domain_decomposition::StructuredBlockStorage::getDomainCellBB ( const uint_t  level = 0) const
inline

the global cell coordinate space of the simulation on level "level"

◆ getLevel()

virtual uint_t walberla::domain_decomposition::StructuredBlockStorage::getLevel ( const IBlock block) const
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.

◆ getNeighboringProcesses()

const std::vector< uint_t >& walberla::domain_decomposition::StructuredBlockStorage::getNeighboringProcesses ( ) const
inline

◆ getNeighboringProcessOffsets()

std::map< uint_t, std::vector< Vector3<real_t> > > walberla::domain_decomposition::StructuredBlockStorage::getNeighboringProcessOffsets ( ) const
inline

◆ getNumberOfBlocks()

uint_t walberla::domain_decomposition::StructuredBlockStorage::getNumberOfBlocks ( ) const
inline

◆ getNumberOfCells() [1/2]

virtual uint_t walberla::domain_decomposition::StructuredBlockStorage::getNumberOfCells ( const IBlock block,
const uint_t  index 
) const
pure virtual

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

Implemented in walberla::blockforest::StructuredBlockForest.

◆ getNumberOfCells() [2/2]

uint_t walberla::domain_decomposition::StructuredBlockStorage::getNumberOfCells ( const uint_t  index,
const uint_t  level = 0 
) const
inline

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

◆ getNumberOfLevels()

uint_t walberla::domain_decomposition::StructuredBlockStorage::getNumberOfLevels ( ) const
inline

◆ getNumberOfXCells() [1/2]

virtual uint_t walberla::domain_decomposition::StructuredBlockStorage::getNumberOfXCells ( const IBlock block) const
pure virtual

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

Implemented in walberla::blockforest::StructuredBlockForest.

◆ getNumberOfXCells() [2/2]

uint_t walberla::domain_decomposition::StructuredBlockStorage::getNumberOfXCells ( const uint_t  level = 0) const
inline

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

◆ getNumberOfYCells() [1/2]

virtual uint_t walberla::domain_decomposition::StructuredBlockStorage::getNumberOfYCells ( const IBlock block) const
pure virtual

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

Implemented in walberla::blockforest::StructuredBlockForest.

◆ getNumberOfYCells() [2/2]

uint_t walberla::domain_decomposition::StructuredBlockStorage::getNumberOfYCells ( const uint_t  level = 0) const
inline

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

◆ getNumberOfZCells() [1/2]

virtual uint_t walberla::domain_decomposition::StructuredBlockStorage::getNumberOfZCells ( const IBlock block) const
pure virtual

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

Implemented in walberla::blockforest::StructuredBlockForest.

◆ getNumberOfZCells() [2/2]

uint_t walberla::domain_decomposition::StructuredBlockStorage::getNumberOfZCells ( const uint_t  level = 0) const
inline

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

◆ getProcessRank() [1/2]

uint_t walberla::domain_decomposition::StructuredBlockStorage::getProcessRank ( const IBlockID id) const
inline

◆ getProcessRank() [2/2]

void walberla::domain_decomposition::StructuredBlockStorage::getProcessRank ( uint_t rank,
const IBlockID id 
) const
inline

◆ getState() [1/2]

Set<SUID> walberla::domain_decomposition::StructuredBlockStorage::getState ( const IBlockID id) const
inline

◆ getState() [2/2]

void walberla::domain_decomposition::StructuredBlockStorage::getState ( Set< SUID > &  state,
const IBlockID id 
) const
inline

◆ initializeCellBoundingBox()

CellInterval * walberla::domain_decomposition::StructuredBlockStorage::initializeCellBoundingBox ( IBlock *const  block) const
protected

◆ isCellAlignedAABB()

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".

◆ isPeriodic()

bool walberla::domain_decomposition::StructuredBlockStorage::isPeriodic ( const uint_t  index) const
inline

◆ isXPeriodic()

bool walberla::domain_decomposition::StructuredBlockStorage::isXPeriodic ( ) const
inline

◆ isYPeriodic()

bool walberla::domain_decomposition::StructuredBlockStorage::isYPeriodic ( ) const
inline

◆ isZPeriodic()

bool walberla::domain_decomposition::StructuredBlockStorage::isZPeriodic ( ) const
inline

◆ loadBlockData()

template<typename T >
BlockDataID walberla::domain_decomposition::StructuredBlockStorage::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

◆ mapToPeriodicDomain() [1/3]

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.

◆ mapToPeriodicDomain() [2/3]

void walberla::domain_decomposition::StructuredBlockStorage::mapToPeriodicDomain ( real_t x,
real_t y,
real_t z 
) const
inline

◆ mapToPeriodicDomain() [3/3]

void walberla::domain_decomposition::StructuredBlockStorage::mapToPeriodicDomain ( Vector3< real_t > &  p) const
inline

◆ numberOfBlockDataItems()

uint_t walberla::domain_decomposition::StructuredBlockStorage::numberOfBlockDataItems ( ) const
inline

◆ operator!=()

bool walberla::domain_decomposition::StructuredBlockStorage::operator!= ( const StructuredBlockStorage rhs) const
inline

◆ operator==()

bool walberla::domain_decomposition::StructuredBlockStorage::operator== ( const StructuredBlockStorage rhs) const
inline

The following members are not used for checking if two StructuredBlockStorage objects are equal: blockCellBBId_.

◆ periodicIntersect() [1/2]

bool walberla::domain_decomposition::StructuredBlockStorage::periodicIntersect ( const math::AABB box1,
const math::AABB box2 
) const
inline

◆ periodicIntersect() [2/2]

bool walberla::domain_decomposition::StructuredBlockStorage::periodicIntersect ( const math::AABB box1,
const math::AABB box2,
const real_t  _dx 
) const
inline

◆ resetCellDecomposition()

void walberla::domain_decomposition::StructuredBlockStorage::resetCellDecomposition ( const std::vector< uint_t > &  xCells,
const std::vector< uint_t > &  yCells,
const std::vector< uint_t > &  zCells 
)
protected

◆ saveBlockData()

void walberla::domain_decomposition::StructuredBlockStorage::saveBlockData ( const std::string &  file,
const BlockDataID id 
)
inline

◆ serializeBlockData()

void walberla::domain_decomposition::StructuredBlockStorage::serializeBlockData ( const BlockDataID id,
mpi::SendBuffer buffer 
)
inline

◆ size()

uint_t walberla::domain_decomposition::StructuredBlockStorage::size ( ) const
inline

◆ transformBlockLocalToGlobal() [1/2]

void walberla::domain_decomposition::StructuredBlockStorage::transformBlockLocalToGlobal ( Vector3< real_t > &  global,
const IBlock block,
const Vector3< real_t > &  local 
) const
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).

◆ transformBlockLocalToGlobal() [2/2]

void walberla::domain_decomposition::StructuredBlockStorage::transformBlockLocalToGlobal ( Vector3< real_t > &  point,
const IBlock block 
) const
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).

◆ transformBlockLocalToGlobalCell() [1/2]

void walberla::domain_decomposition::StructuredBlockStorage::transformBlockLocalToGlobalCell ( Cell cell,
const IBlock block 
) const
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).

◆ transformBlockLocalToGlobalCell() [2/2]

void walberla::domain_decomposition::StructuredBlockStorage::transformBlockLocalToGlobalCell ( Cell global,
const IBlock block,
const Cell local 
) const
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).

◆ transformBlockLocalToGlobalCellInterval() [1/2]

void walberla::domain_decomposition::StructuredBlockStorage::transformBlockLocalToGlobalCellInterval ( CellInterval global,
const IBlock block,
const CellInterval local 
) const
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).

◆ transformBlockLocalToGlobalCellInterval() [2/2]

void walberla::domain_decomposition::StructuredBlockStorage::transformBlockLocalToGlobalCellInterval ( CellInterval interval,
const IBlock block 
) const
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).

◆ transformGlobalToBlockLocal() [1/2]

void walberla::domain_decomposition::StructuredBlockStorage::transformGlobalToBlockLocal ( Vector3< real_t > &  local,
const IBlock block,
const Vector3< real_t > &  global 
) const
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".

◆ transformGlobalToBlockLocal() [2/2]

void walberla::domain_decomposition::StructuredBlockStorage::transformGlobalToBlockLocal ( Vector3< real_t > &  point,
const IBlock block 
) const
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.

◆ transformGlobalToBlockLocalCell() [1/2]

void walberla::domain_decomposition::StructuredBlockStorage::transformGlobalToBlockLocalCell ( Cell cell,
const IBlock block 
) const
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.

◆ transformGlobalToBlockLocalCell() [2/2]

void walberla::domain_decomposition::StructuredBlockStorage::transformGlobalToBlockLocalCell ( Cell local,
const IBlock block,
const Cell global 
) const
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".

◆ transformGlobalToBlockLocalCellInterval() [1/2]

void walberla::domain_decomposition::StructuredBlockStorage::transformGlobalToBlockLocalCellInterval ( CellInterval interval,
const IBlock block 
) const
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.

◆ transformGlobalToBlockLocalCellInterval() [2/2]

void walberla::domain_decomposition::StructuredBlockStorage::transformGlobalToBlockLocalCellInterval ( CellInterval local,
const IBlock block,
const CellInterval global 
) const
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".

Friends And Related Function Documentation

◆ CellBoundingBoxHandling

friend class CellBoundingBoxHandling
friend

Member Data Documentation

◆ blockCellBBCreated_

bool walberla::domain_decomposition::StructuredBlockStorage::blockCellBBCreated_
private

flag for checking whether or not a cell bounding box has already been added as a block data "item" to all blocks

◆ blockCellBBId_

BlockDataID walberla::domain_decomposition::StructuredBlockStorage::blockCellBBId_
private

block data ID for accessing a block's cell bounding box

◆ blockStorage_

shared_ptr<BlockStorage> walberla::domain_decomposition::StructuredBlockStorage::blockStorage_
private

reference to an encapsulated object of type class BlockStorage (the object itself must be stored as a member in the derived class)

◆ domainCellBB_

std::vector< CellInterval > walberla::domain_decomposition::StructuredBlockStorage::domainCellBB_
private

cell bounding box for the entire simulation domain for every level (always starts at (0,0,0)) [min & max included!]

◆ dx_

std::vector< real_t > walberla::domain_decomposition::StructuredBlockStorage::dx_
private

for every level: ( domain x width ) / ( number of cells in x direction )

◆ dy_

std::vector< real_t > walberla::domain_decomposition::StructuredBlockStorage::dy_
private

for every level: ( domain y width ) / ( number of cells in y direction )

◆ dz_

std::vector< real_t > walberla::domain_decomposition::StructuredBlockStorage::dz_
private

for every level: ( domain z width ) / ( number of cells in z direction )

◆ levels_

uint_t walberla::domain_decomposition::StructuredBlockStorage::levels_
private

number of different grid levels managed by this block storage (every grid level has its own cell size dx/dy/dz)


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