Loading...
Searching...
No Matches
Public Types | Protected Member Functions | Friends | List of all members
bitpit::LocalTree Class Reference

Local octree portion for each process. More...

#include <LocalTree.hpp>

Public Types

typedef std::vector< bool > bvector
 
typedef std::vector< Intersectionintervector
 
typedef std::vector< Octantoctvector
 
typedef std::vector< u32array3 > u32arr3vector
 
typedef std::vector< uint32_t > u32vector
 
typedef std::vector< uint64_t > u64vector
 
typedef std::vector< uint8_t > u8vector
 

Protected Member Functions

std::array< int64_t, 3 > computeFirstVirtualEdgeNeighOffset (uint8_t level, uint8_t iedge, uint8_t neighLevel) const
 
std::array< int64_t, 3 > computeFirstVirtualNeighOffset (uint8_t level, uint8_t iface, uint8_t neighLevel) const
 
std::array< int64_t, 3 > computeFirstVirtualNodeNeighOffset (uint8_t level, uint8_t inode, uint8_t neighLevel) const
 
std::array< int64_t, 3 > computeLastVirtualEdgeNeighOffset (uint8_t level, uint8_t iedge, uint8_t neighLevel) const
 
std::array< int64_t, 3 > computeLastVirtualNeighOffset (uint8_t level, uint8_t iface, uint8_t neighLevel) const
 
std::array< int64_t, 3 > computeLastVirtualNodeNeighOffset (uint8_t level, uint8_t inode, uint8_t neighLevel) const
 
void computeVirtualEdgeNeighOffsets (uint8_t level, uint8_t iedge, uint8_t neighLevel, std::vector< std::array< int64_t, 3 > > *neighOffsets) const
 
void computeVirtualNeighOffsets (uint8_t level, uint8_t iface, uint8_t neighLevel, std::vector< std::array< int64_t, 3 > > *neighOffsets) const
 
void computeVirtualNodeNeighOffsets (uint8_t level, uint8_t inode, uint8_t neighLevel, std::vector< std::array< int64_t, 3 > > *neighOffsets) const
 
std::array< int64_t, 3 > getEdgePeriodicOffset (const Octant &octant, uint8_t iedge) const
 
uint8_t getMaxEdgeNeighLevel (const Octant &octant) const
 
uint8_t getMaxNeighLevel (const Octant &octant) const
 
uint8_t getMaxNodeNeighLevel (const Octant &octant) const
 
std::array< int64_t, 3 > getNodePeriodicOffset (const Octant &octant, uint8_t inode) const
 
std::array< int64_t, 3 > getPeriodicOffset (const Octant &octant, uint8_t iface) const
 

Friends

class ParaTree
 

Detailed Description

Local octree portion for each process.

LocalTree.hpp

Date
15/dec/2015
Authors
Edoardo Lombardi
Marco Cisternino

Local tree consists mainly of two vectors with:

The octants (and ghosts) are ordered following the Z-curve defined by the Morton index.

Optionally in local tree three vectors of intersections are stored:

Class LocalTree is built with a dimensional parameter int dim and it accepts only two values: dim=2 and dim=3, for 2D and 3D respectively.

Definition at line 71 of file LocalTree.hpp.

Member Typedef Documentation

◆ bvector

typedef std::vector<bool> bitpit::LocalTree::bvector

Vector of boolean values.

Definition at line 94 of file LocalTree.hpp.

◆ intervector

Vector of Intersections.

Definition at line 90 of file LocalTree.hpp.

◆ octvector

typedef std::vector<Octant> bitpit::LocalTree::octvector

Vector of Octants.

Definition at line 86 of file LocalTree.hpp.

◆ u32arr3vector

typedef std::vector<u32array3> bitpit::LocalTree::u32arr3vector

Vector of three-dimensional arrays of unsigned int (32-bit).

Definition at line 110 of file LocalTree.hpp.

◆ u32vector

typedef std::vector<uint32_t> bitpit::LocalTree::u32vector

Vector of usigned int (32-bit).

Definition at line 102 of file LocalTree.hpp.

◆ u64vector

typedef std::vector<uint64_t> bitpit::LocalTree::u64vector

Vector of unsigned int (64-bit).

Definition at line 106 of file LocalTree.hpp.

◆ u8vector

typedef std::vector<uint8_t> bitpit::LocalTree::u8vector

Vector of unsigned int (8-bit).

Definition at line 98 of file LocalTree.hpp.

Member Function Documentation

◆ computeFirstVirtualEdgeNeighOffset()

std::array< int64_t, 3 > bitpit::LocalTree::computeFirstVirtualEdgeNeighOffset ( uint8_t level,
uint8_t iedge,
uint8_t neighLevel ) const
protected

Compute the offset from the origin of an octant to its first virtual edge neighobur. The term "virtual" means that the tree may not contain any octant at the position defined by the computed offset.

Parameters
[in]levelThe level of the octant.
[in]iedgeLocal index of the edge.
[in]neighLevelThe level of the virtual neighbours.
Returns
The computed offset.

Definition at line 2249 of file LocalTree.cpp.

◆ computeFirstVirtualNeighOffset()

std::array< int64_t, 3 > bitpit::LocalTree::computeFirstVirtualNeighOffset ( uint8_t level,
uint8_t iface,
uint8_t neighLevel ) const
protected

Compute the offset from the origin of an octant to its first virtual face neighobur. The term "virtual" means that the tree may not contain any octant at the position defined by the computed offset.

Parameters
[in]levelThe level of the octant.
[in]ifaceLocal index of the face.
[in]neighLevelThe level of the virtual neighbours.
Returns
The computed offset.

Definition at line 2068 of file LocalTree.cpp.

◆ computeFirstVirtualNodeNeighOffset()

std::array< int64_t, 3 > bitpit::LocalTree::computeFirstVirtualNodeNeighOffset ( uint8_t level,
uint8_t inode,
uint8_t neighLevel ) const
protected

Compute the offset from the origin of an octant to its first virtual node neighobur. The term "virtual" means that the tree may not contain any octant at the position defined by the computed offset.

Parameters
[in]levelThe level of the octant.
[in]inodeLocal index of the node.
[in]neighLevelThe level of the virtual neighbours.
Returns
The computed offset.

Definition at line 2192 of file LocalTree.cpp.

◆ computeLastVirtualEdgeNeighOffset()

std::array< int64_t, 3 > bitpit::LocalTree::computeLastVirtualEdgeNeighOffset ( uint8_t level,
uint8_t iedge,
uint8_t neighLevel ) const
protected

Compute the offset from the origin of an octant to its last virtual edge neighobur. The term "virtual" means that the tree may not contain any octant at the position defined by the computed offset.

Parameters
[in]levelThe level of the octant.
[in]iedgeLocal index of the edge.
[in]neighLevelThe level of the virtual neighbours.
Returns
The computed offset.

Definition at line 2280 of file LocalTree.cpp.

◆ computeLastVirtualNeighOffset()

std::array< int64_t, 3 > bitpit::LocalTree::computeLastVirtualNeighOffset ( uint8_t level,
uint8_t iface,
uint8_t neighLevel ) const
protected

Compute the offset from the origin of an octant to its last virtual face neighobur. The term "virtual" means that the tree may not contain any octant at the position defined by the computed offset.

Parameters
[in]levelThe level of the octant.
[in]ifaceLocal index of the face.
[in]neighLevelThe level of the virtual neighbours.
Returns
The computed offset.

Definition at line 2099 of file LocalTree.cpp.

◆ computeLastVirtualNodeNeighOffset()

std::array< int64_t, 3 > bitpit::LocalTree::computeLastVirtualNodeNeighOffset ( uint8_t level,
uint8_t inode,
uint8_t neighLevel ) const
protected

Compute the offset from the origin of an octant to its last virtual node neighobur. The term "virtual" means that the tree may not contain any octant at the position defined by the computed offset.

Parameters
[in]levelThe level of the octant.
[in]inodeLocal index of the node.
[in]neighLevelThe level of the virtual neighbours.
Returns
The computed offset.

Definition at line 2223 of file LocalTree.cpp.

◆ computeVirtualEdgeNeighOffsets()

void bitpit::LocalTree::computeVirtualEdgeNeighOffsets ( uint8_t level,
uint8_t iedge,
uint8_t neighLevel,
std::vector< std::array< int64_t, 3 > > * neighOffsets ) const
protected

Compute the offsets from the origin of an octant to its virtual edge neighoburs. The term "virtual" means that the tree may not contain any octant at the positions defined by the computed offsets.

Parameters
[in]levelThe level of the octant.
[in]iedgeLocal index of the edge.
[in]neighLevelThe level of the virtual neighbours.
[out]neighOffsetsOn output will contain the offsets.

Definition at line 2324 of file LocalTree.cpp.

◆ computeVirtualNeighOffsets()

void bitpit::LocalTree::computeVirtualNeighOffsets ( uint8_t level,
uint8_t iface,
uint8_t neighLevel,
std::vector< std::array< int64_t, 3 > > * neighOffsets ) const
protected

Compute the offsets from the origin of an octant to its virtual node neighoburs. The term "virtual" means that the tree may not contain any octant at the positions defined by the computed offsets.

Parameters
[in]levelThe level of the octant.
[in]ifaceLocal index of the node.
[in]neighLevelThe level of the virtual neighbours.
[out]neighOffsetsOn output will contain the offsets.

Definition at line 2140 of file LocalTree.cpp.

◆ computeVirtualNodeNeighOffsets()

void bitpit::LocalTree::computeVirtualNodeNeighOffsets ( uint8_t level,
uint8_t inode,
uint8_t neighLevel,
std::vector< std::array< int64_t, 3 > > * neighOffsets ) const
protected

Compute the offsets from the origin of an octant to its virtual node neighoburs. The term "virtual" means that the tree may not contain any octant at the positions defined by the computed offsets.

Parameters
[in]levelThe level of the octant.
[in]inodeLocal index of the node.
[in]neighLevelThe level of the virtual neighbours.
[out]neighOffsetsOn output will contain the offsets.

Definition at line 2236 of file LocalTree.cpp.

◆ getEdgePeriodicOffset()

std::array< int64_t, 3 > bitpit::LocalTree::getEdgePeriodicOffset ( const Octant & octant,
uint8_t iedge ) const
protected

Get the periodic offset for the specified edge of the given octant. The offset is the displacement that should be applied to a point on the specified edge to move that point to the corresponding periodic edge.

Parameters
[in]octantOctant for which the offset should be evaluated
[in]iedgeIndex of edge
Returns
The periodic offset for the specified edge of the given octant.

Definition at line 2417 of file LocalTree.cpp.

◆ getMaxEdgeNeighLevel()

uint8_t bitpit::LocalTree::getMaxEdgeNeighLevel ( const Octant & octant) const
protected

Get the maximum level an edge neighbour of the specified octant can have. If 2:1 edge balance is active, a neighbour can only have one more refinement level than the specified octant.

Parameters
[in]octantOctant for which the check has to be performed.
Returns
The maximum level an edge neighbour of the specified octant can have.

Definition at line 2472 of file LocalTree.cpp.

◆ getMaxNeighLevel()

uint8_t bitpit::LocalTree::getMaxNeighLevel ( const Octant & octant) const
protected

Get the maximum level a face neighbour of the specified octant can have. If 2:1 face balance is active, a neighbour can only have one more refinement level than the specified octant.

Parameters
[in]octantOctant for which the check has to be performed.
Returns
The maximum level a face neighbour of the specified octant can have.

Definition at line 2442 of file LocalTree.cpp.

◆ getMaxNodeNeighLevel()

uint8_t bitpit::LocalTree::getMaxNodeNeighLevel ( const Octant & octant) const
protected

Get the maximum level a node neighbour of the specified octant can have. If 2:1 node balance is active, a neighbour can only have one more refinement level than the specified octant.

Parameters
[in]octantOctant for which the check has to be performed.
Returns
The maximum level a node neighbour of the specified octant can have.

Definition at line 2457 of file LocalTree.cpp.

◆ getNodePeriodicOffset()

std::array< int64_t, 3 > bitpit::LocalTree::getNodePeriodicOffset ( const Octant & octant,
uint8_t inode ) const
protected

Get the periodic offset for the specified node of the given octant. The offset is the displacement that should be applied to a point on the specified node to move that point to the corresponding periodic node.

Parameters
[in]octantOctant for which the offset should be evaluated
[in]inodeIndex of node
Returns
The periodic offset for the specified node of the given octant.

Definition at line 2392 of file LocalTree.cpp.

◆ getPeriodicOffset()

std::array< int64_t, 3 > bitpit::LocalTree::getPeriodicOffset ( const Octant & octant,
uint8_t iface ) const
protected

Get the periodic offset for the specified face of the given octant. The offset is the displacement that should be applied to a point on the specified face to move that point to the corresponding periodic face.

Parameters
[in]octantOctant for which the offset should be evaluated
[in]ifaceIndex of face
Returns
The periodic offset for the specified face of the given octant.

Definition at line 2368 of file LocalTree.cpp.

Friends And Related Symbol Documentation

◆ ParaTree

friend class ParaTree
friend

Definition at line 77 of file LocalTree.hpp.


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