Octant class definition. More...
#include <Octant.hpp>
Public Member Functions | |
Octant () | |
std::vector< Octant > | buildChildren () const |
void | buildChildren (Octant *children) const |
Octant | buildFather () const |
Octant | buildLastDesc () const |
u32array3 | computeFatherCoordinates () const |
uint64_t | computeFatherMorton () const |
u32array3 | computeLastDescCoordinates () const |
uint64_t | computeLastDescMorton () const |
uint64_t | computeNodePersistentKey (const u32array3 &node) const |
uint64_t | computeNodePersistentKey (uint8_t inode) const |
uint8_t | countChildren () const |
bool | getBalance () const |
bool | getBound () const |
bool | getBound (uint8_t face) const |
uint32_t | getDim () const |
bool | getEdgeBound (uint8_t edge) const |
int | getGhostLayer () const |
bool | getIsGhost () const |
bool | getIsNewC () const |
bool | getIsNewR () const |
uint8_t | getLevel () const |
uint64_t | getLogicalArea () const |
darray3 | getLogicalCenter () const |
u32array3 | getLogicalCoordinates () const |
uint32_t | getLogicalCoordinates (int coord) const |
darray3 | getLogicalEdgeCenter (uint8_t iedge) const |
darray3 | getLogicalFaceCenter (uint8_t iface) const |
void | getLogicalNode (u32array3 &node, uint8_t inode) const |
u32array3 | getLogicalNode (uint8_t inode) const |
u32arr3vector | getLogicalNodes () const |
void | getLogicalNodes (u32arr3vector &nodes) const |
uint32_t | getLogicalSize () const |
uint64_t | getLogicalVolume () const |
int8_t | getMarker () const |
uint64_t | getMorton () const |
bool | getNodeBound (uint8_t node) const |
void | getNormal (uint8_t iface, i8array3 &normal, const int8_t(&normals)[6][3]) const |
bool | getPbound () const |
bool | getPbound (uint8_t face) const |
Static Public Member Functions | |
static unsigned int | getBinarySize () |
Protected Member Functions | |
uint8_t | getFamilySplittingNode () const |
void | setBalance (bool balance) |
void | setBound (uint8_t face) |
void | setGhostLayer (int ghostLayer) |
void | setLevel (uint8_t level) |
void | setMarker (int8_t marker) |
void | setPbound (uint8_t face, bool flag) |
Friends | |
class | Global |
class | LocalTree |
OBinaryStream & | operator<<) (OBinaryStream &buf, const Octant &octant) |
IBinaryStream & | operator>>) (IBinaryStream &buf, Octant &octant) |
class | ParaTree |
Octant class definition.
Octants are the grid elements of PABLO. In the logical domain octants are squares or cubes, depending on dimension, with size function of their level. Each octant has nodes and faces ordered with Z-order.
The main feature of each octant are:
Definition at line 89 of file Octant.hpp.
bitpit::Octant::Octant | ( | ) |
Create a dummy octant.
Definition at line 118 of file Octant.cpp.
vector< Octant > bitpit::Octant::buildChildren | ( | ) | const |
Builds children of octant.
Definition at line 713 of file Octant.cpp.
void bitpit::Octant::buildChildren | ( | Octant * | children | ) | const |
Builds children of octant.
[out] | children | On output will containt the children of the octant ordered by Z-index, it's up to the caller allocate enough space for all the possible children. |
Definition at line 729 of file Octant.cpp.
Octant bitpit::Octant::buildFather | ( | ) | const |
Build the father octant of this octant.
Definition at line 689 of file Octant.cpp.
Octant bitpit::Octant::buildLastDesc | ( | ) | const |
Build the last descendant octant of this octant.
Definition at line 678 of file Octant.cpp.
u32array3 bitpit::Octant::computeFatherCoordinates | ( | ) | const |
Compute the coordinates (i.e. the coordinates of the node 0) of the father of this octant.
Definition at line 619 of file Octant.cpp.
uint64_t bitpit::Octant::computeFatherMorton | ( | ) | const |
Compute the Morton index of the father of this octant.
Definition at line 609 of file Octant.cpp.
u32array3 bitpit::Octant::computeLastDescCoordinates | ( | ) | const |
Compute the coordinates (i.e. the coordinates of the node 0) of the last descendant octant of this octant.
Definition at line 597 of file Octant.cpp.
uint64_t bitpit::Octant::computeLastDescMorton | ( | ) | const |
Compute the Morton index of the last descendant octant of this octant.
Definition at line 587 of file Octant.cpp.
uint64_t bitpit::Octant::computeNodePersistentKey | ( | const u32array3 & | node | ) | const |
Compute the persistent XYZ key of the given node (without level). The XYZ key combines the 32bit coordinates and generates a unique 64bit value (in two dimensions this is always possible, in three dimensions this is possible because with a 64bit wide Morton number not all 32 bits of the coordinates are used).
[in] | node | Logical coordinates of the node |
Definition at line 650 of file Octant.cpp.
uint64_t bitpit::Octant::computeNodePersistentKey | ( | uint8_t | inode | ) | const |
Compute the persistent XYZ key of the given node (without level). The XYZ key combines the 32bit coordinates and generates a unique 64bit value (in two dimensions this is always possible, in three dimensions this is possible because with a 64bit wide Morton number not all 32 bits of the coordinates are used).
[in] | inode | Local index of the node |
Definition at line 635 of file Octant.cpp.
uint8_t bitpit::Octant::countChildren | ( | ) | const |
Count children of octant.
Definition at line 700 of file Octant.cpp.
bool bitpit::Octant::getBalance | ( | ) | const |
Get if the octant has to be balanced.
Definition at line 379 of file Octant.cpp.
|
static |
Get the size of the buffer required to communicate the octant.
Definition at line 658 of file Octant.cpp.
bool bitpit::Octant::getBound | ( | ) | const |
Get the bound flag on an octant.
Definition at line 310 of file Octant.cpp.
bool bitpit::Octant::getBound | ( | uint8_t | face | ) | const |
Get the bound flag on an octant face.
[in] | face | local index of the face. |
Definition at line 272 of file Octant.cpp.
uint32_t bitpit::Octant::getDim | ( | ) | const |
Get the dimension of an octant, 2 or 3 if 2D or 3D octant.
Definition at line 237 of file Octant.cpp.
bool bitpit::Octant::getEdgeBound | ( | uint8_t | edge | ) | const |
Get the bound flag on an octant edge.
[in] | edge | local index of the edge. |
Definition at line 281 of file Octant.cpp.
|
protected |
Get the local index of the node corresponding to the splitting node of the octant family; i.e. the index of the local node coincident with the center point of the father.
Definition at line 863 of file Octant.cpp.
int bitpit::Octant::getGhostLayer | ( | ) | const |
Get the layer number of the ghost halo an octant belong to.
Definition at line 373 of file Octant.cpp.
bool bitpit::Octant::getIsGhost | ( | ) | const |
Get if the octant is a scary ghost octant.
Definition at line 367 of file Octant.cpp.
bool bitpit::Octant::getIsNewC | ( | ) | const |
Get if the octant is new after a coarsening.
Definition at line 361 of file Octant.cpp.
bool bitpit::Octant::getIsNewR | ( | ) | const |
Get if the octant is new after a refinement.
Definition at line 355 of file Octant.cpp.
uint8_t bitpit::Octant::getLevel | ( | ) | const |
uint64_t bitpit::Octant::getLogicalArea | ( | ) | const |
Get the area of an octant in logical domain .
Definition at line 440 of file Octant.cpp.
darray3 bitpit::Octant::getLogicalCenter | ( | ) | const |
Get the coordinates of the center of an octant in logical domain.
Definition at line 458 of file Octant.cpp.
u32array3 bitpit::Octant::getLogicalCoordinates | ( | ) | const |
Get the coordinates of an octant, i.e. the coordinates of its node 0.
Definition at line 243 of file Octant.cpp.
uint32_t bitpit::Octant::getLogicalCoordinates | ( | int | coord | ) | const |
Get the coordinates of an octant, i.e. the coordinates of its node 0.
Definition at line 251 of file Octant.cpp.
darray3 bitpit::Octant::getLogicalEdgeCenter | ( | uint8_t | iedge | ) | const |
Get the coordinates of the center of a edge of an octant in logical domain.
[in] | iedge | Local index of the edge |
Definition at line 493 of file Octant.cpp.
darray3 bitpit::Octant::getLogicalFaceCenter | ( | uint8_t | iface | ) | const |
Get the coordinates of the center of a face of an octant in logical domain.
[in] | iface | Local index of the face |
Definition at line 474 of file Octant.cpp.
void bitpit::Octant::getLogicalNode | ( | u32array3 & | node, |
uint8_t | inode ) const |
Get the coordinates of a nodes of an octant in logical domain.
[in] | inode | Local index of the node |
[out] | node | Array[3] with the logical coordinates of the node of the octant. |
Definition at line 541 of file Octant.cpp.
u32array3 bitpit::Octant::getLogicalNode | ( | uint8_t | inode | ) | const |
Get the coordinates of a nodes of an octant in logical domain.
[in] | inode | Local index of the node |
Definition at line 558 of file Octant.cpp.
u32arr3vector bitpit::Octant::getLogicalNodes | ( | ) | const |
Get the coordinates of the nodes of an octant in logical domain.
Definition at line 531 of file Octant.cpp.
void bitpit::Octant::getLogicalNodes | ( | u32arr3vector & | nodes | ) | const |
Get the coordinates of the nodes of an octant in logical domain.
[out] | nodes | Vector of arrays [nnodes][3] with the coordinates of the nodes of octant. |
Definition at line 510 of file Octant.cpp.
uint32_t bitpit::Octant::getLogicalSize | ( | ) | const |
Get the size of an octant in logical domain, i.e. the side length.
Definition at line 432 of file Octant.cpp.
uint64_t bitpit::Octant::getLogicalVolume | ( | ) | const |
Get the volume of an octant in logical domain.
Definition at line 448 of file Octant.cpp.
int8_t bitpit::Octant::getMarker | ( | ) | const |
Get the refinement marker of an octant.
Definition at line 265 of file Octant.cpp.
uint64_t bitpit::Octant::getMorton | ( | ) | const |
Get the Morton index of the octant (without level).
Definition at line 580 of file Octant.cpp.
bool bitpit::Octant::getNodeBound | ( | uint8_t | node | ) | const |
Get the bound flag on an octant node.
[in] | node | local index of the node. |
Definition at line 296 of file Octant.cpp.
void bitpit::Octant::getNormal | ( | uint8_t | iface, |
i8array3 & | normal, | ||
const int8_t(&) | normals[6][3] ) const |
Get the normal of a face of an octant in logical domain.
[in] | iface | Index of the face for normal computing. |
[out] | normal | Array[3] with components (with z=0) of the normal of face. |
[in] | normals | Global structure with components of face normals of a reference octant. |
Definition at line 569 of file Octant.cpp.
bool bitpit::Octant::getPbound | ( | ) | const |
Get the pbound flag on an octant face.
Definition at line 341 of file Octant.cpp.
bool bitpit::Octant::getPbound | ( | uint8_t | face | ) | const |
Get the pbound flag on an octant face.
[in] | face | local index of the face. |
Definition at line 333 of file Octant.cpp.
|
protected |
Set the balancing condition of an octant.
[in] | balance | Has octant to be 2:1 balanced in adapting procedure? |
Definition at line 393 of file Octant.cpp.
|
protected |
Set the boundary flag to true on an octant face.
[in] | face | local index of the boundary face. |
Definition at line 324 of file Octant.cpp.
|
protected |
Set the ghost specifier of an octant.
[in] | ghostLayer | Number defining the layer of the ghost halo. 0 is for internal octants, i.e. non-ghost. ghostLayer > 0 means that the octant is ghost in the ghostLayer layer of the ghost halo. |
Definition at line 419 of file Octant.cpp.
|
protected |
Set the level of an octant.
[in] | level | New level of the octant. |
Definition at line 401 of file Octant.cpp.
|
protected |
Set the refinement marker of an octant.
[in] | marker | Refinement marker of octant (n=n refinement in adapt, -n=n coarsening in adapt, default=0). |
Definition at line 385 of file Octant.cpp.
|
protected |
Set the process boundary condition of an octant.
[in] | face | Index of the target face to set. |
[in] | flag | Condition true/false if the target face is /is not a process boundary face. |
Definition at line 410 of file Octant.cpp.
|
friend |
Definition at line 97 of file Octant.hpp.
|
friend |
Definition at line 95 of file Octant.hpp.
|
friend |
Definition at line 96 of file Octant.hpp.