![]() |
rebl-AMR
|
Template Class designed to unify tree and full_tree topologies. More...
#include <templateForest.h>
Public Member Functions | |
| TemplateForest () | |
| TemplateForest (int argcs, char *pArgs[], T &proc, real *length, real *coords, uint nx, uint ny, uint nz) | |
| void | construct (int argcs, char *pArgs[], T &proc, real *length, real *coords, uint nx, uint ny, uint nz) |
| uint | getTotalSize () |
| void | assignSeeds (real *length, T &proc) |
| void | assignGeom (T &proc, real *geom_xyz, uint geom_nn) |
| void | encodeGeometry () |
| void | refineEachTree (uint nlevel) |
| void | moveGeom (T &proc, real *geom_xyz, uint n, real x[3]) |
| void | getListEachTree () |
| bool | isInSeed (morton< M > &key, uint *counter) |
| void | flipAll (morton< N > &key, uint *mylevel, uint *direction) |
| void | getDirections (morton< N+M > &key, uint combinedlevel, vector< uint > &directions) |
| void | recoverAllZeroSingularity (morton< N+M > &key, const uint &combinedlevel) |
| void | combinedLevel (const morton< N+M > &key, uint *level) |
| void | findSeedLevelForRcvdMessage (const morton< N+M > &key, uint *mylevel, Tree< M, Mvalue > &proc) |
| void | findSeedLevelForRcvdMessage (const morton< N+M > &key, uint *mylevel, FullTree< M, Mvalue > &proc) |
| void | constructSeedKeyForRcvdMessage (const morton< N+M > &key, const uint &seedlevel, morton< M > &seedkey) |
| void | constructElementKeyForRcvdMessage (const morton< N+M > &key, const uint &seedlevel, morton< N > &elementkey) |
| void | removeAllZeroSingularity (morton< N+M > &key, const uint &combinedlevel) |
| void | getMaxSeedsLevel (T &proc) |
| void | findFlipLevel (morton< N+M > key, uint *mylevel, uint *changedirectionlevel, uint *direction) |
| void | flipForNbr (morton< N+M > &key, uint *mylevel, uint *changedirectionlevel, uint *direction) |
| void | getTotalMeshSize () |
| void | getNbrSeedLevel (morton< N+M > &combinedkey, uint topologylevel, uint *nbrseedleve, Tree< M, Mvalue > &proc) |
| void | getNbrSeedLevel (morton< N+M > &combinedkey, uint topologylevel, uint *nbrseedleve, FullTree< M, Mvalue > &proc) |
| uint | forestsize () |
| void | getElemNbrs (Tree< M, Mvalue > &proc, const morton< M > key, bitvector< M > &nbr) |
| void | comPatternConstruct (Tree< M, Mvalue > &proc) |
| void | comPatternConstruct (FullTree< M, Mvalue > &proc, vector< uint > &Nbrs) |
| void | fourToOneBalance (T &proc) |
| void | refineForestBalanced (uint nlevel, T &proc) |
| void | nonCollectiveNbrComm () |
| void | pushToDerefineEachTree (uint nlevel, Tree< M, uint > &proc) |
| void | retainFourToOneBalance (Tree< M, uint > &proc) |
| void | checkZoltanPartConsistency (Tree< M, Mvalue > &proc) |
| void | createCommGraph (uint Nnbr) |
| void | createNbrsOfNbrs () |
| void | checkGraphConsistency () |
| void | filterRefineList () |
| void | setMaxProcLevel (const uint refinelevel) |
| uint | findIndexInSeed (T &proc, morton< M > &seedkey) |
| void | appendToMessage (T &proc, morton< M > &seednbrkey, morton< M+N > &combinedkey, const uint combinedlevel) |
| void | MPIStartUp () |
| void | checkInputParams (int argcs, char *pArgs[]) |
| void | runInfo () |
| void | currentDateTime () |
| ~TemplateForest () | |
Protected Attributes | |
| real | ancestorlength [3] |
| real | ancestorcoords [3] |
| uint | npx |
| uint | npy |
| uint | npz |
Private Attributes | |
| MpiCom | Com |
| int | duplicated =0 |
| treeList< Tree< N, Nvalue > > | trees |
| uint | maxProcLevel |
| bitlist< M > | seeds |
| uint | maxseedlevel |
| Tree< M, real > | geom |
| vector< uint > | destination |
| vector< uint > | sendtag |
| vector< uint > | recvtag |
| vector< uint > | nbrsOfNbrs |
| vector< bitset< M+N > > * | message =nullptr |
| struct Zoltan_Struct * | zz =nullptr |
| Zoltan_Out | zoltan_out |
| MPI_Comm | graphComm |
| MPI_Request * | request =nullptr |
| MPI_Request * | request1 =nullptr |
| char | nameAppendix [80] |
| unsigned long long | meshSize |
Friends | |
| template<size_t N1, typename Nvalue1 , size_t M1, typename Mvalue1 , class T1 > | |
| class | templatePhdf5 |
Template Class designed to unify tree and full_tree topologies.
|
inline |
| TemplateForest< N, Nvalue, M, Mvalue, T >::TemplateForest | ( | int | argcs, |
| char * | pArgs[], | ||
| T & | proc, | ||
| real * | length, | ||
| real * | coords, | ||
| uint | nx, | ||
| uint | ny, | ||
| uint | nz | ||
| ) |
constructor constructor
<part I, initialize the ancestor coords and length, just like we did for class tree
| TemplateForest< N, Nvalue, M, Mvalue, T >::~TemplateForest | ( | ) |
Destructor of the object
| void TemplateForest< N, Nvalue, M, Mvalue, T >::appendToMessage | ( | T & | proc, |
| morton< M > & | seednbrkey, | ||
| morton< M+N > & | combinedkey, | ||
| const uint | combinedlevel | ||
| ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::assignGeom | ( | T & | proc, |
| real * | geom_xyz, | ||
| uint | geom_nn | ||
| ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::assignSeeds | ( | real * | length, |
| T & | proc | ||
| ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::checkGraphConsistency | ( | ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::checkInputParams | ( | int | argcs, |
| char * | pArgs[] | ||
| ) |
Checks input parameters for consistency
| void TemplateForest< N, Nvalue, M, Mvalue, T >::checkZoltanPartConsistency | ( | Tree< M, Mvalue > & | proc | ) |
| proc | creates distributed (acalable) graph for communication |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::combinedLevel | ( | const morton< N+M > & | key, |
| uint * | level | ||
| ) |
to prevent unnecesary bit operation, the morton code is placed from starting from left hand side
| void TemplateForest< N, Nvalue, M, Mvalue, T >::comPatternConstruct | ( | Tree< M, Mvalue > & | proc | ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::comPatternConstruct | ( | FullTree< M, Mvalue > & | proc, |
| vector< uint > & | Nbrs | ||
| ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::construct | ( | int | argcs, |
| char * | pArgs[], | ||
| T & | proc, | ||
| real * | length, | ||
| real * | coords, | ||
| uint | nx, | ||
| uint | ny, | ||
| uint | nz | ||
| ) |
<part I, initialize the ancestor coords and length, just like we did for class tree
| void TemplateForest< N, Nvalue, M, Mvalue, T >::constructElementKeyForRcvdMessage | ( | const morton< N+M > & | key, |
| const uint & | seedlevel, | ||
| morton< N > & | elementkey | ||
| ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::constructSeedKeyForRcvdMessage | ( | const morton< N+M > & | key, |
| const uint & | seedlevel, | ||
| morton< M > & | seedkey | ||
| ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::createCommGraph | ( | uint | Lnbr | ) |
Zoltan might give zero elements to a processor, this function checks to see each element has at least one element assigned to it and that the number of elements before and after partitioning is the same level of neighbors
| Lnbr | creates distributed (scalable) graph for communication |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::createNbrsOfNbrs | ( | ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::currentDateTime | ( | ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::encodeGeometry | ( | ) |
encode the geometry once to the deepest level
| void TemplateForest< N, Nvalue, M, Mvalue, T >::filterRefineList | ( | ) |
Sanity check for the graph, it checks he fact that if element "A" is a neighbor of element "B", element "B" should be a neighbor of element "A" as well
| void TemplateForest< N, Nvalue, M, Mvalue, T >::findFlipLevel | ( | morton< N+M > | key, |
| uint * | mylevel, | ||
| uint * | changedirectionlevel, | ||
| uint * | direction | ||
| ) |
same as the function defined in class three except that it workd on (M+N) bits
| uint TemplateForest< N, Nvalue, M, Mvalue, T >::findIndexInSeed | ( | T & | proc, |
| morton< M > & | seedkey | ||
| ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::findSeedLevelForRcvdMessage | ( | const morton< N+M > & | key, |
| uint * | mylevel, | ||
| Tree< M, Mvalue > & | proc | ||
| ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::findSeedLevelForRcvdMessage | ( | const morton< N+M > & | key, |
| uint * | mylevel, | ||
| FullTree< M, Mvalue > & | proc | ||
| ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::flipAll | ( | morton< N > & | key, |
| uint * | mylevel, | ||
| uint * | direction | ||
| ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::flipForNbr | ( | morton< N+M > & | key, |
| uint * | mylevel, | ||
| uint * | changedirectionlevel, | ||
| uint * | direction | ||
| ) |
same as the function defined in class three except that it workd on (M+N) bits
| uint TemplateForest< N, Nvalue, M, Mvalue, T >::forestsize | ( | ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::fourToOneBalance | ( | T & | proc | ) |
4:1 balance enforced at forest including the other processors
| void TemplateForest< N, Nvalue, M, Mvalue, T >::getDirections | ( | morton< N+M > & | key, |
| uint | combinedlevel, | ||
| vector< uint > & | directions | ||
| ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::getElemNbrs | ( | Tree< M, Mvalue > & | proc, |
| const morton< M > | key, | ||
| bitvector< M > & | nbr | ||
| ) |
collects the neghbors of a given element
| void TemplateForest< N, Nvalue, M, Mvalue, T >::getListEachTree | ( | ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::getMaxSeedsLevel | ( | T & | proc | ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::getNbrSeedLevel | ( | morton< N+M > & | combinedkey, |
| uint | topologylevel, | ||
| uint * | nbrseedleve, | ||
| Tree< M, Mvalue > & | proc | ||
| ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::getNbrSeedLevel | ( | morton< N+M > & | combinedkey, |
| uint | topologylevel, | ||
| uint * | nbrseedleve, | ||
| FullTree< M, Mvalue > & | proc | ||
| ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::getTotalMeshSize | ( | ) |
calculates the final number of the mesh generated with all processes
| uint TemplateForest< N, Nvalue, M, Mvalue, T >::getTotalSize | ( | ) |
| bool TemplateForest< N, Nvalue, M, Mvalue, T >::isInSeed | ( | morton< M > & | key, |
| uint * | counter | ||
| ) |
check and see if the forest incldues the particluar seed
| void TemplateForest< N, Nvalue, M, Mvalue, T >::moveGeom | ( | T & | proc, |
| real * | geom_xyz, | ||
| uint | n, | ||
| real | x[3] | ||
| ) |
moves the geomerty with displacements specified in x[3] in x,y and z directions
| void TemplateForest< N, Nvalue, M, Mvalue, T >::MPIStartUp | ( | ) |
Creates an MPI communicator for ReblAmr and assigns ranks
| void TemplateForest< N, Nvalue, M, Mvalue, T >::nonCollectiveNbrComm | ( | ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::pushToDerefineEachTree | ( | uint | nlevel, |
| Tree< M, uint > & | proc | ||
| ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::recoverAllZeroSingularity | ( | morton< N+M > & | key, |
| const uint & | combinedlevel | ||
| ) |
note that this function operates on the element key, this is done to remove redundant calc
| void TemplateForest< N, Nvalue, M, Mvalue, T >::refineEachTree | ( | uint | nlevel | ) |
Refines every Tree in the list, nlevels, balance is satisfired for each tree but not in the global scope
| void TemplateForest< N, Nvalue, M, Mvalue, T >::refineForestBalanced | ( | uint | nlevel, |
| T & | proc | ||
| ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::removeAllZeroSingularity | ( | morton< N+M > & | key, |
| const uint & | combinedlevel | ||
| ) |
we use one bit to communicate the level of the element ending in zero at element level
| void TemplateForest< N, Nvalue, M, Mvalue, T >::retainFourToOneBalance | ( | Tree< M, uint > & | proc | ) |
Eliminates the elements that their removal would destroy the 2:1 balance
| void TemplateForest< N, Nvalue, M, Mvalue, T >::runInfo | ( | ) |
| void TemplateForest< N, Nvalue, M, Mvalue, T >::setMaxProcLevel | ( | const uint | refinelevel | ) |
|
friend |
|
protected |
centeroid of the of the first generation (root) element
|
protected |
original length of the first generation (root) element
|
private |
Object to hold communicator data such as rank, size, etc
|
private |
neighbor processes to communicate messages
|
private |
|
private |
|
private |
|
private |
|
private |
finds tha maximum level of the seeds
|
private |
Each seed will contain its own geometry points to search, this assumption implicitly coincides processor topology with geometry voxelization this way tree's root will be morton code used in geometry voxelization and no extra operation is necessary
|
private |
|
private |
|
private |
|
protected |
discritization in x direction, this value for proc tree is 2, therefore forest needs its own value of npx
|
protected |
discretization in y direction
|
protected |
discretization in z direction
|
private |
|
private |
|
private |
|
private |
< Maximum level in processor topology. i.e. tree seeds: morton code for boxes to grow tree
|
private |
|
private |
list of trees that each processor includes
|
private |
|
private |