Loading...
Searching...
No Matches
Public Member Functions | List of all members
bitpit::PabloUniform Class Reference

PABLO Uniform is an example of user class derived from ParaTree to map ParaTree in a uniform (square/cubic) domain. Pablo Uniform takes as input in constructor the coordinates of the origin (X,Y,Z) and the length of the side L. More...

#include <PabloUniform.hpp>

Inheritance diagram for bitpit::PabloUniform:
Inheritance graph
[legend]
Collaboration diagram for bitpit::PabloUniform:
Collaboration graph
[legend]

Public Member Functions

 PabloUniform (const std::string &logfile=DEFAULT_LOG_FILE, MPI_Comm comm=MPI_COMM_WORLD)
 
 PabloUniform (double X, double Y, double Z, double L, uint8_t dim=2, const std::string &logfile=DEFAULT_LOG_FILE, MPI_Comm comm=MPI_COMM_WORLD)
 
 PabloUniform (uint8_t dim, const std::string &logfile=DEFAULT_LOG_FILE, MPI_Comm comm=MPI_COMM_WORLD)
 
void dump (std::ostream &stream, bool full=true) override
 
double getArea (const Intersection *inter) const
 
double getArea (const Octant *oct) const
 
double getArea (uint32_t idx) const
 
void getBoundingBox (darray3 &P0, darray3 &P1) const
 
darray3 getCenter (const Intersection *inter) const
 
darray3 getCenter (const Octant *oct) const
 
void getCenter (const Octant *oct, darray3 &center) const
 
darray3 getCenter (uint32_t idx) const
 
void getCenter (uint32_t idx, darray3 &center) const
 
darray3 getCoordinates (const Octant *oct) const
 
darray3 getCoordinates (uint32_t idx) const
 
int getDumpVersion () const override
 
darray3 getFaceCenter (const Octant *oct, uint8_t iface) const
 
void getFaceCenter (const Octant *oct, uint8_t iface, darray3 &center) const
 
darray3 getFaceCenter (uint32_t idx, uint8_t iface) const
 
void getFaceCenter (uint32_t idx, uint8_t iface, darray3 &center) const
 
double getL () const
 
double getLocalMaxSize () const
 
double getLocalMinSize () const
 
darray3 getNode (const Octant *oct, uint8_t inode) const
 
void getNode (const Octant *oct, uint8_t inode, darray3 &node) const
 
darray3 getNode (uint32_t idx, uint8_t inode) const
 
void getNode (uint32_t idx, uint8_t inode, darray3 &node) const
 
darray3 getNodeCoordinates (uint32_t inode) const
 
darr3vector getNodes (const Intersection *inter) const
 
darr3vector getNodes (const Octant *oct) const
 
void getNodes (const Octant *oct, darr3vector &nodes) const
 
darr3vector getNodes (uint32_t idx) const
 
void getNodes (uint32_t idx, darr3vector &nodes) const
 
darray3 getNormal (const Intersection *inter) const
 
darray3 getNormal (const Octant *oct, uint8_t iface) const
 
void getNormal (const Octant *oct, uint8_t iface, darray3 &normal) const
 
darray3 getNormal (uint32_t idx, uint8_t iface) const
 
void getNormal (uint32_t idx, uint8_t iface, darray3 &normal) const
 
darray3 getOrigin () const
 
OctantgetPointOwner (darray3 point)
 
OctantgetPointOwner (darray3 point, bool &isghost)
 
uint32_t getPointOwnerIdx (darray3 point) const
 
uint32_t getPointOwnerIdx (darray3 point, bool &isghost) const
 
int getPointOwnerRank (darray3 point)
 
double getSize (const Intersection *inter) const
 
double getSize (const Octant *oct) const
 
double getSize (uint32_t idx) const
 
double getVolume (const Octant *oct) const
 
double getVolume (uint32_t idx) const
 
double getX (const Octant *oct) const
 
double getX (uint32_t idx) const
 
double getX0 () const
 
double getY (const Octant *oct) const
 
double getY (uint32_t idx) const
 
double getY0 () const
 
double getZ (const Octant *oct) const
 
double getZ (uint32_t idx) const
 
double getZ0 () const
 
double levelToSize (uint8_t level) const
 
void reset () override
 
void restore (std::istream &stream) override
 
void setL (double L)
 
void setOrigin (const darray3 &origin)
 
void write (const std::string &filename)
 
void writeTest (const std::string &filename, dvector data)
 
- Public Member Functions inherited from bitpit::ParaTree
 ParaTree (const ParaTree &other)
 
 ParaTree (const std::string &logfile=DEFAULT_LOG_FILE, MPI_Comm comm=MPI_COMM_WORLD)
 
 ParaTree (std::istream &stream, const std::string &logfile=DEFAULT_LOG_FILE, MPI_Comm comm=MPI_COMM_WORLD)
 
 ParaTree (uint8_t dim, const std::string &logfile=DEFAULT_LOG_FILE, MPI_Comm comm=MPI_COMM_WORLD)
 
virtual ~ParaTree ()
 
bool adapt (bool mapper_flag=false)
 
bool adaptGlobalCoarse (bool mapper_flag=false)
 
bool adaptGlobalRefine (bool mapper_flag=false)
 
bool check21Balance ()
 
bool checkToAdapt ()
 
void clearConnectivity (bool release=true)
 
template<class Impl >
void communicate (DataCommInterface< Impl > &userData)
 
void computeConnectivity ()
 
void computeIntersections ()
 
uint64_t computeNodePersistentKey (const Octant *oct, uint8_t node) const
 
uint64_t computeNodePersistentKey (uint32_t idx, uint8_t node) const
 
LoadBalanceRanges evalLoadBalanceRanges (dvector *weights)
 
LoadBalanceRanges evalLoadBalanceRanges (uint8_t level, dvector *weights)
 
void expectedOctantAdapt (const Octant *octant, int8_t marker, octvector *result) const
 
void findAllCodimensionNeighbours (const Octant *oct, u32vector &neighbours, bvector &isghost)
 
void findAllCodimensionNeighbours (uint32_t idx, u32vector &neighbours, bvector &isghost)
 
void findAllNodeNeighbours (const Octant *oct, uint32_t node, u32vector &neighbours, bvector &isghost) const
 
void findAllNodeNeighbours (uint32_t idx, uint32_t node, u32vector &neighbours, bvector &isghost)
 
void findGhostAllCodimensionNeighbours (Octant *oct, u32vector &neighbours, bvector &isghost)
 
void findGhostAllCodimensionNeighbours (uint32_t idx, u32vector &neighbours, bvector &isghost)
 
void findGhostNeighbours (const Octant *oct, uint8_t face, uint8_t codim, u32vector &neighbours, bvector &isghost) const
 
void findGhostNeighbours (uint32_t idx, uint8_t face, uint8_t codim, u32vector &neighbours) const
 
void findGhostNeighbours (uint32_t idx, uint8_t face, uint8_t codim, u32vector &neighbours, bvector &isghost) const
 
void findNeighbours (const Octant *oct, uint8_t face, uint8_t codim, u32vector &neighbours, bvector &isghost) const
 
void findNeighbours (uint32_t idx, uint8_t face, uint8_t codim, u32vector &neighbours) const
 
void findNeighbours (uint32_t idx, uint8_t face, uint8_t codim, u32vector &neighbours, bvector &isghost) const
 
int findOwner (uint64_t morton) const
 
void freeComm ()
 
double getArea (const Intersection *inter) const
 
double getArea (const Octant *oct) const
 
double getArea (uint32_t idx) const
 
bool getBalance (const Octant *oct) const
 
bool getBalance (uint32_t idx) const
 
uint8_t getBalanceCodimension () const
 
const std::map< int, std::vector< uint32_t > > & getBordersPerProc () const
 
bool getBound (const Intersection *inter) const
 
bool getBound (const Octant *oct) const
 
bool getBound (const Octant *oct, uint8_t face) const
 
bool getBound (uint32_t idx) const
 
bool getBound (uint32_t idx, uint8_t face) const
 
darray3 getCenter (const Intersection *inter) const
 
darray3 getCenter (const Octant *oct) const
 
void getCenter (const Octant *oct, darray3 &centerCoords) const
 
darray3 getCenter (uint32_t idx) const
 
void getCenter (uint32_t idx, darray3 &centerCoords) const
 
MPI_Comm getComm () const
 
const u32vector2D & getConnectivity () const
 
const u32vector & getConnectivity (Octant *oct) const
 
const u32vector & getConnectivity (uint32_t idx) const
 
darray3 getCoordinates (const Octant *oct) const
 
darray3 getCoordinates (uint32_t idx) const
 
uint8_t getDim () const
 
const int8_t(* getEdgecoeffs () const)[3]
 
void getEdgecoeffs (int8_t edgecoeffs[12][3]) const
 
const uint8_t(* getEdgeface () const)[2]
 
void getEdgeface (uint8_t edgeface[12][2]) const
 
uint8_t getFace (const Intersection *inter) const
 
darray3 getFaceCenter (const Octant *oct, uint8_t face) const
 
void getFaceCenter (const Octant *oct, uint8_t face, darray3 &centerCoords) const
 
darray3 getFaceCenter (uint32_t idx, uint8_t face) const
 
void getFaceCenter (uint32_t idx, uint8_t face, darray3 &centerCoords) const
 
const uint8_t(* getFacenode () const)[4]
 
void getFacenode (uint8_t facenode[6][4]) const
 
uint8_t getFamilySplittingNode (const Octant *) const
 
bool getFiner (const Intersection *inter) const
 
uint64_t getFirstDescMorton () const
 
const u32vector2D & getGhostConnectivity () const
 
const u32vector & getGhostConnectivity (const Octant *oct) const
 
const u32vector & getGhostConnectivity (uint32_t idx) const
 
uint64_t getGhostGlobalIdx (uint32_t idx) const
 
int getGhostLayer (const Octant *oct) const
 
uint32_t getGhostLocalIdx (uint64_t gidx) const
 
OctantgetGhostOctant (uint32_t idx)
 
const OctantgetGhostOctant (uint32_t idx) const
 
uint64_t getGlobalIdx (const Octant *oct) const
 
uint64_t getGlobalIdx (uint32_t idx) const
 
uint64_t getGlobalNumOctants () const
 
uint32_t getIdx (const Octant *oct) const
 
uint32_t getIn (const Intersection *inter) const
 
octantIterator getInternalOctantsBegin ()
 
octantIterator getInternalOctantsEnd ()
 
IntersectiongetIntersection (uint32_t idx)
 
bool getIsGhost (const Intersection *inter) const
 
bool getIsGhost (const Octant *oct) const
 
bool getIsNewC (const Octant *oct) const
 
bool getIsNewC (uint32_t idx) const
 
bool getIsNewR (const Octant *oct) const
 
bool getIsNewR (uint32_t idx) const
 
double getL () const
 
uint64_t getLastDescMorton () const
 
uint64_t getLastDescMorton (const Octant *oct) const
 
uint64_t getLastDescMorton (uint32_t idx) const
 
Operation getLastOperation () const
 
uint8_t getLevel (const Intersection *inter) const
 
uint8_t getLevel (const Octant *oct) const
 
uint8_t getLevel (uint32_t idx) const
 
const LoadBalanceRangesgetLoadBalanceRanges () const
 
uint32_t getLocalIdx (uint64_t gidx) const
 
uint32_t getLocalIdx (uint64_t gidx, int rank) const
 
void getLocalIdx (uint64_t gidx, uint32_t &lidx, int &rank) const
 
uint8_t getLocalMaxDepth () const
 
double getLocalMaxSize () const
 
double getLocalMinSize () const
 
LoggergetLog ()
 
void getMapping (uint32_t idx, u32vector &mapper, bvector &isghost) const
 
void getMapping (uint32_t idx, u32vector &mapper, bvector &isghost, ivector &rank) const
 
int8_t getMarker (const Octant *oct) const
 
int8_t getMarker (uint32_t idx) const
 
int8_t getMaxDepth () const
 
uint32_t getMaxLength () const
 
int getMaxLevel () const
 
uint64_t getMorton (const Octant *oct) const
 
uint64_t getMorton (uint32_t idx) const
 
uint8_t getNchildren () const
 
uint8_t getNedges () const
 
uint8_t getNfaces () const
 
uint8_t getNnodes () const
 
uint8_t getNnodesperface () const
 
darray3 getNode (const Octant *oct, uint8_t node) const
 
void getNode (const Octant *oct, uint8_t node, darray3 &nodeCoords) const
 
darray3 getNode (uint32_t idx, uint8_t node) const
 
void getNode (uint32_t idx, uint8_t node, darray3 &nodeCoords) const
 
const int8_t(* getNodecoeffs () const)[3]
 
void getNodecoeffs (int8_t nodecoeffs[8][3]) const
 
darray3 getNodeCoordinates (uint32_t node) const
 
const uint8_t(* getNodeface () const)[3]
 
void getNodeface (uint8_t nodeface[8][3]) const
 
const u32array3 & getNodeLogicalCoordinates (uint32_t node) const
 
const u32arr3vector & getNodes () const
 
darr3vector getNodes (const Intersection *inter) const
 
darr3vector getNodes (const Octant *oct) const
 
void getNodes (const Octant *oct, darr3vector &nodesCoords) const
 
darr3vector getNodes (uint32_t idx) const
 
void getNodes (uint32_t idx, darr3vector &nodesCoords) const
 
std::size_t getNofGhostLayers () const
 
darray3 getNormal (const Intersection *inter) const
 
darray3 getNormal (const Octant *oct, uint8_t face) const
 
void getNormal (const Octant *oct, uint8_t face, darray3 &normal) const
 
darray3 getNormal (uint32_t idx, uint8_t face) const
 
void getNormal (uint32_t idx, uint8_t face, darray3 &normal) const
 
const int8_t(* getNormals () const)[3]
 
void getNormals (int8_t normals[6][3]) const
 
int getNproc () const
 
uint32_t getNumGhosts () const
 
uint32_t getNumIntersections () const
 
uint32_t getNumNodes () const
 
uint32_t getNumOctants () const
 
OctantgetOctant (uint32_t idx)
 
const OctantgetOctant (uint32_t idx) const
 
const uint8_t * getOppface () const
 
void getOppface (uint8_t oppface[6]) const
 
darray3 getOrigin () const
 
uint32_t getOut (const Intersection *inter) const
 
bool getOutIsGhost (const Intersection *inter) const
 
int getOwnerRank (uint64_t globalIdx) const
 
u32vector getOwners (const Intersection *inter) const
 
bool getParallel () const
 
const std::vector< uint64_t > & getPartitionFirstDesc () const
 
const std::vector< uint64_t > & getPartitionLastDesc () const
 
const std::vector< uint64_t > & getPartitionRangeGlobalIdx () const
 
bool getPbound (const Intersection *inter) const
 
bool getPbound (const Octant *oct) const
 
bool getPbound (const Octant *oct, uint8_t face) const
 
bool getPbound (uint32_t idx) const
 
bool getPbound (uint32_t idx, uint8_t face) const
 
octantIterator getPboundOctantsBegin ()
 
octantIterator getPboundOctantsEnd ()
 
bvector getPeriodic () const
 
bool getPeriodic (uint8_t i) const
 
octantID getPersistentIdx (const Octant *oct) const
 
octantID getPersistentIdx (uint32_t idx) const
 
OctantgetPointOwner (const darray3 &point)
 
OctantgetPointOwner (const darray3 &point, bool &isghost)
 
OctantgetPointOwner (const dvector &point)
 
OctantgetPointOwner (const dvector &point, bool &isghost)
 
uint32_t getPointOwnerIdx (const darray3 &point) const
 
uint32_t getPointOwnerIdx (const darray3 &point, bool &isghost) const
 
uint32_t getPointOwnerIdx (const double *point) const
 
uint32_t getPointOwnerIdx (const double *point, bool &isghost) const
 
uint32_t getPointOwnerIdx (const dvector &point) const
 
uint32_t getPointOwnerIdx (const dvector &point, bool &isghost) const
 
int getPointOwnerRank (const darray3 &point)
 
void getPreMapping (u32vector &idx, std::vector< int8_t > &markers, std::vector< bool > &isghost)
 
int8_t getPreMarker (Octant *oct)
 
int8_t getPreMarker (uint32_t idx)
 
int getRank () const
 
bool getSerial () const
 
double getSize (const Intersection *inter) const
 
double getSize (const Octant *oct) const
 
double getSize (uint32_t idx) const
 
uint64_t getStatus () const
 
double getTol () const
 
double getVolume (const Octant *oct) const
 
double getVolume (uint32_t idx) const
 
double getX (const Octant *oct) const
 
double getX (uint32_t idx) const
 
double getX0 () const
 
double getY (const Octant *oct) const
 
double getY (uint32_t idx) const
 
double getY0 () const
 
double getZ (const Octant *oct) const
 
double getZ (uint32_t idx) const
 
double getZ0 () const
 
bool isCommSet () const
 
bool isEdgeOnOctant (const Octant *edgeOctant, uint8_t edgeIndex, const Octant *octant) const
 
bool isFaceOnOctant (const Octant *faceOctant, uint8_t faceIndex, const Octant *octant) const
 
bool isNodeOnOctant (const Octant *nodeOctant, uint8_t nodeIndex, const Octant *octant) const
 
double levelToSize (uint8_t level) const
 
void loadBalance (const dvector *weight=NULL)
 
template<class Impl >
void loadBalance (DataLBInterface< Impl > &userData, dvector *weight=NULL)
 
template<class Impl >
void loadBalance (DataLBInterface< Impl > &userData, uint8_t &level, dvector *weight=NULL)
 
void loadBalance (uint8_t &level, const dvector *weight=NULL)
 
void preadapt ()
 
void printHeader ()
 
template<class Impl >
void privateLoadBalance (const uint32_t *partition, DataLBInterface< Impl > *userData=nullptr)
 
void replaceComm (MPI_Comm communicator, MPI_Comm *previousCommunicator=nullptr)
 
void setBalance (Octant *oct, bool balance)
 
void setBalance (uint32_t idx, bool balance)
 
void setBalanceCodimension (uint8_t b21codim)
 
void setComm (MPI_Comm communicator)
 
void setMarker (Octant *oct, int8_t marker)
 
void setMarker (uint32_t idx, int8_t marker)
 
void setNofGhostLayers (std::size_t nofGhostLayers)
 
void setPeriodic (uint8_t i)
 
void settleMarkers ()
 
void setTol (double tol=1.0e-14)
 
void updateConnectivity ()
 
void write (const std::string &filename)
 
void writeTest (const std::string &filename, dvector data)
 

Additional Inherited Members

- Public Types inherited from bitpit::ParaTree
typedef std::unordered_map< int, std::array< uint32_t, 2 > > ExchangeRanges
 
enum  Operation {
  OP_NONE , OP_INIT , OP_PRE_ADAPT , OP_ADAPT_MAPPED ,
  OP_ADAPT_UNMAPPED , OP_LOADBALANCE_FIRST , OP_LOADBALANCE
}
 
- Static Public Attributes inherited from bitpit::ParaTree
static BITPIT_PUBLIC_API const std::string DEFAULT_LOG_FILE = "PABLO"
 

Detailed Description

PABLO Uniform is an example of user class derived from ParaTree to map ParaTree in a uniform (square/cubic) domain. Pablo Uniform takes as input in constructor the coordinates of the origin (X,Y,Z) and the length of the side L.

Date
25/jan/2016
Authors
Edoardo Lombardi
Marco Cisternino

Class PabloUniform has a dimensional parameter int dim and it accepts only two values: dim=2 and dim=3, for 2D and 3D respectively.

Examples
PABLO_bubbles_2D.cpp, PABLO_bubbles_3D.cpp, PABLO_example_00001.cpp, PABLO_example_00002.cpp, PABLO_example_00003.cpp, PABLO_example_00004.cpp, PABLO_example_00005.cpp, PABLO_example_00006.cpp, PABLO_example_00007.cpp, PABLO_example_00008.cpp, PABLO_example_00009.cpp, PABLO_example_00010.cpp, and PABLO_example_00011.cpp.

Definition at line 61 of file PabloUniform.hpp.

Constructor & Destructor Documentation

◆ PabloUniform() [1/3]

bitpit::PabloUniform::PabloUniform ( const std::string & logfile = DEFAULT_LOG_FILE,
MPI_Comm comm = MPI_COMM_WORLD )

Default empty constructor of PabloUniform.

Parameters
[in]logfileThe file name for the log of this object. PABLO.log is the default value.
[in]commThe MPI communicator used by the parallel octree. MPI_COMM_WORLD is the default value.

Definition at line 53 of file PabloUniform.cpp.

◆ PabloUniform() [2/3]

bitpit::PabloUniform::PabloUniform ( uint8_t dim,
const std::string & logfile = DEFAULT_LOG_FILE,
MPI_Comm comm = MPI_COMM_WORLD )

Default constructor of PabloUniform. It sets the Origin in (0,0,0) and side of length 1.

Parameters
[in]dimThe space dimension of the octree.
[in]logfileThe file name for the log of this object. PABLO.log is the default value.
[in]commThe MPI communicator used by the parallel octree. MPI_COMM_WORLD is the default value.

Definition at line 69 of file PabloUniform.cpp.

◆ PabloUniform() [3/3]

bitpit::PabloUniform::PabloUniform ( double X,
double Y,
double Z,
double L,
uint8_t dim = 2,
const std::string & logfile = DEFAULT_LOG_FILE,
MPI_Comm comm = MPI_COMM_WORLD )

Custom constructor of PabloUniform. It sets the Origin in (X,Y,Z) and side of length L.

Parameters
[in]Xx-coordinate of the origin in physical domain,
[in]Yy-coordinate of the origin in physical domain,
[in]Zz-coordinate of the origin in physical domain,
[in]LLength of the side in physical domain.
[in]dimThe space dimension of the octree.
[in]logfileThe file name for the log of this object. PABLO.log is the default value.
[in]commThe MPI communicator used by the parallel octree. MPI_COMM_WORLD is the default value.

Definition at line 89 of file PabloUniform.cpp.

Member Function Documentation

◆ dump()

void bitpit::PabloUniform::dump ( std::ostream & stream,
bool full = true )
overridevirtual

Write the octree to the specified stream.

Parameters
streamis the stream to write to
fullis the flag for a complete dump with mapping structureof last operation of the tree

Reimplemented from bitpit::ParaTree.

Definition at line 137 of file PabloUniform.cpp.

◆ getArea() [1/3]

double bitpit::PabloUniform::getArea ( const Intersection * inter) const

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 749 of file PabloUniform.cpp.

◆ getArea() [2/3]

double bitpit::PabloUniform::getArea ( const Octant * oct) const

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

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

Definition at line 518 of file PabloUniform.cpp.

◆ getArea() [3/3]

double bitpit::PabloUniform::getArea ( uint32_t idx) const

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 305 of file PabloUniform.cpp.

◆ getBoundingBox()

void bitpit::PabloUniform::getBoundingBox ( darray3 & P0,
darray3 & P1 ) const

Get the coordinates of the extreme points of a bounding box containing the local tree

Parameters
[out]P0Array with coordinates of the first point (lowest coordinates);
[out]P1Array with coordinates of the last point (highest coordinates).

Definition at line 690 of file PabloUniform.cpp.

◆ getCenter() [1/5]

darray3 bitpit::PabloUniform::getCenter ( const Intersection * inter) const

Get the coordinates of the center of an intersection.

Parameters
[in]interPointer to target intersection.
Returns
Coordinates of the center of intersection.

Definition at line 758 of file PabloUniform.cpp.

◆ getCenter() [2/5]

darray3 bitpit::PabloUniform::getCenter ( const Octant * oct) const

Get the coordinates of the center of an octant.

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

Definition at line 548 of file PabloUniform.cpp.

◆ getCenter() [3/5]

void bitpit::PabloUniform::getCenter ( const Octant * oct,
darray3 & center ) const

Get the coordinates of the center of an octant.

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

Definition at line 536 of file PabloUniform.cpp.

◆ getCenter() [4/5]

darray3 bitpit::PabloUniform::getCenter ( uint32_t idx) const

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 335 of file PabloUniform.cpp.

◆ getCenter() [5/5]

void bitpit::PabloUniform::getCenter ( uint32_t idx,
darray3 & center ) const

Get the coordinates of the center of an octant.

Parameters
[in]idxLocal index of target octant.
[out]centerCoordinates of the center of octant.
Examples
PABLO_example_00001.cpp, PABLO_example_00004.cpp, PABLO_example_00007.cpp, PABLO_example_00008.cpp, PABLO_example_00009.cpp, and PABLO_example_00010.cpp.

Definition at line 323 of file PabloUniform.cpp.

◆ getCoordinates() [1/2]

darray3 bitpit::PabloUniform::getCoordinates ( const Octant * oct) const

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

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

Definition at line 459 of file PabloUniform.cpp.

◆ getCoordinates() [2/2]

darray3 bitpit::PabloUniform::getCoordinates ( uint32_t idx) const

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

Parameters
[in]idxLocal index of target octant.
Returns
Coordinates X,Y,Z of node 0.

Definition at line 246 of file PabloUniform.cpp.

◆ getDumpVersion()

int bitpit::PabloUniform::getDumpVersion ( ) const
overridevirtual

Get the version associated to the binary dumps.

Returns
The version associated to the binary dumps.

Reimplemented from bitpit::ParaTree.

Definition at line 124 of file PabloUniform.cpp.

◆ getFaceCenter() [1/4]

darray3 bitpit::PabloUniform::getFaceCenter ( const Octant * oct,
uint8_t iface ) const

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

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

Definition at line 576 of file PabloUniform.cpp.

◆ getFaceCenter() [2/4]

void bitpit::PabloUniform::getFaceCenter ( const Octant * oct,
uint8_t iface,
darray3 & center ) const

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

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

Definition at line 563 of file PabloUniform.cpp.

◆ getFaceCenter() [3/4]

darray3 bitpit::PabloUniform::getFaceCenter ( uint32_t idx,
uint8_t iface ) const

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 of octant.

Definition at line 363 of file PabloUniform.cpp.

◆ getFaceCenter() [4/4]

void bitpit::PabloUniform::getFaceCenter ( uint32_t idx,
uint8_t iface,
darray3 & center ) const

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 of octant.

Definition at line 350 of file PabloUniform.cpp.

◆ getL()

double bitpit::PabloUniform::getL ( ) const

Get the length of the domain.

Returns
Length of the octree.

Definition at line 206 of file PabloUniform.cpp.

◆ getLocalMaxSize()

double bitpit::PabloUniform::getLocalMaxSize ( ) const

Get the local current maximum size of the octree.

Returns
Local current maximum size of the local partition of the octree.

Definition at line 672 of file PabloUniform.cpp.

◆ getLocalMinSize()

double bitpit::PabloUniform::getLocalMinSize ( ) const

Get the local current minimum size of the octree.

Returns
Local current minimum size of the local partition of the octree.

Definition at line 680 of file PabloUniform.cpp.

◆ getNode() [1/4]

darray3 bitpit::PabloUniform::getNode ( const Octant * oct,
uint8_t inode ) const

Get the coordinates of single node of an octant.

Parameters
[in]octPointer to the target octant
[in]inodeIndex of the target node.
Returns
Coordinates of the center of the inode-th of octant.

Definition at line 591 of file PabloUniform.cpp.

◆ getNode() [2/4]

void bitpit::PabloUniform::getNode ( const Octant * oct,
uint8_t inode,
darray3 & node ) const

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

Parameters
[in]octPointer to the target octant
[in]inodeIndex of the target node.
[out]nodeCoordinates of the center of the inode-th of octant.

Definition at line 606 of file PabloUniform.cpp.

◆ getNode() [3/4]

darray3 bitpit::PabloUniform::getNode ( uint32_t idx,
uint8_t inode ) const

Get the coordinates of a node of an octant.

Parameters
[in]idxLocal index of target octant.
[in]inodeIndex of the target node.
Returns
Coordinates of of the inode-th node of octant.

Definition at line 378 of file PabloUniform.cpp.

◆ getNode() [4/4]

void bitpit::PabloUniform::getNode ( uint32_t idx,
uint8_t inode,
darray3 & node ) const

Get the coordinates of a node of an octant.

Parameters
[in]idxLocal index of target octant.
[in]inodeIndex of the target node.
[out]nodeCoordinates of of the inode-th node of octant.

Definition at line 393 of file PabloUniform.cpp.

◆ getNodeCoordinates()

darray3 bitpit::PabloUniform::getNodeCoordinates ( uint32_t inode) const

Get the physical coordinates of a node

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

Definition at line 864 of file PabloUniform.cpp.

◆ getNodes() [1/5]

darr3vector bitpit::PabloUniform::getNodes ( const Intersection * inter) const

Get the coordinates of the nodes of an intersection.

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

Definition at line 771 of file PabloUniform.cpp.

◆ getNodes() [2/5]

darr3vector bitpit::PabloUniform::getNodes ( const Octant * oct) const

Get the coordinates of the nodes of an octant.

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

Definition at line 633 of file PabloUniform.cpp.

◆ getNodes() [3/5]

void bitpit::PabloUniform::getNodes ( const Octant * oct,
darr3vector & nodes ) const

Get the coordinates of the nodes of an octant.

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

Definition at line 618 of file PabloUniform.cpp.

◆ getNodes() [4/5]

darr3vector bitpit::PabloUniform::getNodes ( uint32_t idx) const

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 420 of file PabloUniform.cpp.

◆ getNodes() [5/5]

void bitpit::PabloUniform::getNodes ( uint32_t idx,
darr3vector & nodes ) const

Get the coordinates of the nodes of an octant.

Parameters
[in]idxLocal index of target octant.
[out]nodesCoordinates of the nodes of octant.
Examples
PABLO_example_00002.cpp, PABLO_example_00003.cpp, PABLO_example_00004.cpp, PABLO_example_00005.cpp, PABLO_example_00007.cpp, PABLO_example_00008.cpp, PABLO_example_00009.cpp, and PABLO_example_00010.cpp.

Definition at line 405 of file PabloUniform.cpp.

◆ getNormal() [1/5]

darray3 bitpit::PabloUniform::getNormal ( const Intersection * inter) const

Get the normal of an intersection.

Parameters
[in]interPointer to target intersection.
Returns
Coordinates of the normal of intersection.

Definition at line 787 of file PabloUniform.cpp.

◆ getNormal() [2/5]

darray3 bitpit::PabloUniform::getNormal ( const Octant * oct,
uint8_t iface ) const

Get the normal of a face of an octant.

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

Definition at line 661 of file PabloUniform.cpp.

◆ getNormal() [3/5]

void bitpit::PabloUniform::getNormal ( const Octant * oct,
uint8_t iface,
darray3 & normal ) const

Get the normal of a face of an octant.

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

Definition at line 651 of file PabloUniform.cpp.

◆ getNormal() [4/5]

darray3 bitpit::PabloUniform::getNormal ( uint32_t idx,
uint8_t iface ) const

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 447 of file PabloUniform.cpp.

◆ getNormal() [5/5]

void bitpit::PabloUniform::getNormal ( uint32_t idx,
uint8_t iface,
darray3 & normal ) const

Get the normal of a face of an octant.

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

Definition at line 437 of file PabloUniform.cpp.

◆ getOrigin()

darray3 bitpit::PabloUniform::getOrigin ( ) const

Get the coordinates of the origin of the octree.

Returns
Coordinates of the origin.

Definition at line 174 of file PabloUniform.cpp.

◆ getPointOwner() [1/2]

Octant * bitpit::PabloUniform::getPointOwner ( darray3 point)

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 is outside of the domain).

Definition at line 799 of file PabloUniform.cpp.

◆ getPointOwner() [2/2]

Octant * bitpit::PabloUniform::getPointOwner ( darray3 point,
bool & isghost )

Get the octant owner of an input point.

Parameters
[in]pointCoordinates of target point.
[out]isghostBoolean flag, true if the octant found is ghost
Returns
Index of octant owner of target point (max uint32_t representable if point outside of the ghosted domain).

Definition at line 811 of file PabloUniform.cpp.

◆ getPointOwnerIdx() [1/2]

uint32_t bitpit::PabloUniform::getPointOwnerIdx ( darray3 point) const

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 825 of file PabloUniform.cpp.

◆ getPointOwnerIdx() [2/2]

uint32_t bitpit::PabloUniform::getPointOwnerIdx ( darray3 point,
bool & isghost ) const

Get the octant owner of an input point.

Parameters
[in]pointCoordinates of target point.
[out]isghostBoolean flag, true if the octant found is ghost
Returns
Index of octant owner of target point (max uint32_t representable if point outside of the ghosted domain).

Definition at line 838 of file PabloUniform.cpp.

◆ getPointOwnerRank()

int bitpit::PabloUniform::getPointOwnerRank ( darray3 point)

Get the octant owner rank of an input point.

Parameters
[in]pointCoordinates of target point.
Returns
Owner rank of target point (negative if out of global domain).

Definition at line 849 of file PabloUniform.cpp.

◆ getSize() [1/3]

double bitpit::PabloUniform::getSize ( const Intersection * inter) const

Get the size of an intersection.

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

Definition at line 740 of file PabloUniform.cpp.

◆ getSize() [2/3]

double bitpit::PabloUniform::getSize ( const Octant * oct) const

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

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

Definition at line 509 of file PabloUniform.cpp.

◆ getSize() [3/3]

double bitpit::PabloUniform::getSize ( uint32_t idx) const

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

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

Definition at line 296 of file PabloUniform.cpp.

◆ getVolume() [1/2]

double bitpit::PabloUniform::getVolume ( const Octant * oct) const

Get the volume of an octant.

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

Definition at line 527 of file PabloUniform.cpp.

◆ getVolume() [2/2]

double bitpit::PabloUniform::getVolume ( uint32_t idx) const

Get the volume of an octant.

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

Definition at line 314 of file PabloUniform.cpp.

◆ getX() [1/2]

double bitpit::PabloUniform::getX ( const Octant * oct) const

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

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

Definition at line 473 of file PabloUniform.cpp.

◆ getX() [2/2]

double bitpit::PabloUniform::getX ( uint32_t idx) const

Get the coordinate X 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 260 of file PabloUniform.cpp.

◆ getX0()

double bitpit::PabloUniform::getX0 ( ) const

Get the coordinate X of the origin of the octree.

Returns
Coordinate X of the origin.

Definition at line 182 of file PabloUniform.cpp.

◆ getY() [1/2]

double bitpit::PabloUniform::getY ( const Octant * oct) const

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

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

Definition at line 485 of file PabloUniform.cpp.

◆ getY() [2/2]

double bitpit::PabloUniform::getY ( uint32_t idx) const

Get the coordinate Y 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 272 of file PabloUniform.cpp.

◆ getY0()

double bitpit::PabloUniform::getY0 ( ) const

Get the coordinate Y of the origin of the octree.

Returns
Coordinate Y of the origin.

Definition at line 190 of file PabloUniform.cpp.

◆ getZ() [1/2]

double bitpit::PabloUniform::getZ ( const Octant * oct) const

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

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

Definition at line 497 of file PabloUniform.cpp.

◆ getZ() [2/2]

double bitpit::PabloUniform::getZ ( uint32_t idx) const

Get the coordinate Z 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 284 of file PabloUniform.cpp.

◆ getZ0()

double bitpit::PabloUniform::getZ0 ( ) const

Get the coordinate Z of the origin of the octree.

Returns
Coordinate Z of the origin.

Definition at line 198 of file PabloUniform.cpp.

◆ levelToSize()

double bitpit::PabloUniform::levelToSize ( uint8_t level) const

Get the size of an octant corresponding to a target level.

Parameters
[in]levelInput level.
Returns
Size of an octant of input level.

Definition at line 233 of file PabloUniform.cpp.

◆ reset()

void bitpit::PabloUniform::reset ( )
overridevirtual

Reset the octree

Reimplemented from bitpit::ParaTree.

Definition at line 106 of file PabloUniform.cpp.

◆ restore()

void bitpit::PabloUniform::restore ( std::istream & stream)
overridevirtual

Restore the octree from the specified stream.

Parameters
streamis the stream to read from

Reimplemented from bitpit::ParaTree.

Definition at line 152 of file PabloUniform.cpp.

◆ setL()

void bitpit::PabloUniform::setL ( double L)

Set the length of the domain.

Parameters
[in]LLength of the octree.

Definition at line 214 of file PabloUniform.cpp.

◆ setOrigin()

void bitpit::PabloUniform::setOrigin ( const darray3 & origin)

Set the origin of the domain.

Parameters
[in]originOrigin of the octree.

Definition at line 224 of file PabloUniform.cpp.

◆ write()

void bitpit::PabloUniform::write ( const std::string & filename)

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]filenameName of output file (PABLO will add the total number of processes p000# and the current rank s000#).
Examples
PABLO_example_00001.cpp, PABLO_example_00002.cpp, PABLO_example_00005.cpp, and PABLO_example_00011.cpp.

Definition at line 881 of file PabloUniform.cpp.

◆ writeTest()

void bitpit::PabloUniform::writeTest ( const std::string & filename,
dvector data )

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]filenameName of output file (PABLO will add the total number of processes p000# and the current rank s000#).
[in]dataVector of double with user data.
Examples
PABLO_example_00003.cpp, PABLO_example_00004.cpp, PABLO_example_00007.cpp, PABLO_example_00008.cpp, PABLO_example_00009.cpp, and PABLO_example_00010.cpp.

Definition at line 1035 of file PabloUniform.cpp.


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