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

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

Public Member Functions

 Class_Octant (uint8_t level, uint32_t x, uint32_t y)
 
 Class_Octant (uint8_t level, uint32_t x, uint32_t y, bool bound)
 
 Class_Octant (const Class_Octant< 2 > &octant)
 
uint64_t computeMorton () const
 
uint64_t computeMorton ()
 
uint32_t getArea () const
 
bool getBalance () const
 
bool getBound (uint8_t face) const
 
dvector getCenter ()
 
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< 2 > &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< 2 >

Octant class definition - 2D 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 2-dimensional case, squares with size function of their level. Each octant has 4 nodes and 4 edge (improperly called faces in this code) ordered with Z-order as shown below.

PabloOctant.png

The main feature of each octant are:

Definition at line 34 of file Class_Octant_2D.tpp.

Member Function Documentation

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

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

Returns
morton Morton index of the octant.

Definition at line 373 of file Class_Octant_2D.tpp.

uint64_t Class_Octant< 2 >::computeMorton ( )
inline

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

Returns
morton Morton index of the octant.

Definition at line 384 of file Class_Octant_2D.tpp.

uint32_t Class_Octant< 2 >::getArea ( ) const
inline

Get the area of an octant in logical domain (for 2D case the same value of getSize).

Returns
Area of octant.

Definition at line 230 of file Class_Octant_2D.tpp.

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

Get if the octant has to be balanced.

Returns
true if the octant has to be balanced.

Definition at line 190 of file Class_Octant_2D.tpp.

bool Class_Octant< 2 >::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 154 of file Class_Octant_2D.tpp.

dvector Class_Octant< 2 >::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 248 of file Class_Octant_2D.tpp.

dvector Class_Octant< 2 >::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 octant.

Definition at line 265 of file Class_Octant_2D.tpp.

bool Class_Octant< 2 >::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 180 of file Class_Octant_2D.tpp.

bool Class_Octant< 2 >::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 175 of file Class_Octant_2D.tpp.

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

Get the level of an octant.

Returns
Level of octant.

Definition at line 143 of file Class_Octant_2D.tpp.

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

Get the refinement marker of an octant.

Returns
Marker of octant.

Definition at line 148 of file Class_Octant_2D.tpp.

void Class_Octant< 2 >::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 (with z=0) of the node of the octant.

Definition at line 316 of file Class_Octant_2D.tpp.

u32vector Class_Octant< 2 >::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 (with z=0) of the node of the octant.

Definition at line 333 of file Class_Octant_2D.tpp.

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

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

Parameters
[out]nodesVector[4][3] with the coordinates (with z=0) of the nodes of octant.

Definition at line 286 of file Class_Octant_2D.tpp.

void Class_Octant< 2 >::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 353 of file Class_Octant_2D.tpp.

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

Get if the octant is a balancing-blocked octant.

Returns
false if the octant has to be balanced.

Definition at line 185 of file Class_Octant_2D.tpp.

bool Class_Octant< 2 >::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 168 of file Class_Octant_2D.tpp.

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

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

Returns
Size of octant.

Definition at line 222 of file Class_Octant_2D.tpp.

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

Get the volume of an octant in logical domain.

Returns
Volume of octant.

Definition at line 238 of file Class_Octant_2D.tpp.

uint32_t Class_Octant< 2 >::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 128 of file Class_Octant_2D.tpp.

uint32_t Class_Octant< 2 >::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 133 of file Class_Octant_2D.tpp.

uint32_t Class_Octant< 2 >::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 138 of file Class_Octant_2D.tpp.

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

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

Definition at line 111 of file Class_Octant_2D.tpp.

void Class_Octant< 2 >::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 202 of file Class_Octant_2D.tpp.

void Class_Octant< 2 >::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 195 of file Class_Octant_2D.tpp.


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