Base class for block storage data structures (the entire simulation space is partitioned into blocks [see class 'IBlock'], and block storage data structures manage these blocks)
The class 'BlockStorage' already provides some basic functionality that every block storage data structure will possess - regardless of the actual implementation of any derived class. Every block storage data structure ...
'BlockStorage' also acts as an interface class which requires every derived class to implement a set of functions that can be used to retrieve locally allocated blocks that match certain criteria (for example all blocks that are contained within a certain region of the simulation space). For more information on which functions must be implemented by a derived class refer to the documentation of the public interface of 'BlockStorage'.
#include <BlockStorage.h>
Classes | |
class | const_iterator |
class | iterator |
Public Types | |
using | BlockContainerType = std::map< IBlockID::IDType, IBlock * > |
Public Member Functions | |
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 |
For documentation, see documentation of free function 'void mapPointToPeriodicDomain( const std::array< bool, 3 > & periodic, const AABB & domain, real_t & x, real_t & y, real_t & z )'. More... | |
void | mapToPeriodicDomain (Vector3< real_t > &p) const |
bool | periodicIntersect (const math::AABB &box1, const math::AABB &box2) const |
For documentation, see documentation of free function 'bool periodicIntersect( const std::array< bool, 3 > & periodic, const math::AABB & domain, const math::AABB & box1, const math::AABB & box2 )'. More... | |
bool | periodicIntersect (const math::AABB &box1, const math::AABB &box2, const real_t dx) const |
For documentation, see documentation of free function 'bool periodicIntersect( const std::array< bool, 3 > & periodic, const math::AABB & domain, const math::AABB & box1, const math::AABB & box2 )'. More... | |
bool | operator== (const BlockStorage &rhs) const |
The following members are not used for checking if two BlockStorage objects are equal: iBlocks_. More... | |
bool | operator!= (const BlockStorage &rhs) const |
iterator | begin (const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet()) |
iterator for traversing all locally allocated blocks More... | |
const_iterator | begin (const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet()) const |
iterator for traversing all locally allocated blocks More... | |
bool | empty () const |
void | getBlocks (std::vector< const IBlock * > &blocks) const |
inserts all locally allocated blocks into vector 'blocks' More... | |
void | getBlocks (std::vector< IBlock * > &blocks) |
inserts all locally allocated blocks into vector 'blocks' More... | |
virtual void | getBlocksContainedWithinAABB (std::vector< const IBlock * > &blocks, const AABB &aabb) const =0 |
Calling this function causes all locally allocated blocks that are completely contained within the axis-aligned bounding box 'aabb' to be inserted at the end of vector 'blocks'. More... | |
virtual void | getBlocksContainedWithinAABB (std::vector< IBlock * > &blocks, const AABB &aabb)=0 |
Calling this function causes all locally allocated blocks that are completely contained within the axis-aligned bounding box 'aabb' to be inserted at the end of vector 'blocks'. More... | |
virtual void | getBlocksOverlappedByAABB (std::vector< const IBlock * > &blocks, const AABB &aabb) const =0 |
Calling this function causes all locally allocated blocks that intersect with the axis-aligned bounding box 'aabb' to be inserted at the end of vector 'blocks'. More... | |
virtual void | getBlocksOverlappedByAABB (std::vector< IBlock * > &blocks, const AABB &aabb)=0 |
Calling this function causes all locally allocated blocks that intersect with the axis-aligned bounding box 'aabb' to be inserted at the end of vector 'blocks'. More... | |
virtual const IBlock * | getBlock (const IBlockID &id) const =0 |
Returns the block associated with block ID 'id' (returns 'NULL' if the block doesn't exist locally!). More... | |
const IBlock * | getBlock (const IBlockID::IDType &id) const |
virtual IBlock * | getBlock (const IBlockID &id)=0 |
Returns the block associated with block ID 'id' (returns 'NULL' if the block doesn't exist locally!). More... | |
IBlock * | getBlock (const IBlockID::IDType &id) |
virtual const IBlock * | getBlock (const real_t x, const real_t y, const real_t z) const =0 |
Returns the block located at position (x,y,z) (returns 'NULL' if the block doesn't exist locally!). More... | |
const IBlock * | getBlock (const Vector3< real_t > &p) const |
virtual IBlock * | getBlock (const real_t x, const real_t y, const real_t z)=0 |
Returns the block located at position (x,y,z) (returns 'NULL' if the block doesn't exist locally!). More... | |
IBlock * | getBlock (const Vector3< real_t > &p) |
virtual bool | containsGlobalBlockInformation () const =0 |
Indicates whether or not information about remote blocks (blocks that reside on other processes) is available. More... | |
virtual void | getAllBlocks (std::vector< shared_ptr< IBlockID > > &blocks) const =0 |
Returns the block ID of every block in the simulation (global and remote). More... | |
virtual bool | blockExists (const real_t x, const real_t y, const real_t z) const =0 |
Returns true if there exists a block at position (x,y,z) [Periodicity is not considered! For mapping points to the periodic simulation space see 'mapToPeriodicDomain'. More... | |
bool | blockExists (const Vector3< real_t > &p) const |
virtual bool | blockExistsLocally (const real_t x, const real_t y, const real_t z) const =0 |
Returns true if locally there exists a block at position (x,y,z) [Periodicity is not considered! For mapping points to the periodic simulation space see 'mapToPeriodicDomain'. More... | |
bool | blockExistsLocally (const Vector3< real_t > &p) const |
virtual bool | blockExistsRemotely (const real_t x, const real_t y, const real_t z) const =0 |
Returns true if remotely there exists a block at position (x,y,z) [Periodicity is not considered! For mapping points to the periodic simulation space see 'mapToPeriodicDomain'. More... | |
bool | blockExistsRemotely (const Vector3< real_t > &p) const |
virtual bool | blockExists (const IBlockID &id) const =0 |
Returns true if there exists a block with block ID 'id'. More... | |
virtual bool | blockExistsLocally (const IBlockID &id) const =0 |
Returns true if locally there exists a block with block ID 'id'. More... | |
virtual bool | blockExistsRemotely (const IBlockID &id) const =0 |
Returns true if remotely there exists a block with block ID 'id'. More... | |
virtual void | getBlockID (IBlockID &id, const real_t x, const real_t y, const real_t z) const =0 |
Returns the block ID that corresponds to the block located at position (x,y,z) [Periodicity is not considered! For mapping points to the periodic simulation space see 'mapToPeriodicDomain'. More... | |
void | getBlockID (IBlockID &id, const Vector3< real_t > &p) const |
virtual uint_t | getLevel (const IBlock &) const |
must return the level the block "block" is assigned to (must be an unsigned integer in the range [0,'number-of-levels') ) More... | |
virtual void | getAABB (AABB &aabb, const IBlockID &id) const =0 |
Returns the axis-aligned bounding box that corresponds to the block with ID 'id'. More... | |
AABB | getAABB (const IBlockID &id) const |
virtual void | getState (Set< SUID > &state, const IBlockID &id) const =0 |
Returns the block state that corresponds to the block with ID 'id'. More... | |
Set< SUID > | getState (const IBlockID &id) const |
virtual void | getProcessRank (uint_t &rank, const IBlockID &id) const =0 |
Returns the rank of the process the block with ID 'id' resides on. More... | |
uint_t | getProcessRank (const IBlockID &id) const |
bool | atDomainXMinBorder (const IBlock &block) const |
Returns true if the block 'block' is located at the lower x-axis border of the domain. More... | |
bool | atDomainXMaxBorder (const IBlock &block) const |
Returns true if the block 'block' is located at the upper x-axis border of the domain. More... | |
bool | atDomainYMinBorder (const IBlock &block) const |
Returns true if the block 'block' is located at the lower y-axis border of the domain. More... | |
bool | atDomainYMaxBorder (const IBlock &block) const |
Returns true if the block 'block' is located at the upper y-axis border of the domain. More... | |
bool | atDomainZMinBorder (const IBlock &block) const |
Returns true if the block 'block' is located at the lower z-axis border of the domain. More... | |
bool | atDomainZMaxBorder (const IBlock &block) const |
Returns true if the block 'block' is located at the upper z-axis border of the domain. More... | |
bool | atDomainMinBorder (const uint_t index, const IBlock &block) const |
bool | atDomainMaxBorder (const uint_t index, const IBlock &block) const |
virtual const std::vector< uint_t > & | getNeighboringProcesses () const =0 |
Returns all neighboring process IDs. More... | |
virtual std::map< uint_t, std::vector< Vector3< real_t > > > | getNeighboringProcessOffsets () const =0 |
For every neighboring process one or more offsets must be returned. More... | |
internal::BlockDataHandlingAdder | addBlockData (const std::string &identifier=std::string()) |
Must be used if multiple block data handling objects with different selection attributes are registered for initializing the same block data "item". More... | |
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()) |
This function can be used for initializing a new block data "item". More... | |
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()) |
This function can be used for initializing a new block data "item". More... | |
BlockDataID | addBlockData (const internal::SelectableBlockDataHandlingWrapper &dataHandling, const std::string &identifier=std::string()) |
After registering one/multiple block data handling objects, this function is called for actually adding data to the blocks. More... | |
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()) |
This function can be used for initializing a new block data "item" by loading the data from file. More... | |
BlockDataID | loadBlockData (const std::string &file, const internal::SelectableBlockDataHandlingWrapper &dataHandling, const std::string &identifier=std::string()) |
After registering one/multiple block data handling objects, this function is called for actually adding data to the blocks by loading the data from file. More... | |
void | saveBlockData (const std::string &file, const BlockDataID &id) |
This function can be used to store the data that corresponds to 'id' to file, so that later (probably when restarting a simulation) the data can be loaded by using the member function 'loadBlockData'. More... | |
void | serializeBlockData (const BlockDataID &id, mpi::SendBuffer &buffer) |
This function serializes the block data into a sendbuffer. More... | |
void | deserializeBlockData (const BlockDataID &id, mpi::RecvBuffer &buffer) |
Deserializes data form a recv buffer into existing block data Only deserialize data, that has be serialized with serializeBlockData. More... | |
void | clearBlockData (const BlockDataID &id) |
This function can be used for removing all data that corresponds to block data ID 'id'. More... | |
uint_t | numberOfBlockDataItems () const |
std::vector< std::string > | getBlockDataIdentifiers () const |
const std::string & | getBlockDataIdentifier (const ConstBlockDataID &id) const |
void | rebuildProcessesWithBlocksCommunicator () |
MPI_Comm | processesWithBlocksCommunicator () |
Returns a MPI communicator that only contains processes that possess blocks. More... | |
Protected Member Functions | |
BlockStorage (const AABB &domain, const bool xPeriodic, const bool yPeriodic, const bool zPeriodic) | |
Every derived class must call this constructor! More... | |
virtual | ~BlockStorage () |
Must not be made public! No one should be allowed to delete a variable of type 'BlockStorage*'. More... | |
virtual bool | equal (const BlockStorage *rhs) const =0 |
void | addBlockData (IBlock *const block, const BlockDataID &index, internal::BlockData *const data) |
Protected Attributes | |
AABB | domain_ |
axis-aligned bounding box for the entire simulation space/domain More... | |
bool | periodic_ [3] |
periodicity flags More... | |
std::vector< internal::BlockDataItem > | blockDataItem_ |
Private Member Functions | |
BlockStorage () | |
Must not be made public or protected! Derived classes must call one of the available public/protected constructors. More... | |
void | registerBlock (const std::pair< IBlockID::IDType, IBlock * > &block) |
This function is called every time a new local block that belongs to this block storage data structure is created (see the constructor of 'IBlock'). More... | |
void | removeBlock (const IBlock *block) |
This function is called every time a block that belongs to this block storage data structure is destroyed (see the destructor of 'IBlock'). More... | |
void | removeBlock (const IBlockID::IDType &blockID) |
This function is called every time a block that belongs to this block storage data structure is destroyed (see the destructor of 'IBlock'). More... | |
Private Member Functions inherited from walberla::NonCopyable | |
NonCopyable ()=default | |
~NonCopyable ()=default | |
Private Attributes | |
BlockContainerType | iBlocks_ |
holds pointers to all locally allocated blocks More... | |
bool | rebuildProcessesWithBlocksCommunicator_ |
MPI_Comm | processesWithBlocksCommunicator_ |
MPI communicator that only contains processes that possess blocks. More... | |
Friends | |
class | IBlock |
class | StructuredBlockStorage |
using walberla::domain_decomposition::BlockStorage::BlockContainerType = std::map<IBlockID::IDType, IBlock *> |
|
inlineprotected |
Every derived class must call this constructor!
|
inlineprotectedvirtual |
Must not be made public! No one should be allowed to delete a variable of type 'BlockStorage*'.
|
private |
Must not be made public or protected! Derived classes must call one of the available public/protected constructors.
BlockDataID walberla::domain_decomposition::BlockStorage::addBlockData | ( | const internal::SelectableBlockDataHandlingWrapper & | dataHandling, |
const std::string & | identifier = std::string() |
||
) |
After registering one/multiple block data handling objects, this function is called for actually adding data to the blocks.
|
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 block data handling objects with different selection attributes shall be used for initializing the same block data "item" see member function "addBlockData( const std::string & identifier )"
|
inline |
Must be used if multiple block data handling objects with different selection attributes are registered for initializing the same block data "item".
A 'BlockDataID' that corresponds to this block data "item" is returned.
Usage: BlockDataID id = blockStorage.addBlockData( "[optional block data identifier]" ) << BlockDataCreator( ... ) << BlockDataCreator( ... ) << ... ;
|
inlineprotected |
|
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 "addBlockData( const std::string & identifier )"
|
inline |
|
inline |
|
inline |
Returns true if the block 'block' is located at the upper x-axis border of the domain.
|
inline |
Returns true if the block 'block' is located at the lower x-axis border of the domain.
|
inline |
Returns true if the block 'block' is located at the upper y-axis border of the domain.
|
inline |
Returns true if the block 'block' is located at the lower y-axis border of the domain.
|
inline |
Returns true if the block 'block' is located at the upper z-axis border of the domain.
|
inline |
Returns true if the block 'block' is located at the lower z-axis border of the domain.
|
inline |
iterator for traversing all locally allocated blocks
|
inline |
iterator for traversing all locally allocated blocks
|
pure virtual |
Returns true if there exists a block with block ID 'id'.
This member function is guaranteed to work properly only if 'containsGlobalBlockInformation() == true'.
Implemented in walberla::blockforest::BlockForest.
|
pure virtual |
Returns true if there exists a block at position (x,y,z) [Periodicity is not considered! For mapping points to the periodic simulation space see 'mapToPeriodicDomain'.
]. This member function is guaranteed to work properly only if 'containsGlobalBlockInformation() == true'.
Implemented in walberla::blockforest::BlockForest.
|
inline |
|
pure virtual |
Returns true if locally there exists a block with block ID 'id'.
This member function is always guaranteed to work properly, even if 'containsGlobalBlockInformation() == false'.
Implemented in walberla::blockforest::BlockForest.
|
pure virtual |
Returns true if locally there exists a block at position (x,y,z) [Periodicity is not considered! For mapping points to the periodic simulation space see 'mapToPeriodicDomain'.
]. This member function is always guaranteed to work properly, even if 'containsGlobalBlockInformation() == false'.
Implemented in walberla::blockforest::BlockForest.
|
inline |
|
pure virtual |
Returns true if remotely there exists a block with block ID 'id'.
This member function is guaranteed to work properly only if 'containsGlobalBlockInformation() == true'.
Implemented in walberla::blockforest::BlockForest.
|
pure virtual |
Returns true if remotely there exists a block at position (x,y,z) [Periodicity is not considered! For mapping points to the periodic simulation space see 'mapToPeriodicDomain'.
]. This member function is guaranteed to work properly only if 'containsGlobalBlockInformation() == true'.
Implemented in walberla::blockforest::BlockForest.
|
inline |
|
inline |
This function can be used for removing all data that corresponds to block data ID 'id'.
Please note: The block data ID 'id' will still be valid, but blocks won't return anything anymore, they will only return NULL for 'id'.
|
pure virtual |
Indicates whether or not information about remote blocks (blocks that reside on other processes) is available.
This information includes the process rank, the state, and the axis-aligned bounding box of any block (local or remote).
Implemented in walberla::blockforest::BlockForest.
void walberla::domain_decomposition::BlockStorage::deserializeBlockData | ( | const BlockDataID & | id, |
mpi::RecvBuffer & | buffer | ||
) |
Deserializes data form a recv buffer into existing block data Only deserialize data, that has be serialized with serializeBlockData.
|
inline |
|
protectedpure virtual |
Implemented in walberla::blockforest::BlockForest.
|
pure virtual |
Returns the axis-aligned bounding box that corresponds to the block with ID 'id'.
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, the simulation must be aborted and the call to this function must not return!
Implemented in walberla::blockforest::BlockForest.
|
inline |
|
pure virtual |
Returns the block ID of every block in the simulation (global and remote).
This member function is guaranteed to work properly only if 'containsGlobalBlockInformation() == true'.
Implemented in walberla::blockforest::BlockForest.
|
pure virtual |
Returns the block associated with block ID 'id' (returns 'NULL' if the block doesn't exist locally!).
The behavior of this function is identical to:
Implemented in walberla::blockforest::BlockForest.
|
pure virtual |
Returns the block associated with block ID 'id' (returns 'NULL' if the block doesn't exist locally!).
The behavior of this function is identical to:
Implemented in walberla::blockforest::BlockForest.
|
inline |
|
inline |
|
pure virtual |
Returns the block located at position (x,y,z) (returns 'NULL' if the block doesn't exist locally!).
The behavior of this function is identical to:
Periodicity is not considered! For mapping points to the periodic simulation space see 'mapToPeriodicDomain'.
Implemented in walberla::blockforest::BlockForest.
|
pure virtual |
Returns the block located at position (x,y,z) (returns 'NULL' if the block doesn't exist locally!).
The behavior of this function is identical to:
Periodicity is not considered! For mapping points to the periodic simulation space see 'mapToPeriodicDomain'.
Implemented in walberla::blockforest::BlockForest.
|
inline |
|
inline |
|
inline |
|
inline |
|
pure virtual |
Returns the block ID that corresponds to the block located at position (x,y,z) [Periodicity is not considered! For mapping points 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 at location (x,y,z)), the simulation must be aborted and the call to this function must not return!
Implemented in walberla::blockforest::BlockForest.
|
inline |
|
inline |
inserts all locally allocated blocks into vector 'blocks'
|
inline |
inserts all locally allocated blocks into vector 'blocks'
|
pure virtual |
Calling this function causes all locally allocated blocks that are completely contained within the axis-aligned bounding box 'aabb' to be inserted at the end of vector 'blocks'.
The behavior of this function is identical to:
Implemented in walberla::blockforest::BlockForest.
|
pure virtual |
Calling this function causes all locally allocated blocks that are completely contained within the axis-aligned bounding box 'aabb' to be inserted at the end of vector 'blocks'.
The behavior of this function is identical to:
Implemented in walberla::blockforest::BlockForest.
|
pure virtual |
Calling this function causes all locally allocated blocks that intersect with the axis-aligned bounding box 'aabb' to be inserted at the end of vector 'blocks'.
The behavior of this function is identical to:
Implemented in walberla::blockforest::BlockForest.
|
pure virtual |
Calling this function causes all locally allocated blocks that intersect with the axis-aligned bounding box 'aabb' to be inserted at the end of vector 'blocks'.
The behavior of this function is identical to:
Implemented in walberla::blockforest::BlockForest.
|
inlinevirtual |
must return the level the block "block" is assigned to (must be an unsigned integer in the range [0,'number-of-levels') )
Reimplemented in walberla::blockforest::BlockForest.
|
pure virtual |
Returns all neighboring process IDs.
Implemented in walberla::blockforest::BlockForest.
|
pure virtual |
For every neighboring process one or more offsets must be returned.
Normally, for every neighboring process exactly one offset is returned: (0,0,0). Only in case of periodicity this offset can be different from (0,0,0)! If the offset is different from (0,0,0), the x-component must be identical to either 0 or +/- the x-width of the domain. The same applies for y and z. What this offset is supposed to do: Each block in 3D has 26 neighborhood regions. Suppose we leave block A in direction (-1,0,0) and enter the neighboring block B, which is stored on another process. If A is located at the x-min border of the domain and the simulation is only periodic in x-direction, block B must be located at the x-max border of the domain and the corresponding offset to block B - or more precisely to the process storing block B - is (+ x-width of the domain, 0, 0). Since each process can store multiple blocks and a simulation can be periodic in more than just one direction, there may be multiple offsets to another process - hence the std::vector. For an actual implementation of "getNeighboringProcessOffsets()" see BlockForest.cpp.
Implemented in walberla::blockforest::BlockForest.
|
inline |
|
pure virtual |
Returns the rank of the process the block with ID 'id' resides on.
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, the simulation must be aborted and the call to this function must not return!
Implemented in walberla::blockforest::BlockForest.
|
inline |
|
pure virtual |
Returns the block state that corresponds to the block with ID 'id'.
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, the simulation must be aborted and the call to this function must not return!
Implemented in walberla::blockforest::BlockForest.
|
inline |
|
inline |
|
inline |
|
inline |
BlockDataID walberla::domain_decomposition::BlockStorage::loadBlockData | ( | const std::string & | file, |
const internal::SelectableBlockDataHandlingWrapper & | dataHandling, | ||
const std::string & | identifier = std::string() |
||
) |
After registering one/multiple block data handling objects, this function is called for actually adding data to the blocks by loading the data from file.
ATTENTION: If the data was previously saved to file during a parallel run, the current run must also be in parallel with the exact same block structure (same blocks, same block states, etc.) and the same number of processes. Analogously, data saved during a serial run can only be loaded during another serial run.
|
inline |
This function can be used for initializing a new block data "item" by loading the data from file.
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').
void walberla::domain_decomposition::BlockStorage::mapToPeriodicDomain | ( | real_t & | x, |
real_t & | y, | ||
real_t & | z | ||
) | const |
For documentation, see documentation of free function 'void mapPointToPeriodicDomain( const std::array< bool, 3 > & periodic, const AABB & domain, real_t & x, real_t & y, real_t & z )'.
|
inline |
|
inline |
|
inline |
|
inline |
The following members are not used for checking if two BlockStorage objects are equal: iBlocks_.
bool walberla::domain_decomposition::BlockStorage::periodicIntersect | ( | const math::AABB & | box1, |
const math::AABB & | box2 | ||
) | const |
For documentation, see documentation of free function 'bool periodicIntersect( const std::array< bool, 3 > & periodic, const math::AABB & domain, const math::AABB & box1, const math::AABB & box2 )'.
bool walberla::domain_decomposition::BlockStorage::periodicIntersect | ( | const math::AABB & | box1, |
const math::AABB & | box2, | ||
const real_t | dx | ||
) | const |
For documentation, see documentation of free function 'bool periodicIntersect( const std::array< bool, 3 > & periodic, const math::AABB & domain, const math::AABB & box1, const math::AABB & box2 )'.
MPI_Comm walberla::domain_decomposition::BlockStorage::processesWithBlocksCommunicator | ( | ) |
Returns a MPI communicator that only contains processes that possess blocks.
ATTENTION: This function must always be called by ALL processes, otherwise the mpi::allGather call will stall! Also, the MPI communicator returned by this function must not be stored outside of this BlockStorage class. Every time a MPI communicator that only contains processes that possess blocks is needed, this member function of class BlockStorage must be called - only by doing so you are guaranteed to receive a valid MPI communicator. If blocks have moved between processes, an updated MPI communicator will be returned, otherwise a still valid, internally stored communicator is returned.
|
inline |
|
inlineprivate |
This function is called every time a new local block that belongs to this block storage data structure is created (see the constructor of 'IBlock').
By doing so, the base class 'BlockStorage' is able to provide iterators for traversing all locally allocated blocks.
|
inlineprivate |
This function is called every time a block that belongs to this block storage data structure is destroyed (see the destructor of 'IBlock').
By doing so, the base class 'BlockStorage' is able to provide iterators for traversing all locally allocated blocks.
|
inlineprivate |
This function is called every time a block that belongs to this block storage data structure is destroyed (see the destructor of 'IBlock').
By doing so, the base class 'BlockStorage' is able to provide iterators for traversing all locally allocated blocks.
void walberla::domain_decomposition::BlockStorage::saveBlockData | ( | const std::string & | file, |
const BlockDataID & | id | ||
) |
This function can be used to store the data that corresponds to 'id' to file, so that later (probably when restarting a simulation) the data can be loaded by using the member function 'loadBlockData'.
void walberla::domain_decomposition::BlockStorage::serializeBlockData | ( | const BlockDataID & | id, |
mpi::SendBuffer & | buffer | ||
) |
This function serializes the block data into a sendbuffer.
|
friend |
|
friend |
|
protected |
|
protected |
axis-aligned bounding box for the entire simulation space/domain
|
private |
holds pointers to all locally allocated blocks
|
protected |
periodicity flags
|
private |
MPI communicator that only contains processes that possess blocks.
|
private |