7#ifndef FVSOLVERSTRUCTPARTITION_H
8#define FVSOLVERSTRUCTPARTITION_H
29 size = std::make_unique<MInt[]>(nDim);
30 offset = std::make_unique<MInt[]>(nDim);
37 std::unique_ptr<MInt[]>
size{};
91 std::vector<std::unique_ptr<PartitionInfo<nDim>>>
m_blockInfo{};
std::unique_ptr< MInt[]> offset
std::unique_ptr< MInt[]> size
This class is a ScratchSpace.
Class for the decomposition (partition) of structured grids.
MBool readFromFile()
Read a precomputed partition info from an external file.
MInt sumLeaves(treeNode *&treePointer)
Compute the number of leaves of a tree nodes.
MInt getPartitionSize(const MInt domainId_, const MInt dim)
void addLeaf(treeNode **&treeRoot, MIntScratchSpace &level2dimension)
Add a leaf into the tree.
void decompose()
Decompose the grid into partitions for the set number of domains.
std::vector< std::unique_ptr< PartitionInfo< nDim > > > m_blockInfo
MInt getBlockIdFromPartition(const MInt domainId_)
MInt getBlockOffset(const MInt domainId_, const MInt dim)
void destroyChilds(treeNode *&treePointer)
Recursively destroy all childs of a tree node.
MInt getBlockSize(const MInt domainId_, const MInt dim)
void setPartitionInfo(treeNode **&, MIntScratchSpace &)
Computes partition information from given BCT.
MInt getPartitionOffset(const MInt domainId_, const MInt dim)
~StructuredDecomposition()
void insertChildAtNode(treeNode *&, const MInt, const MInt(&)[nDim])
Inserts new child node below given tree node.
void traverseForInsertionNode(treeNode *&treePointer, const MInt, const MInt(&)[nDim], treeNode *&)
Recursively traverses the given tree to find the next insertion position.
void initializeChilds(treeNode *&treePointer)
Initializes the childs of the given tree node.
std::vector< std::unique_ptr< PartitionInfo< nDim > > > m_partitionInfo
void setPartitionInfoHelper(treeNode *&, const MInt, const MInt(&)[nDim], MInt &, MInt(&)[nDim], MInt(&)[nDim], MInt(&)[nDim])
Helper function for setPartionInfo.
std::basic_string< char > MString