![]() |
rebl-AMR
|
template class that is a forest of octrees with semi-structured process topology More...
#include <forest.h>
Public Member Functions | |
| Forest (real *length, real *coords, Tree< M, Mvalue > &proc, const int fixedlevel, uint nx, uint ny, uint nz) | |
| void | assignSeeds (real *length, Tree< M, Mvalue > &proc, const int ficedlevel) |
| uint | getTotalSize () |
| void | refineEachTreeVoxel (uint nlevel) |
| void | assignGeom (Tree< M, Mvalue > &proc, const uint fixedlevel, real *geom_xyz, uint geom_nn) |
| void | refineEachTree (uint nlevel) |
| void | getListEachTree () |
| void | fourToOneBalance (Tree< M, uint > &proc) |
| bool | isInSeed (morton< M > &key, uint *counter) |
| void | flipAll (morton< N > &key, uint *mylevel, uint *direction) |
| 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 | getNbrSeedLevel (morton< N+M > &combinedkey, uint topologylevel, uint *nbrseedleve, Tree< M, uint > &proc) |
| void | debug (Tree< M, Mvalue > &proc) |
| void | getElemNbrs (Tree< M, Mvalue > &proc, const morton< M > key, bitvector< M > &nbr) |
| void | comPatternConstruct (Tree< M, Mvalue > &proc) |
| void | getDirections (morton< N+M > &key, uint combinedlevel, vector< uint > &directions) |
| void | encodeGeometry () |
| void | removeAllZeroSingularity (morton< N+M > &key, const uint &combinedlevel) |
| void | getMaxSeedsLevel (Tree< M, Mvalue > &proc) |
| void | findSeedLevelForRcvdMessage (const morton< N+M > &key, uint *mylevel, Tree< M, Mvalue > &proc) |
| void | recoverAllZeroSingularity (morton< N+M > &key, const uint &combinedlevel) |
| 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 | refineForestBalanced (uint nlevel, Tree< M, Mvalue > &proc) |
| void | combinedLevel (const morton< N+M > &key, uint *level) |
| void | zoltanGeomrepart (Tree< M, Mvalue > &proc, uint setmethod) |
| uint | forestsize () |
| void | retainFourToOneBalance (Tree< M, uint > &proc) |
| void | moveGeom (Tree< M, Mvalue > &proc, const uint fixedlevel, real *geom_xyz, uint n, real x[3]) |
| void | pushToDerefineEachTree (uint nlevel, Tree< M, uint > &proc) |
| void | convertBitsToDouble (morton< N+M > key, double *val) |
| void | convertDoubleToBits (morton< N+M > &key, const double val) |
| void | createCommGraph (uint Nnbr) |
| void | createNbrsOfNbrs () |
| void | debugDerefine (Tree< M, Mvalue > &proc) |
| void | checkGraphConsistency () |
| void | checkNbrsOfNbrsConsistency () |
| bool | checkWithNbrs (bool *sendbuf, bool *recvbuf) |
| void | rcvrMessageSize (int *sendbuf, int *recvbuf) |
| void | getTotalMeshSize () |
| void | checkZoltanPartConsistency (Tree< M, Mvalue > &proc) |
| void | constructCommWeak (const vector< int >Nbr) |
| ~Forest () | |
Protected Attributes | |
| real | ancestorlength [3] |
| real | ancestorcoords [3] |
| uint | npx |
| uint | npy |
| uint | npz |
Private Attributes | |
| MpiCom | Com |
| treelist< N, Nvalue > | trees |
| bitlist< M > | seeds |
| uint | maxseedlevel |
| Tree< M, real > | geom |
| vector< uint > | destination |
| vector< uint > | nbrsOfNbrs |
| struct Zoltan_Struct * | zz =nullptr |
| Zoltan_Out | zoltan_out |
| MPI_Comm | graphComm |
Friends | |
| template<size_t N1, typename Nvalue1 , size_t M1, typename Mvalue1 > | |
| class | Phdf5 |
template class that is a forest of octrees with semi-structured process topology
includes a list of tree's and functionality for manipulation as well as exchange of the trees with neighboring processes The algorithm starts with a very coarse 16 bit semi-structured processor topology, for now only 16 bits are used but it can be modified according to the need each process will have one forest and trees will be distributed dynamically as the solution porogresses
| Forest< N, Nvalue, M, Mvalue >::Forest | ( | real * | length, |
| real * | coords, | ||
| Tree< M, Mvalue > & | proc, | ||
| const int | fixedlevel, | ||
| uint | nx, | ||
| uint | ny, | ||
| uint | nz | ||
| ) |
constructor
|
inline |
| void Forest< N, Nvalue, M, Mvalue >::assignGeom | ( | Tree< M, Mvalue > & | proc, |
| const uint | fixedlevel, | ||
| real * | geom_xyz, | ||
| uint | geom_nn | ||
| ) |
| void Forest< N, Nvalue, M, Mvalue >::assignSeeds | ( | real * | length, |
| Tree< M, Mvalue > & | proc, | ||
| const int | ficedlevel | ||
| ) |
| void Forest< N, Nvalue, M, Mvalue >::checkGraphConsistency | ( | ) |
| void Forest< N, Nvalue, M, Mvalue >::checkNbrsOfNbrsConsistency | ( | ) |
| bool Forest< N, Nvalue, M, Mvalue >::checkWithNbrs | ( | bool * | sendbuf, |
| bool * | recvbuf | ||
| ) |
this is to enforce broadcast only with first degree neighbors
| void Forest< N, Nvalue, M, Mvalue >::checkZoltanPartConsistency | ( | Tree< M, Mvalue > & | proc | ) |
| void Forest< N, Nvalue, M, Mvalue >::combinedLevel | ( | const morton< N+M > & | key, |
| uint * | level | ||
| ) |
| void Forest< N, Nvalue, M, Mvalue >::comPatternConstruct | ( | Tree< M, Mvalue > & | proc | ) |
| void Forest< N, Nvalue, M, Mvalue >::constructCommWeak | ( | const vector< int > | Nbr | ) |
| void Forest< N, Nvalue, M, Mvalue >::constructElementKeyForRcvdMessage | ( | const morton< N+M > & | key, |
| const uint & | seedlevel, | ||
| morton< N > & | elementkey | ||
| ) |
| void Forest< N, Nvalue, M, Mvalue >::constructSeedKeyForRcvdMessage | ( | const morton< N+M > & | key, |
| const uint & | seedlevel, | ||
| morton< M > & | seedkey | ||
| ) |
| void Forest< N, Nvalue, M, Mvalue >::convertBitsToDouble | ( | morton< N+M > | key, |
| double * | val | ||
| ) |
| void Forest< N, Nvalue, M, Mvalue >::convertDoubleToBits | ( | morton< N+M > & | key, |
| const double | val | ||
| ) |
| void Forest< N, Nvalue, M, Mvalue >::createCommGraph | ( | uint | Nnbr | ) |
level of neighbors
| void Forest< N, Nvalue, M, Mvalue >::createNbrsOfNbrs | ( | ) |
| void Forest< N, Nvalue, M, Mvalue >::debug | ( | Tree< M, Mvalue > & | proc | ) |
| void Forest< N, Nvalue, M, Mvalue >::debugDerefine | ( | Tree< M, Mvalue > & | proc | ) |
| void Forest< N, Nvalue, M, Mvalue >::encodeGeometry | ( | ) |
| void Forest< N, Nvalue, M, Mvalue >::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
| void Forest< N, Nvalue, M, Mvalue >::findSeedLevelForRcvdMessage | ( | const morton< N+M > & | key, |
| uint * | mylevel, | ||
| Tree< M, Mvalue > & | proc | ||
| ) |
| void Forest< N, Nvalue, M, Mvalue >::flipAll | ( | morton< N > & | key, |
| uint * | mylevel, | ||
| uint * | direction | ||
| ) |
| void Forest< N, Nvalue, M, Mvalue >::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 Forest< N, Nvalue, M, Mvalue >::forestsize | ( | ) |
| void Forest< N, Nvalue, M, Mvalue >::fourToOneBalance | ( | Tree< M, uint > & | proc | ) |
4:1 balance enforced at forest including the other processors
| void Forest< N, Nvalue, M, Mvalue >::getDirections | ( | morton< N+M > & | key, |
| uint | combinedlevel, | ||
| vector< uint > & | directions | ||
| ) |
| void Forest< N, Nvalue, M, Mvalue >::getElemNbrs | ( | Tree< M, Mvalue > & | proc, |
| const morton< M > | key, | ||
| bitvector< M > & | nbr | ||
| ) |
collects the neghbors of a given element
| void Forest< N, Nvalue, M, Mvalue >::getListEachTree | ( | ) |
| void Forest< N, Nvalue, M, Mvalue >::getMaxSeedsLevel | ( | Tree< M, Mvalue > & | proc | ) |
| void Forest< N, Nvalue, M, Mvalue >::getNbrSeedLevel | ( | morton< N+M > & | combinedkey, |
| uint | topologylevel, | ||
| uint * | nbrseedleve, | ||
| Tree< M, uint > & | proc | ||
| ) |
| void Forest< N, Nvalue, M, Mvalue >::getTotalMeshSize | ( | ) |
| uint Forest< N, Nvalue, M, Mvalue >::getTotalSize | ( | ) |
| bool Forest< N, Nvalue, M, Mvalue >::isInSeed | ( | morton< M > & | key, |
| uint * | counter | ||
| ) |
check and see if the forest incldues the particluar seed
| void Forest< N, Nvalue, M, Mvalue >::moveGeom | ( | Tree< M, Mvalue > & | proc, |
| const uint | fixedlevel, | ||
| real * | geom_xyz, | ||
| uint | n, | ||
| real | x[3] | ||
| ) |
moves the geomerty with displacements specified in x[3] in x,y and z directions
| void Forest< N, Nvalue, M, Mvalue >::pushToDerefineEachTree | ( | uint | nlevel, |
| Tree< M, uint > & | proc | ||
| ) |
| void Forest< N, Nvalue, M, Mvalue >::rcvrMessageSize | ( | int * | sendbuf, |
| int * | recvbuf | ||
| ) |
| void Forest< N, Nvalue, M, Mvalue >::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 Forest< N, Nvalue, M, Mvalue >::refineEachTree | ( | uint | nlevel | ) |
Refines every Tree in the list, nlevels, balance is satisfired for each tree but not in the global scope
| void Forest< N, Nvalue, M, Mvalue >::refineEachTreeVoxel | ( | uint | nlevel | ) |
Refines every Tree in the list, nlevels, balance is satisfired for each tree but not in the boundaries with other trees
| void Forest< N, Nvalue, M, Mvalue >::refineForestBalanced | ( | uint | nlevel, |
| Tree< M, Mvalue > & | proc | ||
| ) |
| void Forest< N, Nvalue, M, Mvalue >::removeAllZeroSingularity | ( | morton< N+M > & | key, |
| const uint & | combinedlevel | ||
| ) |
| void Forest< N, Nvalue, M, Mvalue >::retainFourToOneBalance | ( | Tree< M, uint > & | proc | ) |
| void Forest< N, Nvalue, M, Mvalue >::zoltanGeomrepart | ( | Tree< M, Mvalue > & | proc, |
| uint | setmethod | ||
| ) |
|
friend |
|
protected |
centeroid of the of the first generation (root) element
|
protected |
original length of the first generation (root) element
|
private |
|
private |
|
private |
|
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 |
finds tha maximum level of the seeds
|
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 |
seeds: morton code for boxes to grow tree
|
private |
list of trees that each processor includes
|
private |
|
private |