Dendro  5.01
Dendro in Greek language means tree. The Dendro library is a large scale (262K cores on ORNL's Titan) distributed memory adaptive octree framework. The main goal of Dendro is to perform large scale multiphysics simulations efficeiently in mordern supercomputers. Dendro consists of efficient parallel data structures and algorithms to perform variational ( finite element) methods and finite difference mthods on 2:1 balanced arbitary adaptive octrees which enables the users to perform simulations raning from black holes (binary black hole mergers) to blood flow in human body, where applications ranging from relativity, astrophysics to biomedical engineering.
Public Types | Public Member Functions | Protected Attributes | List of all members
ot::TreeNode Class Reference

A class to manage octants. More...

#include <TreeNode.h>

Inheritance diagram for ot::TreeNode:
Inheritance graph
[legend]

Public Types

enum  BoundaryType1 { NEGATIVE = 2, POSITIVE = 4 }
 The type of boundary. More...
 
enum  BoundaryType2 {
  X_NEG_BDY =1, Y_NEG_BDY =2, Z_NEG_BDY =4, NEG_POS_DEMARCATION =8,
  EXTERNAL_BDY =16, X_POS_BDY =32, Y_POS_BDY =64, Z_POS_BDY =128
}
 The type of boundary.
 
enum  BoundaryType3 { FACE_BDY =1, EDGE_BDY =2, CORNER_BDY =3 }
 The type of boundary.
 
enum  OctantFlagType { MAX_LEVEL =31, BOUNDARY =64, NODE =128 }
 

Public Member Functions

 TreeNode (const int dummy, const unsigned int x, const unsigned int y, const unsigned int z, const unsigned int level, const unsigned int dim, const unsigned int maxDepth)
 
 TreeNode (const unsigned int x, const unsigned int y, const unsigned int z, const unsigned int level, const unsigned int dim, const unsigned int maxDepth)
 
 TreeNode (const unsigned int dim, const unsigned int maxDepth)
 
unsigned int getDim () const
 return the dimension of the octant More...
 
unsigned int getMaxDepth () const
 return the maxDepth of the octant based of the global value. More...
 
unsigned int getLevel () const
 return the level of the of the octant More...
 
void setFlag (unsigned int flag)
 set the m_uiFlag value. Which is used to store the level and other aditional info. More...
 
unsigned int getFlag () const
 get the m_uiFlag value. Which is used to store the level and other aditional info. More...
 
unsigned int getX () const
 get integer values of the octree coordinates. More...
 
unsigned int getY () const
 
unsigned int getZ () const
 
bool isRoot () const
 returns true if the current considering node is a root node. More...
 
void incrementLevel ()
 Can be used the increment octant level by 1. Used in SFC treeSearch function. More...
 
bool operator== (TreeNode const &other) const
 Two octants are equal if their respective anchors are equal and their levels are equal. More...
 
bool operator!= (TreeNode const &other) const
 Two octants are equal if their respective anchors are equal and their levels are equal. More...
 
bool operator< (TreeNode const &other) const
 The comparisons are based on the Morton/Hilbert ordering of the octants. More...
 
bool operator> (TreeNode const &other) const
 The comparisons are based on the Morton/Hilbert ordering of the octants. More...
 
bool operator<= (TreeNode const &other) const
 The comparisons are based on the Morton/Hilbert ordering of the octants. More...
 
bool operator>= (TreeNode const &other) const
 The comparisons are based on the Morton/Hilbert ordering of the octants. More...
 
unsigned int genHkey_Bonsai_sc16 () const
 
TreeNode getNCA (TreeNode const &other) const
 
bool isAncestor (const TreeNode &other) const
 
unsigned int minX () const
 returns true min corner(anchor) and the max corner coordinates of a octant. More...
 
unsigned int minY () const
 
unsigned int minZ () const
 
unsigned int maxX () const
 
unsigned int maxY () const
 
unsigned int maxZ () const
 
TreeNode getParent () const
 returns the parent of the current octant More...
 
TreeNode getDFDMorton () const
 
TreeNode getDFD () const
 
TreeNode getDLD () const
 
TreeNode getLeft () const
 returns the neighbour octants (right, left top bottom etc) More...
 
TreeNode getRight () const
 
TreeNode getTop () const
 
TreeNode getBottom () const
 
TreeNode getFront () const
 
TreeNode getBack () const
 
TreeNode getTopLeft () const
 
TreeNode getTopRight () const
 
TreeNode getBottomLeft () const
 
TreeNode getBottomRight () const
 
TreeNode getLeftFront () const
 
TreeNode getRightFront () const
 
TreeNode getTopFront () const
 
TreeNode getBottomFront () const
 
TreeNode getTopLeftFront () const
 
TreeNode getTopRightFront () const
 
TreeNode getBottomLeftFront () const
 
TreeNode getBottomRightFront () const
 
TreeNode getLeftBack () const
 
TreeNode getRightBack () const
 
TreeNode getTopBack () const
 
TreeNode getBottomBack () const
 
TreeNode getTopLeftBack () const
 
TreeNode getTopRightBack () const
 
TreeNode getBottomLeftBack () const
 
TreeNode getBottomRightBack () const
 
std::vector< TreeNodegetAllNeighbours () const
 
int getAnchor (unsigned int &x, unsigned int &y, unsigned int &z) const
 
Point getAnchor () const
 
unsigned int getMortonIndex () const
 
bool isBoundaryOctant (int type=POSITIVE, unsigned char *flags=NULL) const
 flags is a datastructure which will store which boundaries were touched. highest 3 bits are for +Z,+y, and +x axes ... and and smallest 3 are for -z,-y and -x axes. More...
 
bool isBoundaryOctant (const TreeNode &block, int type=POSITIVE, unsigned char *flags=NULL) const
 flags is a datastructure which will store which boundaries were touched. highest 3 bits are for +Z,+y, and +x axes ... and and smallest 3 are for -z,-y and -x axes. More...
 
int addChildren (std::vector< ot::TreeNode > &children) const
 
int getChildrenInMortonOrdering (std::vector< ot::TreeNode > &children) const
 

Protected Attributes

unsigned int m_uiX
 
unsigned int m_uiY
 
unsigned int m_uiZ
 
unsigned int m_uiLevel
 

Detailed Description

A class to manage octants.

Author
Rahul Sampath

Member Enumeration Documentation

◆ BoundaryType1

The type of boundary.

Author
Rahul Sampath
Milinda Fernando Following are the attributes and functionalities that needed by mesh computation based on the 2:1 balanced octree. Most of the functions taken from the old dendro implementation.

Member Function Documentation

◆ getDFD()

TreeNode ot::TreeNode::getDFD ( ) const

Returns the deepest first decent of the considering octant based on the SFC being used.

◆ getDFDMorton()

TreeNode ot::TreeNode::getDFDMorton ( ) const

: Returns the deepest first child in Morton ordering.

◆ getDim()

unsigned int ot::TreeNode::getDim ( ) const
inline

return the dimension of the octant

Author
Milinda Fernando

◆ getDLD()

TreeNode ot::TreeNode::getDLD ( ) const

Returns the deepest last decent of the considering octant based on the SFC beging used

◆ getFlag()

unsigned int ot::TreeNode::getFlag ( ) const
inline

get the m_uiFlag value. Which is used to store the level and other aditional info.

Author
Milinda Fernando

◆ getLeft()

TreeNode ot::TreeNode::getLeft ( ) const
inline

returns the neighbour octants (right, left top bottom etc)

Author
Milinda Fernando
Rahul Sampath

◆ getLevel()

unsigned int ot::TreeNode::getLevel ( ) const
inline

return the level of the of the octant

Author
Milinda Fernando

◆ getMaxDepth()

unsigned int ot::TreeNode::getMaxDepth ( ) const
inline

return the maxDepth of the octant based of the global value.

Author
Milinda Fernando

◆ getParent()

TreeNode ot::TreeNode::getParent ( ) const
inline

returns the parent of the current octant

Author
Milinda Fernando

◆ getX()

unsigned int ot::TreeNode::getX ( ) const
inline

get integer values of the octree coordinates.

Author
Milinda Fernando

◆ incrementLevel()

void ot::TreeNode::incrementLevel ( )
inline

Can be used the increment octant level by 1. Used in SFC treeSearch function.

Author
Milinda Fernando

◆ isBoundaryOctant() [1/2]

bool ot::TreeNode::isBoundaryOctant ( int  type = POSITIVE,
unsigned char *  flags = NULL 
) const

flags is a datastructure which will store which boundaries were touched. highest 3 bits are for +Z,+y, and +x axes ... and and smallest 3 are for -z,-y and -x axes.

Author
Hari Sundar

◆ isBoundaryOctant() [2/2]

bool ot::TreeNode::isBoundaryOctant ( const TreeNode block,
int  type = POSITIVE,
unsigned char *  flags = NULL 
) const

flags is a datastructure which will store which boundaries were touched. highest 3 bits are for +Z,+y, and +x axes ... and and smallest 3 are for -z,-y and -x axes.

Author
Hari Sundar

◆ isRoot()

bool ot::TreeNode::isRoot ( ) const
inline

returns true if the current considering node is a root node.

Author
Milinda Fernando

◆ minX()

unsigned int ot::TreeNode::minX ( ) const
inline

returns true min corner(anchor) and the max corner coordinates of a octant.

Author
Milinda Fernando

◆ operator!=()

bool ot::TreeNode::operator!= ( TreeNode const &  other) const
inline

Two octants are equal if their respective anchors are equal and their levels are equal.

Author
Rahul Sampath

◆ operator<()

bool ot::TreeNode::operator< ( TreeNode const &  other) const
inline

The comparisons are based on the Morton/Hilbert ordering of the octants.

Author
Rahul Sampath
Milinda Fernando
Remarks
Hilbert based comparision operator is O(nlog(n)). Which is costly than the standard Morton implmentation.

◆ operator<=()

bool ot::TreeNode::operator<= ( TreeNode const &  other) const
inline

The comparisons are based on the Morton/Hilbert ordering of the octants.

Author
Rahul Sampath

◆ operator==()

bool ot::TreeNode::operator== ( TreeNode const &  other) const
inline

Two octants are equal if their respective anchors are equal and their levels are equal.

Author
Rahul Sampath

◆ operator>()

bool ot::TreeNode::operator> ( TreeNode const &  other) const
inline

The comparisons are based on the Morton/Hilbert ordering of the octants.

Author
Rahul Sampath

◆ operator>=()

bool ot::TreeNode::operator>= ( TreeNode const &  other) const
inline

The comparisons are based on the Morton/Hilbert ordering of the octants.

Author
Rahul Sampath

◆ setFlag()

void ot::TreeNode::setFlag ( unsigned int  flag)
inline

set the m_uiFlag value. Which is used to store the level and other aditional info.

Author
Milinda Fernando

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