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

Parallel Octree Manager Class - 2D specialization. More...

Collaboration diagram for Class_Para_Tree< 2 >:
Collaboration graph
[legend]

Public Types

typedef vector< double > dvector
 
typedef vector< vector< double > > dvector2D
 
typedef vector< int > ivector
 
typedef vector< vector< int > > ivector2D
 
typedef vector< Class_Octant< 2 > > OctantsType
 
typedef vector< uint32_t > u32vector
 
typedef vector< vector
< uint32_t > > 
u32vector2D
 
typedef vector< vector
< uint64_t > > 
u64vector2D
 

Public Member Functions

 Class_Para_Tree (string logfile="PABLO.log", MPI_Comm comm_=MPI_COMM_WORLD)
 
 Class_Para_Tree (double X, double Y, double Z, double L, string logfile="PABLO.log", MPI_Comm comm_=MPI_COMM_WORLD)
 
 Class_Para_Tree (double X, double Y, double Z, double L, ivector2D &XY, ivector &levels, string logfile="PABLO.log", MPI_Comm comm_=MPI_COMM_WORLD)
 
bool adapt ()
 
bool adapt (bool mapper_flag)
 
bool adapt (u32vector &mapper)
 
bool adaptGlobalCoarse ()
 
bool adaptGlobalCoarse (u32vector &mapidx)
 
bool adaptGlobalRefine ()
 
bool adaptGlobalRefine (u32vector &mapidx)
 
void clearConnectivity ()
 
void clearGhostsConnectivity ()
 
template<class Impl >
void communicate (Class_Data_Comm_Interface< Impl > &userData)
 
void computeConnectivity ()
 
void computeGhostsConnectivity ()
 
void computeIntersections ()
 
void findGhostNeighbours (uint32_t idx, uint8_t iface, uint8_t codim, u32vector &neighbours)
 
void findNeighbours (uint32_t idx, uint8_t iface, uint8_t codim, u32vector &neighbours, vector< bool > &isghost)
 
void findNeighbours (Class_Octant< 2 > *oct, uint8_t iface, uint8_t codim, u32vector &neighbours, vector< bool > &isghost)
 
int findOwner (const uint64_t &morton)
 
double getArea (Class_Octant< 2 > *oct)
 
double getArea (uint32_t idx)
 
double getArea (Class_Intersection< 2 > *inter)
 
bool getBalance (Class_Octant< 2 > *oct)
 
bool getBalance (uint32_t idx)
 
uint8_t getBalanceCodimension () const
 
bool getBound (Class_Octant< 2 > *oct, uint8_t iface)
 
bool getBound (Class_Octant< 2 > *oct)
 
bool getBound (Class_Intersection< 2 > *inter)
 
void getCenter (Class_Octant< 2 > *oct, vector< double > &center)
 
vector< double > getCenter (Class_Octant< 2 > *oct)
 
void getCenter (uint32_t idx, vector< double > &center)
 
vector< double > getCenter (uint32_t idx)
 
vector< double > getCenter (Class_Intersection< 2 > *inter)
 
const u32vector2D & getConnectivity ()
 
uint8_t getFace (Class_Intersection< 2 > *inter)
 
vector< double > getFaceCenter (Class_Octant< 2 > *oct, uint8_t iface)
 
void getFaceCenter (Class_Octant< 2 > *oct, uint8_t iface, vector< double > &center)
 
vector< double > getFaceCenter (uint32_t idx, uint8_t iface)
 
void getFaceCenter (uint32_t idx, uint8_t iface, vector< double > &center)
 
bool getFiner (Class_Intersection< 2 > *inter)
 
const Class_Octant< 2 > & getFirstDesc () const
 
const u32vector2D & getGhostConnectivity ()
 
uint64_t getGhostGlobalIdx (uint32_t idx)
 
dvector getGhostNodeCoordinates (uint32_t inode)
 
u32vector getGhostNodeLogicalCoordinates (uint32_t inode)
 
const u32vector2D & getGhostNodes ()
 
Class_Octant< 2 > * getGhostOctant (uint32_t idx)
 
u32vector getGhostOctantConnectivity (uint32_t idx)
 
u32vector getGhostOctantConnectivity (Class_Octant< 2 > *oct)
 
const Class_Global< 2 > & getGlobal ()
 
uint64_t getGlobalIdx (Class_Octant< 2 > *oct)
 
uint64_t getGlobalIdx (uint32_t idx)
 
uint32_t getIdx (Class_Octant< 2 > *oct)
 
Class_Intersection< 2 > * getIntersection (uint32_t idx)
 
bool getIsGhost (Class_Octant< 2 > *oct)
 
bool getIsGhost (uint32_t idx)
 
bool getIsGhost (Class_Intersection< 2 > *inter)
 
bool getIsNewC (Class_Octant< 2 > *oct)
 
bool getIsNewC (uint32_t idx)
 
bool getIsNewR (Class_Octant< 2 > *oct)
 
bool getIsNewR (uint32_t idx)
 
const Class_Octant< 2 > & getLastDesc () const
 
uint64_t getLastDescMorton (uint32_t idx)
 
uint8_t getLevel (Class_Octant< 2 > *oct)
 
uint8_t getLevel (uint32_t idx)
 
uint8_t getLevel (Class_Intersection< 2 > *inter)
 
uint8_t getLocalMaxDepth () const
 
Class_Octant< 2 > * getLogicalPointOwner (dvector &point)
 
uint32_t getLogicalPointOwnerIdx (dvector &point)
 
void getMapping (uint32_t &idx, u32vector &mapper, vector< bool > &isghost)
 
int8_t getMarker (Class_Octant< 2 > *oct)
 
int8_t getMarker (uint32_t idx)
 
vector< double > getNode (uint32_t idx, uint8_t inode)
 
void getNode (uint32_t idx, uint8_t inode, vector< double > &node)
 
dvector getNodeCoordinates (uint32_t inode)
 
u32vector getNodeLogicalCoordinates (uint32_t inode)
 
void getNodes (Class_Octant< 2 > *oct, dvector2D &nodes)
 
dvector2D getNodes (Class_Octant< 2 > *oct)
 
void getNodes (uint32_t idx, dvector2D &nodes)
 
dvector2D getNodes (uint32_t idx)
 
dvector2D getNodes (Class_Intersection< 2 > *inter)
 
const u32vector2D & getNodes ()
 
void getNormal (Class_Octant< 2 > *oct, uint8_t &iface, dvector &normal)
 
dvector getNormal (Class_Octant< 2 > *oct, uint8_t &iface)
 
void getNormal (uint32_t idx, uint8_t &iface, dvector &normal)
 
dvector getNormal (uint32_t idx, uint8_t &iface)
 
dvector getNormal (Class_Intersection< 2 > *inter)
 
uint32_t getNumGhosts () const
 
uint32_t getNumIntersections ()
 
uint32_t getNumNodes ()
 
uint32_t getNumOctants () const
 
Class_Octant< 2 > * getOctant (uint32_t idx)
 
u32vector getOctantConnectivity (uint32_t idx)
 
u32vector getOctantConnectivity (Class_Octant< 2 > *oct)
 
u32vector getOwners (Class_Intersection< 2 > *inter)
 
bool getPbound (Class_Octant< 2 > *oct, uint8_t iface)
 
bool getPbound (Class_Octant< 2 > *oct)
 
bool getPbound (Class_Intersection< 2 > *inter)
 
Class_Octant< 2 > * getPointOwner (dvector &point)
 
Class_Octant< 2 > * getPointOwner (u32vector &point)
 
uint32_t getPointOwnerIdx (dvector &point)
 
uint32_t getPointOwnerIdx (u32vector &point)
 
double getSize (Class_Octant< 2 > *oct)
 
double getSize (uint32_t idx)
 
double getSize (Class_Intersection< 2 > *inter)
 
uint64_t getStatus ()
 
double getVolume (Class_Octant< 2 > *oct)
 
double getVolume (uint32_t idx)
 
double getX (Class_Octant< 2 > *oct)
 
double getX (uint32_t idx)
 
double getY (Class_Octant< 2 > *oct)
 
double getY (uint32_t idx)
 
double getZ (Class_Octant< 2 > *oct)
 
double getZ (uint32_t idx)
 
void loadBalance ()
 
void loadBalance (uint8_t &level)
 
template<class Impl >
void loadBalance (Class_Data_LB_Interface< Impl > &userData, dvector *weight=NULL)
 
template<class Impl >
void loadBalance (Class_Data_LB_Interface< Impl > &userData, uint8_t &level)
 
vector< pair< pair< uint32_t,
uint32_t >, pair< int, int > > > 
mapPablos (Class_Para_Tree< 2 > &ptree)
 
void setBalance (Class_Octant< 2 > *oct, bool balance)
 
void setBalance (uint32_t idx, bool balance)
 
void setBalanceCodimension (uint8_t b21codim)
 
void setMarker (Class_Octant< 2 > *oct, int8_t marker)
 
void setMarker (uint32_t idx, int8_t marker)
 
void updateConnectivity ()
 
void updateGhostsConnectivity ()
 
void write (string filename)
 
void writeLogical (string filename)
 
void writeTest (string filename, vector< double > data)
 

Public Attributes

map< int, vector< uint32_t > > bordersPerProc
 
MPI_Comm comm
 
int error_flag
 
uint64_t global_num_octants
 
Class_Log log
 
u32vector mapidx
 
uint8_t max_depth
 
int nproc
 
Class_Local_Tree< 2 > octree
 
uint64_t * partition_first_desc
 
uint64_t * partition_last_desc
 
uint64_t * partition_range_globalidx
 
int rank
 
bool serial
 
uint64_t status
 
Class_Map< 2 > trans
 

Detailed Description

template<>
class Class_Para_Tree< 2 >

Parallel Octree Manager Class - 2D specialization.

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

Para Tree is the user interface class. One user should (read can...) work only with this Class and its methods. The sizes are intended in physical domain. The transformation from the logical domain to the physical domain is defined by Class_Map<2> trans.

The partition of the octree is performed by following the Z-curve defined by the Morton index of the octants. By default it is a balanced partition over the number of octants for each process.

Definition at line 28 of file Class_Para_Tree_2D.tpp.

Constructor & Destructor Documentation

Class_Para_Tree< 2 >::Class_Para_Tree ( string  logfile = "PABLO.log",
MPI_Comm  comm_ = MPI_COMM_WORLD 
)
inline

Default Constructor of Para_Tree. It builds one octant with node 0 in the Origin (0,0,0) and side of length 1

Parameters
[in]logfileThe file name for the log of this object. PABLO.log is the default value

Definition at line 90 of file Class_Para_Tree_2D.tpp.

Class_Para_Tree< 2 >::Class_Para_Tree ( double  X,
double  Y,
double  Z,
double  L,
string  logfile = "PABLO.log",
MPI_Comm  comm_ = MPI_COMM_WORLD 
)
inline

Constructor of Para_Tree with input parameters. It builds one octant with :

Parameters
[in]XCoordinate X of node 0,
[in]YCoordinate Y of node 0,
[in]ZCoordinate Z of node 0,
[in]LSide length of the octant.
[in]logfileThe file name for the log of this object. PABLO.log is the default value

Definition at line 142 of file Class_Para_Tree_2D.tpp.

Class_Para_Tree< 2 >::Class_Para_Tree ( double  X,
double  Y,
double  Z,
double  L,
ivector2D &  XY,
ivector &  levels,
string  logfile = "PABLO.log",
MPI_Comm  comm_ = MPI_COMM_WORLD 
)
inline

Constructor of Para_Tree for restart a simulation with input parameters. For each process it builds a vector of octants. The input parameters are :

Parameters
[in]XPhysical Coordinate X of node 0,
[in]YPhysical Coordinate Y of node 0,
[in]ZPhysical Coordinate Z of node 0,
[in]LPhysical Side length of the domain,
[in]XYCoordinates of octants (node 0) in logical domain,
[in]levelsLevel of each octant.
[in]logfileThe file name for the log of this object. PABLO.log is the default value

Definition at line 200 of file Class_Para_Tree_2D.tpp.

Member Function Documentation

bool Class_Para_Tree< 2 >::adapt ( )
inline

Adapt the octree mesh with user setup for markers and 2:1 balancing conditions.

Definition at line 4761 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::adapt ( bool  mapper_flag)
inline

Adapt the octree mesh with user setup for markers and 2:1 balancing conditions.

Parameters
[in]mapper_flagTrue/False if you want/don't want to track the changes in structure octant by a mapper.
Returns
Boolean if adapt has done something.

Definition at line 4983 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::adapt ( u32vector &  mapper)
inline

Adapt the octree mesh with user setup for markers and 2:1 balancing conditions.

Parameters
[out]mapperMapper from new octants to old octants. I.e. mapper[i] = j -> the i-th octant after adapt was in the j-th position before adapt; if the i-th octant is new after refinement the j-th old octant was the father of the new octant; if the i-th octant is new after coarsening the j-th old octant was a child of the new octant (mapper size = 4).
Returns
Boolean if adapt has done something.

Definition at line 5008 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::adaptGlobalCoarse ( )
inline

Adapt the octree mesh coarsening all the octants by one level.

Definition at line 5219 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::adaptGlobalCoarse ( u32vector &  mapidx)
inline

Adapt the octree mesh coarsening all the octants by one level. Track the changes in structure octant by a mapper.

Parameters
[out]mapidxMapper from new octants to old octants. mapidx[i] = j -> the i-th octant after adapt was in the j-th position before adapt; if the i-th octant is new after refinement the j-th old octant was the father of the new octant; if the i-th octant is new after coarsening the j-th old octant was the first child of the new octant.

Definition at line 5307 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::adaptGlobalRefine ( )
inline

Adapt the octree mesh refining all the octants by one level.

Definition at line 5064 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::adaptGlobalRefine ( u32vector &  mapidx)
inline

Adapt the octree mesh refining all the octants by one level. Track the changes in structure octant by a mapper.

Parameters
[out]mapidxMapper from new octants to old octants. mapidx[i] = j -> the i-th octant after adapt was in the j-th position before adapt; if the i-th octant is new after refinement the j-th old octant was the father of the new octant; if the i-th octant is new after coarsening the j-th old octant was the first child of the new octant.

Definition at line 5138 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::clearConnectivity ( )
inline

Clear the connectivity of octants.

Definition at line 5500 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::clearGhostsConnectivity ( )
inline

Clear the connectivity of ghost octants.

Definition at line 5524 of file Class_Para_Tree_2D.tpp.

template<class Impl >
void Class_Para_Tree< 2 >::communicate ( Class_Data_Comm_Interface< Impl > &  userData)
inline

Communicate data provided by the user between the processes.

Definition at line 5404 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::computeConnectivity ( )
inline

Compute the connectivity of octants and store the coordinates of nodes.

Definition at line 5492 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::computeGhostsConnectivity ( )
inline

Compute the connectivity of ghost octants and store the coordinates of nodes.

Definition at line 5516 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::computeIntersections ( )
inline

Compute the intersection of octants (intersections of bord, of inner domain and with ghost octants).

Definition at line 1537 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::findGhostNeighbours ( uint32_t  idx,
uint8_t  iface,
uint8_t  codim,
u32vector &  neighbours 
)
inline

Finds neighbours of ghost octant through iface in vector octants. Returns a vector (empty if iface is a bound face) with the index of neighbours in their structure ( only local octants ).

Parameters
[in]idxIndex of current octant
[in]ifaceIndex of face/edge/node passed through for neighbours finding
[in]codimCodimension of the iface-th entity 1=edge, 2=node
[out]neighboursVector of neighbours indices in octants/ghosts structure

Definition at line 1217 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::findNeighbours ( uint32_t  idx,
uint8_t  iface,
uint8_t  codim,
u32vector &  neighbours,
vector< bool > &  isghost 
)
inline

Finds neighbours of octant through iface in vector octants. Returns a vector (empty if iface is a bound face) with the index of neighbours in their structure (octants or ghosts) and sets isghost[i] = true if the i-th neighbour is ghost in the local tree.

Parameters
[in]idxIndex of current octant
[in]ifaceIndex of face/edge/node passed through for neighbours finding
[in]codimCodimension of the iface-th entity 1=edge, 2=node
[out]neighboursVector of neighbours indices in octants/ghosts structure
[out]isghostVector with boolean flag; true if the respective octant in neighbours is a ghost octant. Can be ignored in serial runs.

Definition at line 1163 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::findNeighbours ( Class_Octant< 2 > *  oct,
uint8_t  iface,
uint8_t  codim,
u32vector &  neighbours,
vector< bool > &  isghost 
)
inline

Finds neighbours of octant through iface in vector octants. Returns a vector (empty if iface is a bound face) with the index of neighbours in their structure (octants or ghosts) and sets isghost[i] = true if the i-th neighbour is ghost in the local tree.

Parameters
[in]octPointer to current octant
[in]ifaceIndex of face/edge/node passed through for neighbours finding
[in]codimCodimension of the iface-th entity 1=edge, 2=node
[out]neighboursVector of neighbours indices in octants/ghosts structure
[out]isghostVector with boolean flag; true if the respective octant in neighbours is a ghost octant. Can be ignored in serial runs.

Definition at line 1190 of file Class_Para_Tree_2D.tpp.

int Class_Para_Tree< 2 >::findOwner ( const uint64_t &  morton)
inline

It finds the process owning the element definded by the Morton number passed as argument

The Morton number can be computed using the method Class_Octant<2>::computeMorton().

Parameters
[in]mortonis the Morton number of the element you want find the owner of
Returns
it returns the rank of the process owning the element

Definition at line 1242 of file Class_Para_Tree_2D.tpp.

double Class_Para_Tree< 2 >::getArea ( Class_Octant< 2 > *  oct)
inline

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

Parameters
[in]octPointer to target octant.
Returns
Size of octant.

Definition at line 334 of file Class_Para_Tree_2D.tpp.

double Class_Para_Tree< 2 >::getArea ( uint32_t  idx)
inline

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

Parameters
[in]idxLocal index of target octant.
Returns
Area of octant.

Definition at line 835 of file Class_Para_Tree_2D.tpp.

double Class_Para_Tree< 2 >::getArea ( Class_Intersection< 2 > *  inter)
inline

Get the area of an intersection (for 2D case the same value of getSize).

Parameters
[in]interPointer to target intersection.
Returns
Area of intersection.

Definition at line 1395 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::getBalance ( Class_Octant< 2 > *  oct)
inline

Get the balancing condition of an octant.

Parameters
[in]octPointer to target octant.
Returns
Has octant to be balanced?

Definition at line 499 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::getBalance ( uint32_t  idx)
inline

Get the balancing condition of an octant.

Parameters
[in]idxLocal index of target octant.
Returns
Has octant to be balanced?

Definition at line 982 of file Class_Para_Tree_2D.tpp.

uint8_t Class_Para_Tree< 2 >::getBalanceCodimension ( ) const
inline

Get the codimension for 2:1 balancing

Returns
Maximum codimension of the entity through which the 2:1 balance is performed.

Definition at line 1087 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::getBound ( Class_Octant< 2 > *  oct,
uint8_t  iface 
)
inline

Get the bound flag on an octant face.

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

Definition at line 460 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::getBound ( Class_Octant< 2 > *  oct)
inline

Get the union of every bound flags on faces

Parameters
[in]octPointer to target octant.
Returns
true if the octant has at least a boundary face.

Definition at line 477 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::getBound ( Class_Intersection< 2 > *  inter)
inline

Get if an intersection is a boundary domain intersection.

Parameters
[in]interPointer to target intersection.
Returns
Boundary or not boundary?.

Definition at line 1339 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::getCenter ( Class_Octant< 2 > *  oct,
vector< double > &  center 
)
inline

Get the coordinates of the center of an octant.

Parameters
[in]octPointer to target octant.
[out]centerCoordinates of the center of octant.

Definition at line 350 of file Class_Para_Tree_2D.tpp.

vector<double> Class_Para_Tree< 2 >::getCenter ( Class_Octant< 2 > *  oct)
inline

Get the coordinates of the center of an octant.

Parameters
[in]octPointer to target octant.
Returns
center Coordinates of the center of octant.

Definition at line 360 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::getCenter ( uint32_t  idx,
vector< double > &  center 
)
inline

Get the coordinates of the center of an octant.

Parameters
[in]idxLocal index of target octant.
[out]centerCoordinates of the center of octant.

Definition at line 851 of file Class_Para_Tree_2D.tpp.

vector<double> Class_Para_Tree< 2 >::getCenter ( uint32_t  idx)
inline

Get the coordinates of the center of an octant.

Parameters
[in]idxLocal index of target octant.
Returns
center Coordinates of the center of octant.

Definition at line 861 of file Class_Para_Tree_2D.tpp.

vector<double> Class_Para_Tree< 2 >::getCenter ( Class_Intersection< 2 > *  inter)
inline

Get the coordinates of the center of an intersection.

Parameters
[in]interPointer to target intersection.
[out]centerCoordinates of the center of intersection.

Definition at line 1408 of file Class_Para_Tree_2D.tpp.

const u32vector2D& Class_Para_Tree< 2 >::getConnectivity ( )
inline

Get the connectivity of the octants

Returns
connectivity Matrix of noctants*4 with the connectivity of each octant (4 indices of nodes).

Definition at line 5549 of file Class_Para_Tree_2D.tpp.

uint8_t Class_Para_Tree< 2 >::getFace ( Class_Intersection< 2 > *  inter)
inline

Get the face index of an intersection.

Parameters
[in]interPointer to target intersection.
Returns
Face index of the first octant owner of intersection (owners[0]).

Definition at line 1363 of file Class_Para_Tree_2D.tpp.

vector<double> Class_Para_Tree< 2 >::getFaceCenter ( Class_Octant< 2 > *  oct,
uint8_t  iface 
)
inline

Get the coordinates of the center of a face of an octant.

Parameters
[in]octPointer to target octant.
[in]ifaceIndex of the target face.
Returns
center Coordinates of the center of the iface-th face af octant.

Definition at line 372 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::getFaceCenter ( Class_Octant< 2 > *  oct,
uint8_t  iface,
vector< double > &  center 
)
inline

Get the coordinates of the center of a face of an octant.

Parameters
[in]octPointer to target octant.
[in]ifaceIndex of the target face.
[out]centerCoordinates of the center of the iface-th face af octant.

Definition at line 384 of file Class_Para_Tree_2D.tpp.

vector<double> Class_Para_Tree< 2 >::getFaceCenter ( uint32_t  idx,
uint8_t  iface 
)
inline

Get the coordinates of the center of a face of an octant.

Parameters
[in]idxLocal index of target octant.
[in]ifaceIndex of the target face.
Returns
center Coordinates of the center of the iface-th face af octant.

Definition at line 873 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::getFaceCenter ( uint32_t  idx,
uint8_t  iface,
vector< double > &  center 
)
inline

Get the coordinates of the center of a face of an octant.

Parameters
[in]idxLocal index of target octant.
[in]ifaceIndex of the target face.
[out]centerCoordinates of the center of the iface-th face af octant.

Definition at line 885 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::getFiner ( Class_Intersection< 2 > *  inter)
inline

Get the finer owner octant of an intersection.

Parameters
[in]interPointer to target intersection.
Returns
The finer octant of the owners of intersection (false/true = 0/1).

Definition at line 1331 of file Class_Para_Tree_2D.tpp.

const u32vector2D& Class_Para_Tree< 2 >::getGhostConnectivity ( )
inline

Get the connectivity of the ghost octants

Returns
connectivity Matrix of nghostoctants*4 with the connectivity of each octant (4 indices of nodes).

Definition at line 5558 of file Class_Para_Tree_2D.tpp.

uint64_t Class_Para_Tree< 2 >::getGhostGlobalIdx ( uint32_t  idx)
inline

Get the global index of a ghost octant.

Parameters
[in]idxLocal index of target ghost octant.
Returns
Global index of ghost octant.

Definition at line 1030 of file Class_Para_Tree_2D.tpp.

dvector Class_Para_Tree< 2 >::getGhostNodeCoordinates ( uint32_t  inode)
inline

Get the physical coordinates of a ghost node

Parameters
[in]inodeLocal index of node
Returns
nodes Vector with the coordinates of the node.

Definition at line 5658 of file Class_Para_Tree_2D.tpp.

u32vector Class_Para_Tree< 2 >::getGhostNodeLogicalCoordinates ( uint32_t  inode)
inline

Get the logical coordinates of a ghost node

Parameters
[in]inodeLocal index of node
Returns
nodes Vector with the coordinates of the node.

Definition at line 5648 of file Class_Para_Tree_2D.tpp.

const u32vector2D& Class_Para_Tree< 2 >::getGhostNodes ( )
inline

Get the logical coordinates of the ghost nodes

Returns
nodes Matrix of nghostnodes*3 with the coordinates of the nodes.

Definition at line 5624 of file Class_Para_Tree_2D.tpp.

Class_Octant<2>* Class_Para_Tree< 2 >::getGhostOctant ( uint32_t  idx)
inline

Get a ghost octant as pointer to the target octant.

Parameters
[in]idxLocal index (in ghosts structure) of target ghost octant.
Returns
Pointer to target ghost octant.

Definition at line 1147 of file Class_Para_Tree_2D.tpp.

u32vector Class_Para_Tree< 2 >::getGhostOctantConnectivity ( uint32_t  idx)
inline

Get the local connectivity of a ghost octant

Parameters
[in]idxLocal index of ghost octant
Returns
connectivity Connectivity of the ghost octant (4 indices of nodes).

Definition at line 5586 of file Class_Para_Tree_2D.tpp.

u32vector Class_Para_Tree< 2 >::getGhostOctantConnectivity ( Class_Octant< 2 > *  oct)
inline

Get the local connectivity of a ghost octant

Parameters
[in]octPointer to a ghost octant
Returns
connectivity Connectivity of the ghost octant (4 indices of nodes).

Definition at line 5596 of file Class_Para_Tree_2D.tpp.

const Class_Global<2>& Class_Para_Tree< 2 >::getGlobal ( )
inline

Get the global class object

Returns
A reference to the global class object.

Definition at line 294 of file Class_Para_Tree_2D.tpp.

uint64_t Class_Para_Tree< 2 >::getGlobalIdx ( Class_Octant< 2 > *  oct)
inline

Get the global index of an octant.

Parameters
[in]octPointer to target octant.
Returns
Global index of octant.

Definition at line 535 of file Class_Para_Tree_2D.tpp.

uint64_t Class_Para_Tree< 2 >::getGlobalIdx ( uint32_t  idx)
inline

Get the global index of an octant.

Parameters
[in]idxLocal index of target octant.
Returns
Global index of octant.

Definition at line 1016 of file Class_Para_Tree_2D.tpp.

uint32_t Class_Para_Tree< 2 >::getIdx ( Class_Octant< 2 > *  oct)
inline

Get the local index of an octant.

Parameters
[in]octPointer to target octant.
Returns
Local index of octant.

Definition at line 553 of file Class_Para_Tree_2D.tpp.

Class_Intersection<2>* Class_Para_Tree< 2 >::getIntersection ( uint32_t  idx)
inline

Get a pointer to target intersection.

Parameters
[in]idxLocal index of intersection.
Returns
Pointer to target intersection.

Definition at line 1309 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::getIsGhost ( Class_Octant< 2 > *  oct)
inline

Get the nature of an octant.

Parameters
[in]octPointer to target octant.
Returns
Is octant ghost?

Definition at line 508 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::getIsGhost ( uint32_t  idx)
inline

Get the nature of an octant.

Parameters
[in]idxLocal index of target octant.
Returns
Is octant ghost?

Definition at line 991 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::getIsGhost ( Class_Intersection< 2 > *  inter)
inline

Get if an intersection is an intersection between an internal and a ghost element.

Parameters
[in]interPointer to target intersection.
Returns
Ghost or not ghost?.

Definition at line 1347 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::getIsNewC ( Class_Octant< 2 > *  oct)
inline

Get if the octant is new after coarsening.

Parameters
[in]octPointer to target octant.
Returns
Is octant new?

Definition at line 527 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::getIsNewC ( uint32_t  idx)
inline

Get if the octant is new after coarsening.

Parameters
[in]idxLocal index of target octant.
Returns
Is octant new?

Definition at line 1008 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::getIsNewR ( Class_Octant< 2 > *  oct)
inline

Get if the octant is new after refinement.

Parameters
[in]octPointer to target octant.
Returns
Is octant new?

Definition at line 519 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::getIsNewR ( uint32_t  idx)
inline

Get if the octant is new after refinement.

Parameters
[in]idxLocal index of target octant.
Returns
Is octant new?

Definition at line 1000 of file Class_Para_Tree_2D.tpp.

uint8_t Class_Para_Tree< 2 >::getLevel ( Class_Octant< 2 > *  oct)
inline

Get the level of an octant.

Parameters
[in]octPointer to target octant.
Returns
Level of octant.

Definition at line 451 of file Class_Para_Tree_2D.tpp.

uint8_t Class_Para_Tree< 2 >::getLevel ( uint32_t  idx)
inline

Get the level of an octant.

Parameters
[in]idxLocal index of target octant.
Returns
Level of octant.

Definition at line 974 of file Class_Para_Tree_2D.tpp.

uint8_t Class_Para_Tree< 2 >::getLevel ( Class_Intersection< 2 > *  inter)
inline

Get the level of an intersection.

Parameters
[in]interPointer to target intersection.
Returns
Level of intersection.

Definition at line 1320 of file Class_Para_Tree_2D.tpp.

uint8_t Class_Para_Tree< 2 >::getLocalMaxDepth ( ) const
inline

Get the local depth of octree.

Returns
Local depth of octree.

Definition at line 1080 of file Class_Para_Tree_2D.tpp.

Class_Octant<2>* Class_Para_Tree< 2 >::getLogicalPointOwner ( dvector &  point)
inline

Get the octant owner of an input point.

Parameters
[in]pointCoordinates of target point in logical domain.
Returns
Pointer to octant owner of target point (=NULL if point outside of the domain).

Definition at line 1905 of file Class_Para_Tree_2D.tpp.

uint32_t Class_Para_Tree< 2 >::getLogicalPointOwnerIdx ( dvector &  point)
inline

Get the octant owner of an input point.

Parameters
[in]pointCoordinates of target point in logical domain.
Returns
Index of octant owner of target point (max uint32_t representable if point outside of the domain).

Definition at line 1975 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::getMapping ( uint32_t &  idx,
u32vector &  mapper,
vector< bool > &  isghost 
)
inline

Get mapping info of an octant after an adapting with tracking changes.

Parameters
[in]idxIndex of new octant.
[out]mapperMapper from new octants to old octants. I.e. mapper[i] = j -> the i-th octant after adapt was in the j-th position before adapt; if the i-th octant is new after refinement the j-th old octant was the father of the new octant; if the i-th octant is new after coarsening the j-th old octant was a child of the new octant (mapper size = 4).
[out]isghostInfo on ghostness of old octants. I.e. isghost[i] = true/false -> the mapper[i] = j-th old octant was a local/ghost octant.

Definition at line 5029 of file Class_Para_Tree_2D.tpp.

int8_t Class_Para_Tree< 2 >::getMarker ( Class_Octant< 2 > *  oct)
inline

Get the refinement marker of an octant.

Parameters
[in]octPointer to target octant.
Returns
Marker of octant.

Definition at line 443 of file Class_Para_Tree_2D.tpp.

int8_t Class_Para_Tree< 2 >::getMarker ( uint32_t  idx)
inline

Get the refinement marker of an octant.

Parameters
[in]idxLocal index of target octant.
Returns
Marker of octant.

Definition at line 966 of file Class_Para_Tree_2D.tpp.

vector<double> Class_Para_Tree< 2 >::getNode ( uint32_t  idx,
uint8_t  inode 
)
inline

Get the coordinates of single node of an octant.

Parameters
[in]idxLocal index of target octant.
[in]inodeIndex of the target node.
Returns
center Coordinates of the center of the iface-th face af octant.

Definition at line 895 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::getNode ( uint32_t  idx,
uint8_t  inode,
vector< double > &  node 
)
inline

Get the coordinates of the center of a face of an octant.

Parameters
[in]idxLocal index of target octant.
[in]ifaceIndex of the target face.
[out]centerCoordinates of the center of the iface-th face af octant.

Definition at line 907 of file Class_Para_Tree_2D.tpp.

dvector Class_Para_Tree< 2 >::getNodeCoordinates ( uint32_t  inode)
inline

Get the physical coordinates of a node

Parameters
[in]inodeLocal index of node
Returns
nodes Vector with the coordinates of the node.

Definition at line 5634 of file Class_Para_Tree_2D.tpp.

u32vector Class_Para_Tree< 2 >::getNodeLogicalCoordinates ( uint32_t  inode)
inline

Get the logical coordinates of a node

Parameters
[in]inodeLocal index of node
Returns
nodes Vector with the coordinates of the node.

Definition at line 5615 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::getNodes ( Class_Octant< 2 > *  oct,
dvector2D &  nodes 
)
inline

Get the coordinates of the nodes of an octant.

Parameters
[in]octPointer to target octant.
[out]nodesCoordinates of the nodes of octant.

Definition at line 393 of file Class_Para_Tree_2D.tpp.

dvector2D Class_Para_Tree< 2 >::getNodes ( Class_Octant< 2 > *  oct)
inline

Get the coordinates of the nodes of an octant.

Parameters
[in]octPointer to target octant.
Returns
nodes Coordinates of the nodes of octant.

Definition at line 404 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::getNodes ( uint32_t  idx,
dvector2D &  nodes 
)
inline

Get the coordinates of the nodes of an octant.

Parameters
[in]idxLocal index of target octant.
[out]nodesCoordinates of the nodes of octant.

Definition at line 916 of file Class_Para_Tree_2D.tpp.

dvector2D Class_Para_Tree< 2 >::getNodes ( uint32_t  idx)
inline

Get the coordinates of the nodes of an octant.

Parameters
[in]idxLocal index of target octant.
Returns
nodes Coordinates of the nodes of octant.

Definition at line 927 of file Class_Para_Tree_2D.tpp.

dvector2D Class_Para_Tree< 2 >::getNodes ( Class_Intersection< 2 > *  inter)
inline

Get the coordinates of the nodes of an intersection.

Parameters
[in]octPointer to target intersection.
Returns
nodes Coordinates of the nodes of intersection.

Definition at line 1427 of file Class_Para_Tree_2D.tpp.

const u32vector2D& Class_Para_Tree< 2 >::getNodes ( )
inline

Get the logical coordinates of the nodes

Returns
nodes Matrix of nnodes*3 with the coordinates of the nodes.

Definition at line 5605 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::getNormal ( Class_Octant< 2 > *  oct,
uint8_t &  iface,
dvector &  normal 
)
inline

Get the normal of a face of an octant.

Parameters
[in]octPointer to target octant.
[in]ifaceIndex of the face for normal computing.
[out]normalCoordinates of the normal of face.

Definition at line 417 of file Class_Para_Tree_2D.tpp.

dvector Class_Para_Tree< 2 >::getNormal ( Class_Octant< 2 > *  oct,
uint8_t &  iface 
)
inline

Get the normal of a face of an octant.

Parameters
[in]octPointer to target octant.
[in]ifaceIndex of the face for normal computing.
Returns
normal Coordinates of the normal of face.

Definition at line 430 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::getNormal ( uint32_t  idx,
uint8_t &  iface,
dvector &  normal 
)
inline

Get the normal of a face of an octant.

Parameters
[in]Localindex of target octant.
[in]ifaceIndex of the face for normal computing.
[out]normalCoordinates of the normal of face.

Definition at line 940 of file Class_Para_Tree_2D.tpp.

dvector Class_Para_Tree< 2 >::getNormal ( uint32_t  idx,
uint8_t &  iface 
)
inline

Get the normal of a face of an octant.

Parameters
[in]idxLocal index of target octant.
[in]ifaceIndex of the face for normal computing.
Returns
normal Coordinates of the normal of face.

Definition at line 953 of file Class_Para_Tree_2D.tpp.

dvector Class_Para_Tree< 2 >::getNormal ( Class_Intersection< 2 > *  inter)
inline

Get the normal of an intersection.

Parameters
[in]octPointer to target intersection.
[out]normalCoordinates of the normal of intersection.

Definition at line 1451 of file Class_Para_Tree_2D.tpp.

uint32_t Class_Para_Tree< 2 >::getNumGhosts ( ) const
inline

Get the local number of ghost octants.

Returns
Local number of ghost octants.

Definition at line 1073 of file Class_Para_Tree_2D.tpp.

uint32_t Class_Para_Tree< 2 >::getNumIntersections ( )
inline

Get the local number of intersections.

Returns
Local number of intersections.

Definition at line 1301 of file Class_Para_Tree_2D.tpp.

uint32_t Class_Para_Tree< 2 >::getNumNodes ( )
inline

Get the local number of nodes.

Definition at line 5540 of file Class_Para_Tree_2D.tpp.

uint32_t Class_Para_Tree< 2 >::getNumOctants ( ) const
inline

Get the local number of octants.

Returns
Local number of octants.

Definition at line 1066 of file Class_Para_Tree_2D.tpp.

Class_Octant<2>* Class_Para_Tree< 2 >::getOctant ( uint32_t  idx)
inline

Get an octant as pointer to the target octant.

Parameters
[in]idxLocal index of target octant.
Returns
Pointer to target octant.

Definition at line 1136 of file Class_Para_Tree_2D.tpp.

u32vector Class_Para_Tree< 2 >::getOctantConnectivity ( uint32_t  idx)
inline

Get the local connectivity of an octant

Parameters
[in]idxLocal index of octant
Returns
connectivity Connectivity of the octant (4 indices of nodes).

Definition at line 5567 of file Class_Para_Tree_2D.tpp.

u32vector Class_Para_Tree< 2 >::getOctantConnectivity ( Class_Octant< 2 > *  oct)
inline

Get the local connectivity of an octant

Parameters
[in]octPointer to an octant
Returns
connectivity Connectivity of the octant (4 indices of nodes).

Definition at line 5576 of file Class_Para_Tree_2D.tpp.

u32vector Class_Para_Tree< 2 >::getOwners ( Class_Intersection< 2 > *  inter)
inline

Get the owner octants of an intersection.

Parameters
[in]interPointer to target intersection.
Returns
A couple of octants owners of intersection.

Definition at line 1371 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::getPbound ( Class_Octant< 2 > *  oct,
uint8_t  iface 
)
inline

Get the pbound flag on an octant face.

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

Definition at line 469 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::getPbound ( Class_Octant< 2 > *  oct)
inline

Get the union of every pbound flags on faces

Parameters
[in]octPointer to target octant.
Returns
true if the octant has at least a process boundary face.

Definition at line 488 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::getPbound ( Class_Intersection< 2 > *  inter)
inline

Get if an intersection is a boundary intersection for a process.

Parameters
[in]interPointer to target intersection.
Returns
Process boundary or not boundary?.

Definition at line 1355 of file Class_Para_Tree_2D.tpp.

Class_Octant<2>* Class_Para_Tree< 2 >::getPointOwner ( dvector &  point)
inline

Get the octant owner of an input point.

Parameters
[in]pointCoordinates of target point.
Returns
Pointer to octant owner of target point (=NULL if point outside of the domain).

Definition at line 1549 of file Class_Para_Tree_2D.tpp.

Class_Octant<2>* Class_Para_Tree< 2 >::getPointOwner ( u32vector &  point)
inline

Get the octant owner of an input point.

Parameters
[in]pointCoordinates of target point in logical domain.
Returns
Pointer to octant owner of target point (=NULL if point outside of the domain).

Definition at line 1767 of file Class_Para_Tree_2D.tpp.

uint32_t Class_Para_Tree< 2 >::getPointOwnerIdx ( dvector &  point)
inline

Get the octant owner of an input point.

Parameters
[in]pointCoordinates of target point.
Returns
Index of octant owner of target point (max uint32_t representable if point outside of the domain).

Definition at line 1620 of file Class_Para_Tree_2D.tpp.

uint32_t Class_Para_Tree< 2 >::getPointOwnerIdx ( u32vector &  point)
inline

Get the octant owner of an input point.

Parameters
[in]pointCoordinates of target point in logical domain.
Returns
Index of octant owner of target point (max uint32_t representable if point outside of the domain).

Definition at line 1836 of file Class_Para_Tree_2D.tpp.

double Class_Para_Tree< 2 >::getSize ( Class_Octant< 2 > *  oct)
inline

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

Parameters
[in]octPointer to target octant.
Returns
Size of octant.

Definition at line 326 of file Class_Para_Tree_2D.tpp.

double Class_Para_Tree< 2 >::getSize ( uint32_t  idx)
inline

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

Parameters
[in]idxLocal index of target octant.
Returns
Area of octant.

Definition at line 827 of file Class_Para_Tree_2D.tpp.

double Class_Para_Tree< 2 >::getSize ( Class_Intersection< 2 > *  inter)
inline

Get the size of an intersection.

Parameters
[in]interPointer to target intersection.
Returns
Size of intersection.

Definition at line 1382 of file Class_Para_Tree_2D.tpp.

uint64_t Class_Para_Tree< 2 >::getStatus ( )
inline

Get the status label of the octree.

Returns
Status.

Definition at line 1059 of file Class_Para_Tree_2D.tpp.

double Class_Para_Tree< 2 >::getVolume ( Class_Octant< 2 > *  oct)
inline

Get the volume of an octant.

Parameters
[in]octPointer to target octant.
Returns
Volume of octant.

Definition at line 342 of file Class_Para_Tree_2D.tpp.

double Class_Para_Tree< 2 >::getVolume ( uint32_t  idx)
inline

Get the volume of an octant.

Parameters
[in]idxLocal index of target octant.
Returns
Volume of octant.

Definition at line 843 of file Class_Para_Tree_2D.tpp.

double Class_Para_Tree< 2 >::getX ( Class_Octant< 2 > *  oct)
inline

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

Parameters
[in]octPointer to target octant.
Returns
Coordinate X of node 0.

Definition at line 302 of file Class_Para_Tree_2D.tpp.

double Class_Para_Tree< 2 >::getX ( uint32_t  idx)
inline

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

Parameters
[in]idxLocal index of target octant.
Returns
Coordinate X of node 0.

Definition at line 803 of file Class_Para_Tree_2D.tpp.

double Class_Para_Tree< 2 >::getY ( Class_Octant< 2 > *  oct)
inline

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

Parameters
[in]octPointer to target octant.
Returns
Coordinate Y of node 0.

Definition at line 310 of file Class_Para_Tree_2D.tpp.

double Class_Para_Tree< 2 >::getY ( uint32_t  idx)
inline

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

Parameters
[in]idxLocal index of target octant.
Returns
Coordinate Y of node 0.

Definition at line 811 of file Class_Para_Tree_2D.tpp.

double Class_Para_Tree< 2 >::getZ ( Class_Octant< 2 > *  oct)
inline

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

Parameters
[in]octPointer to target octant.
Returns
Coordinate Z of node 0.

Definition at line 318 of file Class_Para_Tree_2D.tpp.

double Class_Para_Tree< 2 >::getZ ( uint32_t  idx)
inline

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

Parameters
[in]idxLocal index of target octant.
Returns
Coordinate Z of node 0.

Definition at line 819 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::loadBalance ( )
inline

Distribute Load-Balancing the octants of the whole tree over the processes of the job following the Morton order. Until loadBalance is not called for the first time the mesh is serial.

Definition at line 2626 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::loadBalance ( uint8_t &  level)
inline

Distribute Load-Balanced the octants of the whole tree over the processes of the job. Until loadBalance is not called for the first time the mesh is serial. The families of octants of a desired level are retained compact on the same process.

Parameters
[in]levelNumber of level over the max depth reached in the tree at which families of octants are fixed compact on the same process (level=0 is classic LoadBalance).

Definition at line 3048 of file Class_Para_Tree_2D.tpp.

template<class Impl >
void Class_Para_Tree< 2 >::loadBalance ( Class_Data_LB_Interface< Impl > &  userData,
dvector *  weight = NULL 
)
inline

Distribute Load-Balancing the octants of the whole tree and data provided by the user over the processes of the job following the Morton order. Until loadBalance is not called for the first time the mesh is serial.

Definition at line 3461 of file Class_Para_Tree_2D.tpp.

template<class Impl >
void Class_Para_Tree< 2 >::loadBalance ( Class_Data_LB_Interface< Impl > &  userData,
uint8_t &  level 
)
inline

Distribute Load-Balanced the octants of the whole tree and data provided by the user over the processes of the job. Until loadBalance is not called for the first time the mesh is serial. The families of octants of a desired level are retained compact on the same process.

Parameters
[in]levelNumber of level over the max depth reached in the tree at which families of octants are fixed compact on the same process (level=0 is classic LoadBalance).

Definition at line 3956 of file Class_Para_Tree_2D.tpp.

vector<pair<pair<uint32_t, uint32_t>, pair<int, int> > > Class_Para_Tree< 2 >::mapPablos ( Class_Para_Tree< 2 > &  ptree)
inline

Map the elements of the actual octree mesh to the elements of another one. If the connectivity is not stored, the method temporary computes it. If the connectivity of ghost octants is already computed, the method writes the ghosts on file.

Parameters
[in]ptreeSecond octree. The map goes from the firs one to the second one.
[out]Mapbetween octrees. Each i-th pair gives the first index and the last one of the elements of the second octree which lie in the i-th element of the first octree. If the indices are equal, then the element of the second octree is of the same level or lower (bigger size). Each second i-th pair gives the indices of the two processes owning the two quadrants defined by the first pair.

Definition at line 5677 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::setBalance ( Class_Octant< 2 > *  oct,
bool  balance 
)
inline

Set the balancing condition of an octant.

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

Definition at line 574 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::setBalance ( uint32_t  idx,
bool  balance 
)
inline

Set the balancing condition of an octant.

Parameters
[in]idxLocal index of target octant.
[in]balanceHas octant to be 2:1 balanced in adapting procedure?

Definition at line 1049 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::setBalanceCodimension ( uint8_t  b21codim)
inline

Set the codimension for 2:1 balancing

Parameters
[in]Maximumcodimension of the entity through which the 2:1 balance is performed (1 = 2:1 balance through edges (default); 2 = 2:1 balance through nodes and edges).

Definition at line 1094 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::setMarker ( Class_Octant< 2 > *  oct,
int8_t  marker 
)
inline

Set the refinement marker of an octant.

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

Definition at line 566 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::setMarker ( uint32_t  idx,
int8_t  marker 
)
inline

Set the refinement marker of an octant.

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

Definition at line 1041 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::updateConnectivity ( )
inline

Update the connectivity of octants.

Definition at line 5508 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::updateGhostsConnectivity ( )
inline

Update the connectivity of ghost octants.

Definition at line 5532 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::write ( string  filename)
inline

Write the physical octree mesh in .vtu format in a user-defined file. If the connectivity is not stored, the method temporary computes it. If the connectivity of ghost octants is already computed, the method writes the ghosts on file.

Parameters
[in]filenameSeriously?....

Definition at line 6370 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::writeLogical ( string  filename)
inline

Write the logical octree mesh in .vtu format in a user-defined file. If the connectivity is not stored, the method temporary computes it. If the connectivity of ghost octants is already computed, the method writes the ghosts on file.

Parameters
[in]filenameSeriously?....

Definition at line 6209 of file Class_Para_Tree_2D.tpp.

void Class_Para_Tree< 2 >::writeTest ( string  filename,
vector< double >  data 
)
inline

Write the physical octree mesh in .vtu format with data for test in a user-defined file. If the connectivity is not stored, the method temporary computes it. The method doesn't write the ghosts on file.

Parameters
[in]filenameSeriously?....

Definition at line 6532 of file Class_Para_Tree_2D.tpp.

Member Data Documentation

map<int,vector<uint32_t> > Class_Para_Tree< 2 >::bordersPerProc

Local indices of border octants per process

Definition at line 49 of file Class_Para_Tree_2D.tpp.

MPI_Comm Class_Para_Tree< 2 >::comm

MPI communicator

Definition at line 79 of file Class_Para_Tree_2D.tpp.

int Class_Para_Tree< 2 >::error_flag

MPI error flag

Definition at line 65 of file Class_Para_Tree_2D.tpp.

uint64_t Class_Para_Tree< 2 >::global_num_octants

Global number of octants in the parallel octree

Definition at line 48 of file Class_Para_Tree_2D.tpp.

Log object

Definition at line 76 of file Class_Para_Tree_2D.tpp.

u32vector Class_Para_Tree< 2 >::mapidx

Local mapper for adapting. Mapper from new octants to old octants. mapidx[i] = j -> the i-th octant after adapt was in the j-th position before adapt; if the i-th octant is new after refinement the j-th old octant was the father of the new octant; if the i-th octant is new after coarsening the j-th old octant was the first child of the new octant.

Definition at line 58 of file Class_Para_Tree_2D.tpp.

uint8_t Class_Para_Tree< 2 >::max_depth

Global max existing level in the parallel octree

Definition at line 51 of file Class_Para_Tree_2D.tpp.

int Class_Para_Tree< 2 >::nproc

Number of processes of the job

Definition at line 50 of file Class_Para_Tree_2D.tpp.

Local tree in each processor

Definition at line 55 of file Class_Para_Tree_2D.tpp.

uint64_t* Class_Para_Tree< 2 >::partition_first_desc

Global array containing position of the first possible octant in each processor

Definition at line 45 of file Class_Para_Tree_2D.tpp.

uint64_t* Class_Para_Tree< 2 >::partition_last_desc

Global array containing position of the last possible octant in each processor

Definition at line 46 of file Class_Para_Tree_2D.tpp.

uint64_t* Class_Para_Tree< 2 >::partition_range_globalidx

Global array containing global index of the last existing octant in each processor

Definition at line 47 of file Class_Para_Tree_2D.tpp.

int Class_Para_Tree< 2 >::rank

Local rank of process

Definition at line 54 of file Class_Para_Tree_2D.tpp.

bool Class_Para_Tree< 2 >::serial

True if the octree is the same on each processor, False if the octree is distributed

Definition at line 66 of file Class_Para_Tree_2D.tpp.

uint64_t Class_Para_Tree< 2 >::status

Label of actual status of octree (incremental after an adpat with at least one modifyed element).

Definition at line 72 of file Class_Para_Tree_2D.tpp.

Class_Map<2> Class_Para_Tree< 2 >::trans

Transformation map from logical to physical domain

Definition at line 69 of file Class_Para_Tree_2D.tpp.


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