|
waLBerla 7.2
|
#include <SetupBlockForest.h>
Inheritance diagram for walberla::blockforest::SetupBlockForest:Classes | |
| class | const_iterator |
| class | iterator |
| class | RootBlockAABB |
Public Types | |
| using | TargetProcessAssignmentFunction = std::function<uint_t (SetupBlockForest &, const uint_t, const memory_t)> |
| using | RootBlockExclusionFunction = std::function<void (std::vector<uint8_t> &, const RootBlockAABB &)> |
| using | BlockExclusionFunction = std::function<bool (const SetupBlock &)> |
| using | RefinementSelectionFunction = std::function<void (SetupBlockForest &)> |
| using | WorkloadMemorySUIDAssignmentFunction = std::function<void (SetupBlockForest &)> |
| using | CommunicationPairs = std::vector<std::pair<const SetupBlock *, const SetupBlock *>> |
| using | CommunicationWeights = std::vector<real_t> |
| using | CommunicationWeightFunction = std::function<void (const CommunicationPairs &, CommunicationWeights &)> |
Public Member Functions | |
| SetupBlockForest () | |
| ~SetupBlockForest () | |
| const AABB & | getDomain () const |
| real_t | getRootBlockXSize () const |
| real_t | getRootBlockYSize () const |
| real_t | getRootBlockZSize () const |
| real_t | getRootBlockSize (const uint_t index) const |
| uint_t | getXSize () const |
| uint_t | getYSize () const |
| uint_t | getZSize () const |
| uint_t | getSize (const uint_t index) const |
| bool | isXPeriodic () const |
| bool | isYPeriodic () const |
| bool | isZPeriodic () const |
| bool | isPeriodic (const uint_t index) const |
| uint_t | getDepth () const |
| uint_t | getNumberOfLevels () const |
| uint_t | getMinLevel () const |
| uint_t | getMaxLevel () const |
| uint_t | getTreeIdDigits () const |
| uint_t | getBlockIdBytes () const |
| uint_t | getNumberOfTrees () const |
| uint_t | getNumberOfRootBlocks () const |
| uint_t | getNumberOfBlocks () const |
| uint_t | getNumberOfBlocks (const uint_t level) const |
| const_iterator | begin () const |
| const_iterator | end () const |
| iterator | begin () |
| iterator | end () |
| const SetupBlock * | getFirstBlock () const |
| SetupBlock * | getFirstBlock () |
| const SetupBlock * | getNextBlock (const SetupBlock *block) const |
| SetupBlock * | getNextBlock (const SetupBlock *block) |
| const SetupBlock * | getTree (const uint_t treeIndex) const |
| SetupBlock * | getTree (const uint_t treeIndex) |
| const SetupBlock * | getRootBlock (const uint_t treeIndex) const |
| SetupBlock * | getRootBlock (const uint_t treeIndex) |
| const SetupBlock * | getRootBlock (const uint_t x, const uint_t y, const uint_t z) const |
| SetupBlock * | getRootBlock (const uint_t x, const uint_t y, const uint_t z) |
| const SetupBlock * | getBlock (const BlockID &id) const |
| const SetupBlock * | getBlock (const real_t px, const real_t py, const real_t pz) const |
| SetupBlock * | getBlock (const real_t px, const real_t py, const real_t pz) |
| void | getBlocks (std::vector< const SetupBlock * > &blocks) const |
| void | getBlocks (std::vector< SetupBlock * > &blocks) |
| void | getBlocks (std::vector< const SetupBlock * > &blocks, const uint_t level) const |
| void | getBlocks (std::vector< SetupBlock * > &blocks, const uint_t level) |
| void | getMortonOrder (std::vector< SetupBlock * > &blocks) |
| void | getHilbertOrder (std::vector< SetupBlock * > &blocks) |
| void | getProcessSpecificBlocks (std::vector< const SetupBlock * > &blocks, const uint_t process) const |
| void | getBlocksOverlappedByAABB (std::vector< SetupBlock * > &blocks, const AABB &aabb) |
| void | getBlocks (std::vector< SetupBlock * > &blocks, const uint_t xmin, const uint_t ymin, const uint_t zmin, const uint_t xmax, const uint_t ymax, const uint_t zmax) |
| uint_t | mapForestCoordinatesToTreeIndex (const uint_t x, const uint_t y, const uint_t z) const |
| void | mapTreeIndexToForestCoordinates (const uint_t treeIndex, uint_t &x, uint_t &y, uint_t &z) const |
| void | mapPointToPeriodicDomain (real_t &px, real_t &py, real_t &pz) const |
| uint_t | mapPointToTreeIndex (const real_t px, const real_t py, const real_t pz) const |
| void | mapAABBToBoundingForestCoordinates (const AABB &aabb, std::array< uint_t, 3 > &min, std::array< uint_t, 3 > &max) const |
| void | getRootBlockAABB (AABB &aabb, const uint_t x, const uint_t y, const uint_t z) const |
| void | getRootBlockAABB (AABB &aabb, const uint_t treeIndex) const |
| bool | atDomainXMinBorder (const SetupBlock &block) const |
| Returns true if the block 'block' is located at the lower x-axis border of the domain. | |
| bool | atDomainXMaxBorder (const SetupBlock &block) const |
| Returns true if the block 'block' is located at the upper x-axis border of the domain. | |
| bool | atDomainYMinBorder (const SetupBlock &block) const |
| Returns true if the block 'block' is located at the lower y-axis border of the domain. | |
| bool | atDomainYMaxBorder (const SetupBlock &block) const |
| Returns true if the block 'block' is located at the upper y-axis border of the domain. | |
| bool | atDomainZMinBorder (const SetupBlock &block) const |
| Returns true if the block 'block' is located at the lower z-axis border of the domain. | |
| bool | atDomainZMaxBorder (const SetupBlock &block) const |
| Returns true if the block 'block' is located at the upper z-axis border of the domain. | |
| bool | atDomainMinBorder (const uint_t index, const SetupBlock &block) const |
| bool | atDomainMaxBorder (const uint_t index, const SetupBlock &block) const |
| void | init (const AABB &domain, const uint_t xSize, const uint_t ySize, const uint_t zSize, const bool xPeriodic, const bool yPeriodic, const bool zPeriodic, const Set< SUID > &selector=Set< SUID >::emptySet()) |
| void | assignAllBlocksToRootProcess () |
| void | balanceLoad (const TargetProcessAssignmentFunction &function, const uint_t numberOfProcesses, const real_t minBufferProcessesFraction=real_t(0), const memory_t perProcessMemoryLimit=memory_t(0), const bool reorderProcessesByBFS=false, const bool insertBufferProcesses=false) |
| void | balanceLoad (const TargetProcessAssignmentFunction &function, const uint_t numberOfProcesses, const uint_t numberOfBufferProcesses, const memory_t perProcessMemoryLimit=memory_t(0), const bool reorderProcessesByBFS=false, const bool insertBufferProcesses=false) |
| void | calculateProcessDistribution_Default (const uint_t numberOfProcesses, const memory_t memoryLimit, const std::string &sfcMethod=std::string("hilbert"), const uint_t sfcIterations=10, const bool sortByLevel=false, const GlobalLoadBalancing::MetisConfiguration< SetupBlock > &metisConfig=GlobalLoadBalancing::MetisConfiguration< SetupBlock >(), const bool reorderProcessesByBFS=false, const bool insertBufferProcesses=false, const real_t bufferProcessesFraction=real_c(0)) |
| void | calculateProcessDistribution_LevelwiseMetis (const uint_t numberOfProcesses, const bool reorderProcessesByBFS=false, const CommunicationWeightFunction &communicationWeightFunction=NullCommunicationWeightFunction) |
| void | calculateProcessDistribution_Greedy (const uint_t numberOfProcesses, const memory_t memoryLimit, const bool reorderProcessesByBFS=false, const bool insertBufferProcesses=false, const real_t bufferProcessesFraction=real_c(0)) |
| uint_t | getNumberOfProcesses () const |
| uint_t | getNumberOfWorkerProcesses () const |
| uint_t | getNumberOfBufferProcesses () const |
| uint_t | getProcessIdBytes () const |
| bool | insertBuffersIntoProcessNetwork () const |
| bool | isWorkerProcess (const uint_t process) const |
| bool | isBufferProcess (const uint_t process) const |
| void | addRootBlockExclusionFunction (RootBlockExclusionFunction function, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet(), const std::string &identifier=std::string()) |
| void | addBlockExclusionFunction (BlockExclusionFunction function, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet(), const std::string &identifier=std::string()) |
| void | addRefinementSelectionFunction (RefinementSelectionFunction function, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet(), const std::string &identifier=std::string()) |
| void | addWorkloadMemorySUIDAssignmentFunction (WorkloadMemorySUIDAssignmentFunction function, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet(), const std::string &identifier=std::string()) |
| void | saveToFile (const char *const filename) const |
| For a description of the file format see BlockForestFile.h. | |
| void | writeVTKOutput (const std::string &filestem) const |
| void | writeCSV (const std::string &filestem) const |
| void | toStream (std::ostream &os) const |
| std::string | toString () const |
Static Public Member Functions | |
| static void | NullCommunicationWeightFunction (const CommunicationPairs &, CommunicationWeights &) |
| static void | mapTreeIndexToForestCoordinates (const uint_t treeIndex, const uint_t xSize, const uint_t ySize, uint_t &x, uint_t &y, uint_t &z) |
| static void | getRootBlockAABB (AABB &aabb, const AABB &domain, const real_t rootBlockXSize, const real_t rootBlockYSize, const real_t rootBlockZSize, const uint_t xSize, const uint_t ySize, const uint_t zSize, const uint_t x, const uint_t y, const uint_t z) |
Private Member Functions | |
| void | createForest (const Set< SUID > &selector) |
| void | initWorkloadMemorySUID (const Set< SUID > &selector) |
| void | updateNeighborhood (std::set< SetupBlock * > &blocksToUpdate) |
| void | updateNeighborhood (std::vector< SetupBlock * > &blocks) |
| void | createNeighborhood () |
| void | balanceLoadHelper (const TargetProcessAssignmentFunction &function, const uint_t numberOfProcesses, const uint_t numberOfBufferProcesses, const memory_t perProcessMemoryLimit, const bool reorderProcessesByBFS, const bool insertBufferProcesses) |
| void | calculateProcessDistributionFinalization (const bool reorderProcessesByBFS=false, const bool insertBufferProcesses=false) |
| void | checkNeighborhoodConsistency () const |
Private Member Functions inherited from walberla::NonCopyable | |
| NonCopyable (const NonCopyable &)=delete | |
| NonCopyable & | operator= (const NonCopyable &)=delete |
| NonCopyable ()=default | |
| ~NonCopyable ()=default | |
Static Private Member Functions | |
| static SetupBlock * | mapPointToBlock (SetupBlock *const block, const real_t px, const real_t py, const real_t pz) |
Private Attributes | |
| std::vector< SetupBlock * > | forest_ |
| uint_t | numberOfRootBlocks_ { 0 } |
| uint_t | numberOfBlocks_ { 0 } |
| AABB | domain_ |
| std::array< real_t, 3 > | rootBlockSize_ |
| std::array< uint_t, 3 > | size_ |
| std::array< bool, 3 > | periodic_ |
| uint_t | depth_ { 0 } |
| uint_t | treeIdDigits_ { 0 } |
| uint_t | numberOfProcesses_ { 0 } |
| uint_t | numberOfBufferProcesses_ { 0 } |
| bool | insertBuffersIntoProcessNetwork_ { false } |
| std::vector< std::vector< SetupBlock * > > | blockDistribution_ |
| selectable::SetSelectableObject< RootBlockExclusionFunction, SUID > | rootBlockExclusionFunctions_ |
| selectable::SetSelectableObject< BlockExclusionFunction, SUID > | blockExclusionFunctions_ |
| selectable::SetSelectableObject< RefinementSelectionFunction, SUID > | refinementSelectionFunctions_ |
| selectable::SetSelectableObject< WorkloadMemorySUIDAssignmentFunction, SUID > | workloadMemorySUIDAssignmentFunctions_ |
Friends | |
| class | const_iterator |
| class | iterator |
| using walberla::blockforest::SetupBlockForest::BlockExclusionFunction = std::function<bool (const SetupBlock &)> |
| using walberla::blockforest::SetupBlockForest::CommunicationPairs = std::vector<std::pair<const SetupBlock *, const SetupBlock *>> |
| using walberla::blockforest::SetupBlockForest::CommunicationWeightFunction = std::function<void (const CommunicationPairs &, CommunicationWeights &)> |
| using walberla::blockforest::SetupBlockForest::CommunicationWeights = std::vector<real_t> |
| using walberla::blockforest::SetupBlockForest::RefinementSelectionFunction = std::function<void (SetupBlockForest &)> |
| using walberla::blockforest::SetupBlockForest::RootBlockExclusionFunction = std::function<void (std::vector<uint8_t> &, const RootBlockAABB &)> |
| using walberla::blockforest::SetupBlockForest::TargetProcessAssignmentFunction = std::function<uint_t (SetupBlockForest &, const uint_t, const memory_t)> |
| using walberla::blockforest::SetupBlockForest::WorkloadMemorySUIDAssignmentFunction = std::function<void (SetupBlockForest &)> |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void walberla::blockforest::SetupBlockForest::assignAllBlocksToRootProcess | ( | ) |
|
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.
| void walberla::blockforest::SetupBlockForest::balanceLoad | ( | const TargetProcessAssignmentFunction & | function, |
| const uint_t | numberOfProcesses, | ||
| const real_t | minBufferProcessesFraction = real_t(0), | ||
| const memory_t | perProcessMemoryLimit = memory_t(0), | ||
| const bool | reorderProcessesByBFS = false, | ||
| const bool | insertBufferProcesses = false ) |
| void walberla::blockforest::SetupBlockForest::balanceLoad | ( | const TargetProcessAssignmentFunction & | function, |
| const uint_t | numberOfProcesses, | ||
| const uint_t | numberOfBufferProcesses, | ||
| const memory_t | perProcessMemoryLimit = memory_t(0), | ||
| const bool | reorderProcessesByBFS = false, | ||
| const bool | insertBufferProcesses = false ) |
|
private |
|
inline |
|
inline |
| void walberla::blockforest::SetupBlockForest::calculateProcessDistribution_Default | ( | const uint_t | numberOfProcesses, |
| const memory_t | memoryLimit, | ||
| const std::string & | sfcMethod = std::string( "hilbert" ), | ||
| const uint_t | sfcIterations = 10, | ||
| const bool | sortByLevel = false, | ||
| const GlobalLoadBalancing::MetisConfiguration< SetupBlock > & | metisConfig = GlobalLoadBalancing::MetisConfiguration< SetupBlock >(), | ||
| const bool | reorderProcessesByBFS = false, | ||
| const bool | insertBufferProcesses = false, | ||
| const real_t | bufferProcessesFraction = real_c(0) ) |
| void walberla::blockforest::SetupBlockForest::calculateProcessDistribution_Greedy | ( | const uint_t | numberOfProcesses, |
| const memory_t | memoryLimit, | ||
| const bool | reorderProcessesByBFS = false, | ||
| const bool | insertBufferProcesses = false, | ||
| const real_t | bufferProcessesFraction = real_c(0) ) |
| void walberla::blockforest::SetupBlockForest::calculateProcessDistribution_LevelwiseMetis | ( | const uint_t | numberOfProcesses, |
| const bool | reorderProcessesByBFS = false, | ||
| const CommunicationWeightFunction & | communicationWeightFunction = NullCommunicationWeightFunction ) |
|
private |
|
private |
|
private |
|
private |
|
inline |
|
inline |
| const SetupBlock * walberla::blockforest::SetupBlockForest::getBlock | ( | const BlockID & | id | ) | const |
|
inline |
|
inline |
|
inline |
| void walberla::blockforest::SetupBlockForest::getBlocks | ( | std::vector< const SetupBlock * > & | blocks | ) | const |
| void walberla::blockforest::SetupBlockForest::getBlocks | ( | std::vector< const SetupBlock * > & | blocks, |
| const uint_t | level ) const |
| void walberla::blockforest::SetupBlockForest::getBlocks | ( | std::vector< SetupBlock * > & | blocks | ) |
| void walberla::blockforest::SetupBlockForest::getBlocks | ( | std::vector< SetupBlock * > & | blocks, |
| const uint_t | level ) |
| void walberla::blockforest::SetupBlockForest::getBlocks | ( | std::vector< SetupBlock * > & | blocks, |
| const uint_t | xmin, | ||
| const uint_t | ymin, | ||
| const uint_t | zmin, | ||
| const uint_t | xmax, | ||
| const uint_t | ymax, | ||
| const uint_t | zmax ) |
| void walberla::blockforest::SetupBlockForest::getBlocksOverlappedByAABB | ( | std::vector< SetupBlock * > & | blocks, |
| const AABB & | aabb ) |
|
inline |
|
inline |
| SetupBlock * walberla::blockforest::SetupBlockForest::getFirstBlock | ( | ) |
| const SetupBlock * walberla::blockforest::SetupBlockForest::getFirstBlock | ( | ) | const |
| void walberla::blockforest::SetupBlockForest::getHilbertOrder | ( | std::vector< SetupBlock * > & | blocks | ) |
| uint_t walberla::blockforest::SetupBlockForest::getMaxLevel | ( | ) | const |
| uint_t walberla::blockforest::SetupBlockForest::getMinLevel | ( | ) | const |
|
inline |
| SetupBlock * walberla::blockforest::SetupBlockForest::getNextBlock | ( | const SetupBlock * | block | ) |
| const SetupBlock * walberla::blockforest::SetupBlockForest::getNextBlock | ( | const SetupBlock * | block | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void walberla::blockforest::SetupBlockForest::getProcessSpecificBlocks | ( | std::vector< const SetupBlock * > & | blocks, |
| const uint_t | process ) const |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void walberla::blockforest::SetupBlockForest::init | ( | const AABB & | domain, |
| const uint_t | xSize, | ||
| const uint_t | ySize, | ||
| const uint_t | zSize, | ||
| const bool | xPeriodic, | ||
| const bool | yPeriodic, | ||
| const bool | zPeriodic, | ||
| const Set< SUID > & | selector = Set<SUID>::emptySet() ) |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void walberla::blockforest::SetupBlockForest::mapAABBToBoundingForestCoordinates | ( | const AABB & | aabb, |
| std::array< uint_t, 3 > & | min, | ||
| std::array< uint_t, 3 > & | max ) const |
|
inline |
|
staticprivate |
| void walberla::blockforest::SetupBlockForest::mapPointToPeriodicDomain | ( | real_t & | px, |
| real_t & | py, | ||
| real_t & | pz ) const |
| uint_t walberla::blockforest::SetupBlockForest::mapPointToTreeIndex | ( | const real_t | px, |
| const real_t | py, | ||
| const real_t | pz ) const |
|
inlinestatic |
|
inline |
|
inlinestatic |
| void walberla::blockforest::SetupBlockForest::saveToFile | ( | const char *const | filename | ) | const |
For a description of the file format see BlockForestFile.h.
| void walberla::blockforest::SetupBlockForest::toStream | ( | std::ostream & | os | ) | const |
|
inline |
|
inlineprivate |
|
private |
| void walberla::blockforest::SetupBlockForest::writeCSV | ( | const std::string & | filestem | ) | const |
| void walberla::blockforest::SetupBlockForest::writeVTKOutput | ( | const std::string & | filestem | ) | const |
|
friend |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |