PABLO  0.1
PArallel Balanced Linear Octree
 All Classes Functions Variables Pages
Public Types | Public Member Functions | Friends | List of all members
Class_Octant< 3 > Class Template Reference

Octant class definition - 3D specialization. More...

Public Types

typedef vector< double > dvector
 
typedef vector< Class_Octant< 3 > > OctantsType
 
typedef vector< uint32_t > u32vector
 
typedef vector< vector
< uint32_t > > 
u32vector2D
 
typedef vector< vector
< uint64_t > > 
u64vector2D
 

Public Member Functions

 Class_Octant (int8_t level, int32_t x, int32_t y, int32_t z)
 
 Class_Octant (int8_t level, int32_t x, int32_t y, int32_t z, bool bound)
 
 Class_Octant (const Class_Octant< 3 > &octant)
 
uint64_t computeMorton () const
 
uint64_t computeMorton ()
 
uint64_t getArea () const
 
bool getBalance () const
 
bool getBound (uint8_t face) const
 
dvector getCenter ()
 
dvector getEdgeCenter (uint8_t iedge)
 
dvector getFaceCenter (uint8_t iface)
 
bool getIsNewC () const
 
bool getIsNewR () const
 
uint8_t getLevel () const
 
int8_t getMarker () const
 
void getNode (u32vector &node, uint8_t inode)
 
u32vector getNode (uint8_t inode)
 
void getNodes (u32vector2D &nodes)
 
void getNormal (uint8_t &iface, vector< int8_t > &normal)
 
bool getNotBalance () const
 
bool getPbound (uint8_t face) const
 
uint32_t getSize () const
 
uint64_t getVolume () const
 
uint32_t getX () const
 
uint32_t getY () const
 
uint32_t getZ () const
 
bool operator== (const Class_Octant< 3 > &oct2)
 
void setBalance (bool balance)
 
void setMarker (int8_t marker)
 

Friends

template<int dim>
class Class_Local_Tree
 
template<int dim>
class Class_Para_Tree
 

Detailed Description

template<>
class Class_Octant< 3 >

Octant class definition - 3D specialization.

Date
23/apr/2014
Authors
Edoardo Lombardi
Marco Cisternino
Version
0.1
License:
This version of PABLO is released under the LGPL License.

Octants are the grid elements of PABLO. In the logical domain octants are, in 3-dimensional case, cubes with size function of their level. Each octant has 8 nodes, 12 edge and 6 faces ordered with Z-order as shown below.

PabloOctant3D.png

The main feature of each octant are:

Definition at line 32 of file Class_Octant_3D.tpp.

Member Function Documentation

uint64_t Class_Octant< 3 >::computeMorton ( ) const
inline

Compute the Morton index of the octant (without level).

Returns
morton Morton index of the octant.

Definition at line 407 of file Class_Octant_3D.tpp.

uint64_t Class_Octant< 3 >::computeMorton ( )
inline

Compute the Morton index of the octant (without level).

Returns
morton Morton index of the octant.

Definition at line 417 of file Class_Octant_3D.tpp.

uint64_t Class_Octant< 3 >::getArea ( ) const
inline

Get the area of an octant in logical domain .

Returns
Area of octant.

Definition at line 236 of file Class_Octant_3D.tpp.

bool Class_Octant< 3 >::getBalance ( ) const
inline

Get if the octant has to be balanced.

Returns
true if the octant has to be balanced.

Definition at line 196 of file Class_Octant_3D.tpp.

bool Class_Octant< 3 >::getBound ( uint8_t  face) const
inline

Get the bound flag on an octant face.

Parameters
[in]ifacelocal index of the face.
Returns
true if the iface face is a boundary face.

Definition at line 160 of file Class_Octant_3D.tpp.

dvector Class_Octant< 3 >::getCenter ( )
inline

Get the coordinates of the center of an octant in logical domain.

Returns
Vector[3] with the coordinates of the center of octant.

Definition at line 254 of file Class_Octant_3D.tpp.

dvector Class_Octant< 3 >::getEdgeCenter ( uint8_t  iedge)
inline

Get the coordinates of the center of a edge of an octant in logical domain.

Returns
Vector[3] with the coordinates of the center of the octant edge.

Definition at line 292 of file Class_Octant_3D.tpp.

dvector Class_Octant< 3 >::getFaceCenter ( uint8_t  iface)
inline

Get the coordinates of the center of a face of an octant in logical domain.

Returns
Vector[3] with the coordinates of the center of the octant face.

Definition at line 271 of file Class_Octant_3D.tpp.

bool Class_Octant< 3 >::getIsNewC ( ) const
inline

Get if the octant is new after a coarsening.

Returns
true if the the octant is new after a coarsening.

Definition at line 186 of file Class_Octant_3D.tpp.

bool Class_Octant< 3 >::getIsNewR ( ) const
inline

Get if the octant is new after a refinement.

Returns
true if the the octant is new after a refinement.

Definition at line 181 of file Class_Octant_3D.tpp.

uint8_t Class_Octant< 3 >::getLevel ( ) const
inline

Get the level of an octant.

Returns
Level of octant.

Definition at line 149 of file Class_Octant_3D.tpp.

int8_t Class_Octant< 3 >::getMarker ( ) const
inline

Get the refinement marker of an octant.

Returns
Marker of octant.

Definition at line 154 of file Class_Octant_3D.tpp.

void Class_Octant< 3 >::getNode ( u32vector &  node,
uint8_t  inode 
)
inline

Get the coordinates of a nodes of an octant in logical domain.

Parameters
[in]inodeLocal index of the node
[out]nodedim-vector with the logical coordinates of the node of the octant.

Definition at line 344 of file Class_Octant_3D.tpp.

u32vector Class_Octant< 3 >::getNode ( uint8_t  inode)
inline

Get the coordinates of a nodes of an octant in logical domain.

Parameters
[in]inodeLocal index of the node
[out]nodedim-vector with the logical coordinates of the node of the octant.

Definition at line 364 of file Class_Octant_3D.tpp.

void Class_Octant< 3 >::getNodes ( u32vector2D &  nodes)
inline

Get the coordinates of the nodes of an octant in logical domain.

Parameters
[out]nodesVector[4][3] with the coordinates of the nodes of octant.

Definition at line 313 of file Class_Octant_3D.tpp.

void Class_Octant< 3 >::getNormal ( uint8_t &  iface,
vector< int8_t > &  normal 
)
inline

Get the normal of a face of an octant in logical domain.

Parameters
[in]ifaceIndex of the face for normal computing.
[out]normalVector[3] with components (with z=0) of the normal of face.

Definition at line 387 of file Class_Octant_3D.tpp.

bool Class_Octant< 3 >::getNotBalance ( ) const
inline

Get if the octant is a balancing-blocked octant.

Returns
false if the octant has to be balanced.

Definition at line 191 of file Class_Octant_3D.tpp.

bool Class_Octant< 3 >::getPbound ( uint8_t  face) const
inline

Get the pbound flag on an octant face.

Parameters
[in]ifacelocal index of the face.
Returns
true if the iface face is a process boundary face.

Definition at line 174 of file Class_Octant_3D.tpp.

uint32_t Class_Octant< 3 >::getSize ( ) const
inline

Get the size of an octant in logical domain, i.e. the side length.

Returns
Size of octant.

Definition at line 228 of file Class_Octant_3D.tpp.

uint64_t Class_Octant< 3 >::getVolume ( ) const
inline

Get the volume of an octant in logical domain.

Returns
Volume of octant.

Definition at line 244 of file Class_Octant_3D.tpp.

uint32_t Class_Octant< 3 >::getX ( ) const
inline

Get the coordinates of an octant, i.e. the coordinates of its node 0.

Returns
Coordinate X of node 0.

Definition at line 134 of file Class_Octant_3D.tpp.

uint32_t Class_Octant< 3 >::getY ( ) const
inline

Get the coordinates of an octant, i.e. the coordinates of its node 0.

Returns
Coordinate Y of node 0.

Definition at line 139 of file Class_Octant_3D.tpp.

uint32_t Class_Octant< 3 >::getZ ( ) const
inline

Get the coordinates of an octant, i.e. the coordinates of its node 0.

Returns
Coordinate Z of node 0.

Definition at line 144 of file Class_Octant_3D.tpp.

bool Class_Octant< 3 >::operator== ( const Class_Octant< 3 > &  oct2)
inline

Check if two octants are equal (no check on info)

Definition at line 116 of file Class_Octant_3D.tpp.

void Class_Octant< 3 >::setBalance ( bool  balance)
inline

Set the balancing condition of an octant.

Parameters
[in]balanceHas octant to be 2:1 balanced in adapting procedure?

Definition at line 208 of file Class_Octant_3D.tpp.

void Class_Octant< 3 >::setMarker ( int8_t  marker)
inline

Set the refinement marker of an octant.

Parameters
[in]markerRefinement marker of octant (n=n refinement in adapt, -n=n coarsening in adapt, default=0).

Definition at line 201 of file Class_Octant_3D.tpp.


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