rebl-AMR
FullTree< N, value > Class Template Reference

This Class is specifically designed for weak analysis to operate on the fulltree topology in this class, level is preset by the user and the level function is redefined to make use of the polymorphism. More...

#include <tree.h>

Inheritance diagram for FullTree< N, value >:
Tree< N, value >

Public Member Functions

 FullTree (real *length, real *coords)
 
void setLevel (const uint &l)
 
void level (morton< N > key, uint *level)
 
void insertKey (morton< N > key)
 
uint getLevel ()
 
void nbrsConstrcut (vector< uint > &Nbrs, uint myrank)
 
bool isBoundary (uint &direction, uint myrank)
 
bitmap< N, value >::iterator find (morton< N > key)
 
uint size ()
 
void convertCoordToMorton (real *xyz, morton< N > &key)
 
void assignProcs (vector< uint > &Nbrs, uint myrank)
 
void findFlipLevel (morton< WSIZE > key, uint fixedlevel, uint *changedirectionlevel, uint *direction)
 
void flipForNbr (morton< WSIZE > *key, uint fixedlevel, uint *changedirectionlevel, uint *direction)
 
bitmap< N, value >::iterator begin ()
 
bitmap< N, value >::iterator end ()
 
 ~FullTree ()
 
- Public Member Functions inherited from Tree< N, value >
 Tree (real *length, real *coords, uint nx, uint ny, uint nz)
 
 Tree (real *length, real *coords)
 
 Tree ()
 
void construct (real *length, real *coords, uint nx, uint ny, uint nz)
 
void centroid (morton< N > key, real *xyz)
 
void enclosingBox (morton< N > key, real *X)
 
void reserve (uint *reservedsize)
 
void siblings (morton< N > key, uint mylevel, morton< N > *sibkey)
 
void refine (morton< N > key)
 
void derefine (morton< N > key)
 
void refineRefineList ()
 
void refineRefineList (bitvector< N > &V)
 
void fourToOneP (uint istart, uint iend)
 
void refineRefineList (uint istart, uint iend)
 
void fourToOne ()
 
void findFlipLevel (morton< N > key, uint *mylevel, uint *changedirectionlevel, uint *direction)
 
void flipForNbr (morton< N > *key, uint *mylevel, uint *changedirectionlevel, uint *direction)
 
uint IsInVectorList (morton< N > key)
 
void addToList (morton< N > key)
 
uint count (morton< N > key)
 
void addToDerefineList (morton< N > key)
 If any of the siblings are listed in the dereffinement do not add to the list as derefining one child means removing all the siblings. More...
 
void derefineDerefineList (uint nlevel)
 
uint isInsideSolid (const morton< N > key, const real *geom_xyz, uint n)
 
void insertKey (morton< N > key)
 
void convertStl2Morton (uint geom_size, real *geom_xyz)
 
void pushToRefinelist (uint level)
 
bool isBoundary (morton< N > &key)
 
void extractBoundary ()
 
void getDirections (morton< N > &key, vector< uint > &directions)
 
uint refineListSize ()
 
void clearRefineList ()
 
void extractBoundaryP (uint istart, uint iend)
 
bool isInMeshList (const morton< N > &key)
 
bool isInRefineList (const morton< N > &key)
 
void constructHigherLevelNbrs (const morton< N > &key, const uint &keylevel, const uint &direction, morton< N > *nbr)
 
void printMesh ()
 
bool isBoundary (const morton< N > &key, uint direction)
 
std::pair< morton< N >, int > readRefineList (typename std::unordered_map< morton< N >, int >::iterator it)
 
morton< N > readDerefineList (typename std::unordered_map< morton< N >, int >::iterator it)
 
void getKey (uint i, morton< N > &key)
 
void clearMortonSTL ()
 
void retainFourToOne ()
 
void removeFromDerefineList (typename std::unordered_map< morton< N >, int >::iterator it)
 
unordered_map< morton< N >, int >::iterator Dbegin ()
 
unordered_map< morton< N >, int >::iterator Dend ()
 
void derefineDerefineList ()
 
void clearMesh ()
 
void pushToDerefinelist (uint nlevel)
 
unordered_map< morton< N >, int >::iterator Rbegin ()
 
unordered_map< morton< N >, int >::iterator Rend ()
 
std::unordered_map< morton< N >, int >::iterator findInDerefine (morton< N > key)
 
void mortonSTLclear ()
 
void flipRefineElemTag (typename std::unordered_map< morton< N >, int >::iterator it)
 
void refinelistReset ()
 
void constructNonlocalHigherLevelNbrs (const morton< N > &key, const uint &keylevel, const uint &direction, morton< N > *nbr)
 
void insertSeed (morton< N > &key)
 
void insertNbrs (vector< int > &Nbrs)
 
void enclosingBoxFixedLevel (morton< N > key, uint mylevel, real *X)
 
void centroidFixedLevel (morton< N > key, const uint mylevel, real *xyz)
 
std::unordered_map< morton< N >, int >::iterator findInList (morton< N > key)
 
 ~Tree ()
 

Private Attributes

uint fixedlevel
 
bitmap< N, value > mesh
 
std::unordered_map< morton< N >, int > refinelist
 
bitvector< N > mortonSTL
 
std::unordered_map< morton< N >, int > derefinelist
 

Additional Inherited Members

- Public Attributes inherited from Tree< N, value >
bitvector< N > boundarylist
 
- Protected Attributes inherited from Tree< N, value >
real ancestorlength [3]
 
real ancestorcoords [3]
 
morton< N > ancestorkey = 0
 
uint npx
 
uint npy
 
uint npz
 

Detailed Description

template<size_t N, typename value>
class FullTree< N, value >

This Class is specifically designed for weak analysis to operate on the fulltree topology in this class, level is preset by the user and the level function is redefined to make use of the polymorphism.

Constructor & Destructor Documentation

◆ FullTree()

template<size_t N, typename value>
FullTree< N, value >::FullTree ( real length,
real coords 
)
inline

◆ ~FullTree()

template<size_t N, typename value>
FullTree< N, value >::~FullTree ( )
inline

Member Function Documentation

◆ assignProcs()

template<size_t N, typename value >
void FullTree< N, value >::assignProcs ( vector< uint > &  Nbrs,
uint  myrank 
)

◆ begin()

template<size_t N, typename value >
bitmap< N, value >::iterator FullTree< N, value >::begin ( )
virtual

iterator returning the first object

Reimplemented from Tree< N, value >.

◆ convertCoordToMorton()

template<size_t N, typename value >
void FullTree< N, value >::convertCoordToMorton ( real xyz,
morton< N > &  key 
)
virtual

!< this function is to find a value given the key

Reimplemented from Tree< N, value >.

◆ end()

template<size_t N, typename value >
bitmap< N, value >::iterator FullTree< N, value >::end ( )
virtual

iterator returning the last object

Reimplemented from Tree< N, value >.

◆ find()

template<size_t N, typename value >
bitmap< N, value >::iterator FullTree< N, value >::find ( morton< N >  key)
virtual

this function is to find a value given the key

!< this function is to find a value given the key

Reimplemented from Tree< N, value >.

◆ findFlipLevel()

template<size_t N, typename value >
void FullTree< N, value >::findFlipLevel ( morton< WSIZE key,
uint  fixedlevel,
uint changedirectionlevel,
uint direction 
)

◆ flipForNbr()

template<size_t N, typename value >
void FullTree< N, value >::flipForNbr ( morton< WSIZE > *  key,
uint  fixedlevel,
uint changedirectionlevel,
uint direction 
)

◆ getLevel()

template<size_t N, typename value >
uint FullTree< N, value >::getLevel ( )

◆ insertKey()

template<size_t N, typename value >
void FullTree< N, value >::insertKey ( morton< N >  key)

◆ isBoundary()

template<size_t N, typename value >
bool FullTree< N, value >::isBoundary ( uint direction,
uint  myrank 
)

◆ level()

template<size_t N, typename value >
void FullTree< N, value >::level ( morton< N >  key,
uint level 
)
virtual

obtains the level of the element from morton key

to prevent unnecesary bit operation, the morton code is placed from starting from left hand side

now look and see if any siblings exist

Reimplemented from Tree< N, value >.

◆ nbrsConstrcut()

template<size_t N, typename value >
void FullTree< N, value >::nbrsConstrcut ( vector< uint > &  Nbrs,
uint  myrank 
)

◆ setLevel()

template<size_t N, typename value >
void FullTree< N, value >::setLevel ( const uint l)

constructor sets the maximum level for refinement

◆ size()

template<size_t N, typename value >
uint FullTree< N, value >::size ( )
virtual

returns the size of the mesh

Reimplemented from Tree< N, value >.

Member Data Documentation

◆ derefinelist

template<size_t N, typename value>
std::unordered_map<morton<N>, int> FullTree< N, value >::derefinelist
private

list of elements tagged to be removed, due to 4:1 balance this listi

◆ fixedlevel

template<size_t N, typename value>
uint FullTree< N, value >::fixedlevel
private

maximum level of full tree

◆ mesh

template<size_t N, typename value>
bitmap<N, value> FullTree< N, value >::mesh
private

◆ mortonSTL

template<size_t N, typename value>
bitvector<N> FullTree< N, value >::mortonSTL
private

vector to store geometric points in morton code

◆ refinelist

template<size_t N, typename value>
std::unordered_map<morton<N>, int> FullTree< N, value >::refinelist
private

list of elements tagged to be refined


The documentation for this class was generated from the following files: