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

The VolOctree defines a Octree patch. More...

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

Classes

struct  OctantInfo
 
struct  OctantInfoHasher
 

Public Member Functions

 VolOctree (int dimension, const std::array< double, 3 > &origin, double length, double dh, MPI_Comm communicator, std::size_t haloSize=1)
 
 VolOctree (int id, int dimension, const std::array< double, 3 > &origin, double length, double dh, MPI_Comm communicator, std::size_t haloSize=1)
 
 VolOctree (int id, std::unique_ptr< PabloUniform > &&tree, std::unique_ptr< PabloUniform > *adopter=nullptr)
 
 VolOctree (MPI_Comm communicator, std::size_t haloSize=1)
 
 VolOctree (std::istream &stream, MPI_Comm communicator, std::size_t haloSize=1)
 
 VolOctree (std::unique_ptr< PabloUniform > &&tree, std::unique_ptr< PabloUniform > *adopter=nullptr)
 
 VolOctree (VolOctree &&other)=default
 
 ~VolOctree ()
 
std::unique_ptr< PatchKernelclone () const override
 
std::array< double, 3 > evalCellCentroid (long id) const override
 
double evalCellSize (long id) const override
 
double evalCellVolume (long id) const override
 
double evalInterfaceArea (long id) const override
 
std::array< double, 3 > evalInterfaceNormal (long id) const override
 
int getCellFamilySplitLocalVertex (long id) const
 
int getCellLevel (long id) const
 
OctantInfo getCellOctant (long id) const
 
double getLength () const
 
long getOctantId (const OctantInfo &octantInfo) const
 
OctantgetOctantPointer (const OctantInfo &octantInfo)
 
const OctantgetOctantPointer (const OctantInfo &octantInfo) const
 
std::array< double, 3 > getOrigin () const
 
PabloUniformgetTree ()
 Gets a reference to the octree associated with the patch.
 
const PabloUniformgetTree () const
 Gets constant a reference to the octree associated with the patch.
 
bool isPointInside (const std::array< double, 3 > &point) const override
 
virtual bool isPointInside (const std::array< double, 3 > &point) const=0
 
bool isPointInside (double x, double y, double z) const
 
bool isPointInside (long id, const std::array< double, 3 > &point) const override
 
virtual bool isPointInside (long id, const std::array< double, 3 > &point) const=0
 
bool isPointInside (long id, double x, double y, double z) const
 
long locatePoint (const std::array< double, 3 > &point) const override
 
virtual long locatePoint (const std::array< double, 3 > &point) const=0
 
long locatePoint (double x, double y, double z) const
 
VolOctreeoperator= (const VolOctree &other)
 
VolOctreeoperator= (VolOctree &&other)=default
 
void reset () override
 
void scale (const std::array< double, 3 > &scaling, const std::array< double, 3 > &center) override
 
void setDimension (int dimension) override
 
void setLength (double length)
 
void setOrigin (const std::array< double, 3 > &origin)
 
void settleAdaptionMarkers () override
 
void setTreeAdopter (std::unique_ptr< PabloUniform > *entruster)
 
void simulateCellUpdate (long id, adaption::Marker marker, std::vector< Cell > *virtualCells, PiercedVector< Vertex, long > *virtualVertices) const override
 
void translate (const std::array< double, 3 > &translation) override
 
- Public Member Functions inherited from bitpit::VolumeKernel
bool areFaceVerticesOrdered (const Cell &cell, int face) const
 
void extractEnvelope (SurfaceKernel &envelope) const
 
int getFaceOrderedLocalVertex (const Cell &cell, int face, std::size_t n) const
 
ConstProxyVector< long > getFaceOrderedVertexIds (const Cell &cell, int face) const
 
int getLineCodimension () const override
 
int getPointCodimension () const override
 
int getSurfaceCodimension () const override
 
int getVolumeCodimension () const override
 
bool isPointInside (double x, double y, double z) const
 
bool isPointInside (long id, double x, double y, double z) const
 
- Public Member Functions inherited from bitpit::PatchKernel
 PatchKernel (PatchKernel &&other)
 
virtual ~PatchKernel ()
 
std::vector< adaption::Infoadaption (bool trackAdaption=true, bool squeezeStorage=false)
 
std::vector< adaption::InfoadaptionAlter (bool trackAdaption=true, bool squeezeStorage=false)
 
void adaptionCleanup ()
 
std::vector< adaption::InfoadaptionPrepare (bool trackAdaption=true)
 
CellIterator addCell (Cell &&source, int owner, int haloLayer, long id=Element::NULL_ID)
 
CellIterator addCell (Cell &&source, int owner, long id=Element::NULL_ID)
 
CellIterator addCell (Cell &&source, long id=Element::NULL_ID)
 
CellIterator addCell (const Cell &source, int owner, int haloLayer, long id=Element::NULL_ID)
 
CellIterator addCell (const Cell &source, int owner, long id=Element::NULL_ID)
 
CellIterator addCell (const Cell &source, long id=Element::NULL_ID)
 
CellIterator addCell (ElementType type, const std::vector< long > &connectivity, int owner, int haloLayer, long id=Element::NULL_ID)
 
CellIterator addCell (ElementType type, const std::vector< long > &connectivity, int owner, long id=Element::NULL_ID)
 
CellIterator addCell (ElementType type, const std::vector< long > &connectivity, long id=Element::NULL_ID)
 
CellIterator addCell (ElementType type, int owner, int haloLayer, long id=Element::NULL_ID)
 
CellIterator addCell (ElementType type, int owner, long id=Element::NULL_ID)
 
CellIterator addCell (ElementType type, long id=Element::NULL_ID)
 
CellIterator addCell (ElementType type, std::unique_ptr< long[]> &&connectStorage, int owner, int haloLayer, long id=Element::NULL_ID)
 
CellIterator addCell (ElementType type, std::unique_ptr< long[]> &&connectStorage, int owner, long id=Element::NULL_ID)
 
CellIterator addCell (ElementType type, std::unique_ptr< long[]> &&connectStorage, long id=Element::NULL_ID)
 
InterfaceIterator addInterface (const Interface &source, long id=Element::NULL_ID)
 
InterfaceIterator addInterface (ElementType type, const std::vector< long > &connectivity, long id=Element::NULL_ID)
 
InterfaceIterator addInterface (ElementType type, long id=Element::NULL_ID)
 
InterfaceIterator addInterface (ElementType type, std::unique_ptr< long[]> &&connectStorage, long id=Element::NULL_ID)
 
InterfaceIterator addInterface (Interface &&source, long id=Element::NULL_ID)
 
VertexIterator addVertex (const std::array< double, 3 > &coords, long id=Vertex::NULL_ID)
 
VertexIterator addVertex (const Vertex &source, long id=Vertex::NULL_ID)
 
VertexIterator addVertex (Vertex &&source, long id=Vertex::NULL_ID)
 
bool areAdjacenciesDirty (bool global=false) const
 
bool areInterfacesDirty (bool global=false) const
 
bool arePartitioningInfoDirty (bool global=true) const
 
void buildAdjacencies ()
 
void buildInterfaces ()
 
CellIterator cellBegin ()
 
CellConstIterator cellConstBegin () const
 
CellConstIterator cellConstEnd () const
 
CellIterator cellEnd ()
 
std::vector< long > collapseCoincidentVertices ()
 
void consecutiveRenumber (long offsetVertices, long offsetCells, long offsetInterfaces)
 
void consecutiveRenumberCells (long offset=0)
 
void consecutiveRenumberInterfaces (long offset=0)
 
void consecutiveRenumberVertices (long offset=0)
 
long countBorderCells () const
 
long countBorderFaces () const
 
long countBorderInterfaces () const
 
long countBorderVertices () const
 
long countDuplicateCells () const
 
long countFaces () const
 
long countFreeCells () const
 
long countFreeFaces () const
 
long countFreeInterfaces () const
 
long countFreeVertices () const
 
long countOrphanCells () const
 
long countOrphanInterfaces () const
 
long countOrphanVertices () const
 
bool deleteCell (long id)
 
template<typename IdStorage >
bool deleteCells (const IdStorage &ids)
 
bool deleteCoincidentVertices ()
 
bool deleteInterface (long id)
 
template<typename IdStorage >
bool deleteInterfaces (const IdStorage &ids)
 
bool deleteOrphanInterfaces ()
 
bool deleteOrphanVertices ()
 
void destroyAdjacencies ()
 
void destroyInterfaces ()
 
void displayCells (std::ostream &out, unsigned int padding=0) const
 
void displayInterfaces (std::ostream &out, unsigned int padding=0) const
 
void displayTopologyStats (std::ostream &out, unsigned int padding=0) const
 
void displayVertices (std::ostream &out, unsigned int padding=0) const
 
bool dump (std::ostream &stream)
 
bool dump (std::ostream &stream) const
 
bool empty (bool global=true) const
 
void enableCellBalancing (long id, bool enabled)
 
virtual void evalCellBoundingBox (long id, std::array< double, 3 > *minPoint, std::array< double, 3 > *maxPoint) const
 
void evalElementBoundingBox (const Element &element, std::array< double, 3 > *minPoint, std::array< double, 3 > *maxPoint) const
 
std::array< double, 3 > evalElementCentroid (const Element &element) const
 
virtual void evalInterfaceBoundingBox (long id, std::array< double, 3 > *minPoint, std::array< double, 3 > *maxPoint) const
 
virtual std::array< double, 3 > evalInterfaceCentroid (long id) const
 
double evalPartitioningUnbalance () const
 
double evalPartitioningUnbalance (const std::unordered_map< long, double > &cellWeights) const
 
void findCellEdgeNeighs (long id, bool complete, std::vector< long > *neighs) const
 
std::vector< long > findCellEdgeNeighs (long id, bool complete=true) const
 
std::vector< long > findCellEdgeNeighs (long id, int edge) const
 
void findCellEdgeNeighs (long id, int edge, std::vector< long > *neighs) const
 
std::vector< long > findCellFaceNeighs (long id) const
 
std::vector< long > findCellFaceNeighs (long id, int face) const
 
void findCellFaceNeighs (long id, int face, std::vector< long > *neighs) const
 
void findCellFaceNeighs (long id, std::vector< long > *neighs) const
 
std::vector< long > findCellNeighs (long id) const
 
void findCellNeighs (long id, int codimension, bool complete, std::vector< long > *neighs) const
 
std::vector< long > findCellNeighs (long id, int codimension, bool complete=true) const
 
void findCellNeighs (long id, std::vector< long > *neighs) const
 
void findCellVertexNeighs (long id, bool complete, std::vector< long > *neighs) const
 
std::vector< long > findCellVertexNeighs (long id, bool complete=true) const
 
std::vector< long > findCellVertexNeighs (long id, int vertex) const
 
void findCellVertexNeighs (long id, int vertex, std::vector< long > *neighs) const
 
std::vector< long > findCellVertexOneRing (long id, int vertex) const
 
void findCellVertexOneRing (long id, int vertex, std::vector< long > *neighs) const
 
std::vector< long > findDuplicateCells () const
 
bool findFaceNeighCell (long cellId, long neighId, int *cellFace, int *cellAdjacencyId) const
 
std::vector< long > findOrphanCells () const
 
std::vector< long > findOrphanInterfaces () const
 
std::vector< long > findOrphanVertices ()
 
std::vector< long > findVertexOneRing (long vertexId) const
 
void findVertexOneRing (long vertexId, std::vector< long > *ring) const
 
void flushData (std::fstream &stream, const std::string &name, VTKFormat format) override
 
AdaptionMode getAdaptionMode () const
 
AdaptionStatus getAdaptionStatus (bool global=false) const
 
AdjacenciesBuildStrategy getAdjacenciesBuildStrategy () const
 
void getBoundingBox (bool global, std::array< double, 3 > &minPoint, std::array< double, 3 > &maxPoint) const
 
void getBoundingBox (std::array< double, 3 > &minPoint, std::array< double, 3 > &maxPoint) const
 
CellgetCell (long id)
 
const CellgetCell (long id) const
 
adaption::Marker getCellAdaptionMarker (long id)
 
CellConstIterator getCellConstIterator (long id) const
 
virtual long getCellCount () const
 
int getCellHaloLayer (long id) const
 
CellIterator getCellIterator (long id)
 
int getCellOwner (long id) const
 
int getCellRank (long id) const
 
PiercedVector< Cell > & getCells ()
 
const PiercedVector< Cell > & getCells () const
 
virtual ElementType getCellType (long id) const
 
ConstProxyVector< std::array< double BITPIT_COMMA 3 > > getCellVertexCoordinates (long id) const
 
void getCellVertexCoordinates (long id, std::array< double, 3 > *coordinates) const
 
void getCellVertexCoordinates (long id, std::unique_ptr< std::array< double, 3 >[]> *coordinates) const
 
const MPI_Comm & getCommunicator () const
 
int getDimension () const
 
int getDumpVersion () const
 
ConstProxyVector< std::array< double BITPIT_COMMA 3 > > getElementVertexCoordinates (const Element &element) const
 
void getElementVertexCoordinates (const Element &element, std::array< double, 3 > *coordinates) const
 
void getElementVertexCoordinates (const Element &element, std::unique_ptr< std::array< double, 3 >[]> *coordinates) const
 
CellgetFirstGhost ()
 
const CellgetFirstGhost () const
 
CellgetFirstGhostCell ()
 
const CellgetFirstGhostCell () const
 
VertexgetFirstGhostVertex ()
 
const VertexgetFirstGhostVertex () const
 
long getGhostCellCount () const
 
const std::unordered_map< int, std::vector< long > > & getGhostCellExchangeSources () const
 
const std::vector< long > & getGhostCellExchangeSources (int rank) const
 
const std::unordered_map< int, std::vector< long > > & getGhostCellExchangeTargets () const
 
const std::vector< long > & getGhostCellExchangeTargets (int rank) const
 
long getGhostCount () const
 
const std::unordered_map< int BITPIT_COMMA std::vector< long > > & getGhostExchangeSources () const
 
const std::vector< long > & getGhostExchangeSources (int rank) const
 
const std::unordered_map< int BITPIT_COMMA std::vector< long > > & getGhostExchangeTargets () const
 
const std::vector< long > & getGhostExchangeTargets (int rank) const
 
long getGhostVertexCount () const
 
const std::unordered_map< int, std::vector< long > > & getGhostVertexExchangeSources () const
 
const std::vector< long > & getGhostVertexExchangeSources (int rank) const
 
const std::unordered_map< int, std::vector< long > > & getGhostVertexExchangeTargets () const
 
const std::vector< long > & getGhostVertexExchangeTargets (int rank) const
 
std::size_t getHaloSize () const
 
int getId () const
 
InterfacegetInterface (long id)
 
const InterfacegetInterface (long id) const
 
InterfaceConstIterator getInterfaceConstIterator (long id) const
 
virtual long getInterfaceCount () const
 
InterfaceIterator getInterfaceIterator (long id)
 
PiercedVector< Interface > & getInterfaces ()
 
const PiercedVector< Interface > & getInterfaces () const
 
InterfacesBuildStrategy getInterfacesBuildStrategy () const
 
virtual ElementType getInterfaceType (long id) const
 
ConstProxyVector< std::array< double BITPIT_COMMA 3 > > getInterfaceVertexCoordinates (long id) const
 
void getInterfaceVertexCoordinates (long id, std::array< double, 3 > *coordinates) const
 
void getInterfaceVertexCoordinates (long id, std::unique_ptr< std::array< double, 3 >[]> *coordinates) const
 
long getInternalCellCount () const
 
std::set< int > getInternalCellPIDs ()
 
std::vector< long > getInternalCellsByPID (int pid)
 
long getInternalCount () const
 
long getInternalVertexCount () const
 
CellgetLastInternalCell ()
 
const CellgetLastInternalCell () const
 
VertexgetLastInternalVertex ()
 
const VertexgetLastInternalVertex () const
 
std::vector< int > getNeighbourRanks ()
 
int getOwner (bool allowDirty=false) const
 
PartitioningMode getPartitioningMode () const
 
PartitioningStatus getPartitioningStatus (bool global=false) const
 
int getProcessorCount () const
 
int getRank () const
 
double getTol () const
 
VertexgetVertex (long id)
 
const VertexgetVertex (long id) const
 
VertexConstIterator getVertexConstIterator (long id) const
 
const std::array< double, 3 > & getVertexCoords (long id) const
 
void getVertexCoords (std::size_t nVertices, const long *ids, std::array< double, 3 > *coordinates) const
 
void getVertexCoords (std::size_t nVertices, const long *ids, std::unique_ptr< std::array< double, 3 >[]> *coordinates) const
 
virtual long getVertexCount () const
 
VertexIterator getVertexIterator (long id)
 
int getVertexOwner (long id) const
 
int getVertexRank (long id) const
 
PiercedVector< Vertex > & getVertices ()
 
const PiercedVector< Vertex > & getVertices () const
 
VTKUnstructuredGridgetVTK ()
 
const VTKUnstructuredGridgetVTK () const
 
const CellConstRange getVTKCellWriteRange () const
 
WriteTarget getVTKWriteTarget () const
 
CellIterator ghostBegin ()
 
CellIterator ghostCell2InternalCell (long id)
 
CellIterator ghostCellBegin ()
 
CellConstIterator ghostCellConstBegin () const
 
CellConstIterator ghostCellConstEnd () const
 
CellIterator ghostCellEnd ()
 
CellConstIterator ghostConstBegin () const
 
CellConstIterator ghostConstEnd () const
 
CellIterator ghostEnd ()
 
VertexIterator ghostVertexBegin ()
 
VertexConstIterator ghostVertexConstBegin () const
 
VertexConstIterator ghostVertexConstEnd () const
 
VertexIterator ghostVertexEnd ()
 
void initializeAdjacencies (AdjacenciesBuildStrategy strategy=ADJACENCIES_AUTOMATIC)
 
void initializeInterfaces (InterfacesBuildStrategy strategy=INTERFACES_AUTOMATIC)
 
InterfaceIterator interfaceBegin ()
 
InterfaceConstIterator interfaceConstBegin () const
 
InterfaceConstIterator interfaceConstEnd () const
 
InterfaceIterator interfaceEnd ()
 
CellIterator internalBegin ()
 
CellIterator internalCell2GhostCell (long id, int owner, int haloLayer)
 
CellIterator internalCellBegin ()
 
CellConstIterator internalCellConstBegin () const
 
CellConstIterator internalCellConstEnd () const
 
CellIterator internalCellEnd ()
 
CellConstIterator internalConstBegin () const
 
CellConstIterator internalConstEnd () const
 
CellIterator internalEnd ()
 
VertexIterator internalVertexBegin ()
 
VertexConstIterator internalVertexConstBegin () const
 
VertexConstIterator internalVertexConstEnd () const
 
VertexIterator internalVertexEnd ()
 
bool isAdaptionSupported () const
 
bool isBoundingBoxDirty (bool global=false) const
 
bool isCellAutoIndexingEnabled () const
 
bool isDirty (bool global=false) const
 
bool isDistributed (bool allowDirty=false) const
 
bool isExpert () const
 
bool isInterfaceAutoIndexingEnabled () const
 
bool isInterfaceOrphan (long id) const
 
bool isPartitioned () const
 
bool isPartitioningSupported () const
 
bool isRankNeighbour (int rank)
 
bool isThreeDimensional () const
 
bool isTolCustomized () const
 
bool isVertexAutoIndexingEnabled () const
 
long locatePoint (double x, double y, double z) const
 
void markCellForCoarsening (long id)
 
void markCellForRefinement (long id)
 
PatchKerneloperator= (PatchKernel &&other)
 
std::vector< adaption::Infopartition (bool trackPartitioning, bool squeezeStorage=false)
 
std::vector< adaption::Infopartition (const std::unordered_map< long, double > &cellWeights, bool trackPartitioning, bool squeezeStorage=false)
 
std::vector< adaption::Infopartition (const std::unordered_map< long, int > &cellRanks, bool trackPartitioning, bool squeezeStorage=false)
 
std::vector< adaption::Infopartition (MPI_Comm communicator, bool trackPartitioning, bool squeezeStorage=false, std::size_t haloSize=1)
 
std::vector< adaption::Infopartition (MPI_Comm communicator, const std::unordered_map< long, double > &cellWeights, bool trackPartitioning, bool squeezeStorage=false, std::size_t haloSize=1)
 
std::vector< adaption::Infopartition (MPI_Comm communicator, const std::unordered_map< long, int > &cellRanks, bool trackPartitioning, bool squeezeStorage=false, std::size_t haloSize=1)
 
std::vector< adaption::InfopartitioningAlter (bool trackPartitioning=true, bool squeezeStorage=false)
 
void partitioningCleanup ()
 
std::vector< adaption::InfopartitioningPrepare (bool trackPartitioning)
 
std::vector< adaption::InfopartitioningPrepare (const std::unordered_map< long, double > &cellWeights, bool trackPartitioning)
 
std::vector< adaption::InfopartitioningPrepare (const std::unordered_map< long, int > &cellRanks, bool trackPartitioning)
 
std::vector< adaption::InfopartitioningPrepare (MPI_Comm communicator, bool trackPartitioning, std::size_t haloSize=1)
 
std::vector< adaption::InfopartitioningPrepare (MPI_Comm communicator, const std::unordered_map< long, double > &cellWeights, bool trackPartitioning, std::size_t haloSize=1)
 
std::vector< adaption::InfopartitioningPrepare (MPI_Comm communicator, const std::unordered_map< long, int > &cellRanks, bool trackPartitioning, std::size_t haloSize=1)
 
template<typename Function >
void processCellFaceNeighbours (long seedId, int nLayers, Function function) const
 
template<typename Selector , typename Function >
void processCellFaceNeighbours (long seedId, int nLayers, Selector isSelected, Function function) const
 
template<typename Function >
void processCellNeighbours (long seedId, int nLayers, Function function) const
 
template<typename Selector , typename Function >
void processCellNeighbours (long seedId, int nLayers, Selector isSelected, Function function) const
 
template<typename Function , typename SeedContainer >
void processCellsFaceNeighbours (const SeedContainer &seedIds, int nLayers, Function function) const
 
template<typename Selector , typename Function , typename SeedContainer >
void processCellsFaceNeighbours (const SeedContainer &seedIds, int nLayers, Selector isSelected, Function function) const
 
template<typename Function , typename SeedContainer >
void processCellsNeighbours (const SeedContainer &seedIds, int nLayers, Function function) const
 
template<typename Selector , typename Function , typename SeedContainer >
void processCellsNeighbours (const SeedContainer &seedIds, int nLayers, Selector isSelected, Function function) const
 
bool reserveCells (size_t nCells)
 
bool reserveInterfaces (size_t nInterfaces)
 
bool reserveVertices (size_t nVertices)
 
void resetCellAdaptionMarker (long id)
 
virtual void resetCells ()
 
virtual void resetInterfaces ()
 
void resetTol ()
 
virtual void resetVertices ()
 
void restore (std::istream &stream, bool reregister=false)
 
virtual void rotate (const std::array< double, 3 > &n0, const std::array< double, 3 > &n1, double angle)
 
void rotate (double n0x, double n0y, double n0z, double n1x, double n1y, double n1z, double angle)
 
void scale (const std::array< double, 3 > &scaling)
 
void scale (double scaling)
 
void scale (double scaling, const std::array< double, 3 > &origin)
 
void scale (double sx, double sy, double sz)
 
void scale (double sx, double sy, double sz, const std::array< double, 3 > &origin)
 
void setCellAutoIndexing (bool enabled)
 
void setHaloSize (std::size_t haloSize)
 
void setId (int id)
 
void setInterfaceAutoIndexing (bool enabled)
 
void setTol (double tolerance)
 
void setVertexAutoIndexing (bool enabled)
 
void setVTKWriteTarget (WriteTarget targetCells)
 
bool sort ()
 
bool sortCells ()
 
bool sortInterfaces ()
 
bool sortVertices ()
 
bool squeeze ()
 
bool squeezeCells ()
 
bool squeezeInterfaces ()
 
bool squeezeVertices ()
 
void translate (double sx, double sy, double sz)
 
std::vector< adaption::Infoupdate (bool trackAdaption=true, bool squeezeStorage=false)
 
void updateAdjacencies (bool forcedUpdated=false)
 
void updateBoundingBox (bool forcedUpdated=false)
 
void updateInterfaces (bool forcedUpdated=false)
 
VertexIterator vertexBegin ()
 
VertexConstIterator vertexConstBegin () const
 
VertexConstIterator vertexConstEnd () const
 
VertexIterator vertexEnd ()
 
void write (const std::string &name, VTKWriteMode mode, double time)
 
void write (const std::string &name, VTKWriteMode mode=VTKWriteMode::DEFAULT)
 
void write (VTKWriteMode mode, double time)
 
void write (VTKWriteMode mode=VTKWriteMode::DEFAULT)
 
- Public Member Functions inherited from bitpit::VTKBaseStreamer
virtual void absorbData (std::fstream &, const std::string &, VTKFormat, uint64_t, uint8_t, VTKDataType)
 
template<typename T >
void flushValue (std::fstream &, VTKFormat, const T &value) const
 
template<typename T >
void flushValue (std::fstream &, VTKFormat, const T *values, int nValues) const
 

Protected Member Functions

 VolOctree (const VolOctree &other)
 
std::vector< adaption::Info_adaptionAlter (bool trackAdaption) override
 
void _adaptionCleanup () override
 
std::vector< adaption::Info_adaptionPrepare (bool trackAdaption) override
 
void _dump (std::ostream &stream) const override
 
bool _enableCellBalancing (long id, bool enabled) override
 
void _findCellEdgeNeighs (long id, int edge, const std::vector< long > *blackList, std::vector< long > *neighs) const override
 
void _findCellNeighs (long id, const std::vector< long > *blackList, std::vector< long > *neighs) const override
 
void _findCellVertexNeighs (long id, int vertex, const std::vector< long > *blackList, std::vector< long > *neighs) const override
 
std::vector< long > _findGhostCellExchangeSources (int rank) override
 
adaption::Marker _getCellAdaptionMarker (long id) override
 
long _getCellNativeIndex (long id) const override
 
int _getDumpVersion () const override
 
std::size_t _getMaxHaloSize () override
 
bool _markCellForCoarsening (long id) override
 
bool _markCellForRefinement (long id) override
 
std::vector< adaption::Info_partitioningAlter (bool trackPartitioning) override
 
void _partitioningCleanup () override
 
std::vector< adaption::Info_partitioningPrepare (const std::unordered_map< long, double > &cellWeights, double defaultWeight, bool trackPartitioning) override
 
bool _resetCellAdaptionMarker (long id) override
 
void _resetTol () override
 
void _restore (std::istream &stream) override
 
void _setHaloSize (std::size_t haloSize) override
 
void _setTol (double tolerance) override
 
void _updateAdjacencies () override
 
int findAdjoinNeighFace (const Cell &cell, int cellFace, const Cell &neigh) const override
 
bool isSameFace (const Cell &cell_A, int face_A, const Cell &cell_B, int face_B) const override
 
void setCommunicator (MPI_Comm communicator) override
 
- Protected Member Functions inherited from bitpit::VolumeKernel
 VolumeKernel (int dimension, MPI_Comm communicator, std::size_t haloSize, AdaptionMode adaptionMode, PartitioningMode partitioningMode)
 
 VolumeKernel (int id, int dimension, MPI_Comm communicator, std::size_t haloSize, AdaptionMode adaptionMode, PartitioningMode partitioningMode)
 
 VolumeKernel (MPI_Comm communicator, std::size_t haloSize, AdaptionMode adaptionMode, PartitioningMode partitioningMode)
 
- Protected Member Functions inherited from bitpit::PatchKernel
 PatchKernel (const PatchKernel &other)
 
 PatchKernel (int dimension, MPI_Comm communicator, std::size_t haloSize, AdaptionMode adaptionMode, PartitioningMode partitioningMode)
 
 PatchKernel (int id, int dimension, MPI_Comm communicator, std::size_t haloSize, AdaptionMode adaptionMode, PartitioningMode partitioningMode)
 
 PatchKernel (MPI_Comm communicator, std::size_t haloSize, AdaptionMode adaptionMode, PartitioningMode partitioningMode)
 
virtual void _findCellFaceNeighs (long id, int face, const std::vector< long > *blackList, std::vector< long > *neighs) const
 
virtual std::vector< adaption::Info_partitioningPrepare (const std::unordered_map< long, int > &cellRanks, bool trackPartitioning)
 
virtual void _resetAdjacencies (bool release)
 
virtual void _resetInterfaces (bool release)
 
virtual void _updateInterfaces ()
 
virtual void _writeFinalize ()
 
virtual void _writePrepare ()
 
void addPointToBoundingBox (const std::array< double, 3 > &point)
 
std::unordered_map< long, std::vector< long > > binGroupVertices (const PiercedVector< Vertex > &vertices, int nBins)
 
std::unordered_map< long, std::vector< long > > binGroupVertices (int nBins)
 
void clearBoundingBox ()
 
template<typename item_t , typename id_t = long>
std::unordered_map< id_t, id_t > consecutiveItemRenumbering (PiercedVector< item_t, id_t > &container, long offset)
 
bool deleteVertex (long id)
 
template<typename IdStorage >
bool deleteVertices (const IdStorage &ids)
 
void dumpCells (std::ostream &stream) const
 
void dumpInterfaces (std::ostream &stream) const
 
void dumpVertices (std::ostream &stream) const
 
void extractEnvelope (PatchKernel &envelope) const
 
AlterationFlags getCellAlterationFlags (long id) const
 
AlterationFlags getInterfaceAlterationFlags (long id) const
 
VertexIterator ghostVertex2InternalVertex (long id)
 
VertexIterator internalVertex2GhostVertex (long id, int owner)
 
bool isBoundingBoxFrozen () const
 
bool isCommunicatorSet () const
 
template<typename item_t , typename id_t = long>
void mappedItemRenumbering (PiercedVector< item_t, id_t > &container, const std::unordered_map< id_t, id_t > &renumberMap)
 
PatchKerneloperator= (const PatchKernel &other)=delete
 
void pruneStaleAdjacencies ()
 
void pruneStaleInterfaces ()
 
void removePointFromBoundingBox (const std::array< double, 3 > &point)
 
void resetAdjacencies ()
 
void resetCellAlterationFlags (long id, AlterationFlags flags=FLAG_NONE)
 
void resetInterfaceAlterationFlags (long id, AlterationFlags flags=FLAG_NONE)
 
CellIterator restoreCell (ElementType type, std::unique_ptr< long[]> &&connectStorage, int owner, int haloLayer, long id)
 
void restoreCells (std::istream &stream)
 
InterfaceIterator restoreInterface (ElementType type, std::unique_ptr< long[]> &&connectStorage, long id)
 
void restoreInterfaces (std::istream &stream)
 
VertexIterator restoreVertex (const std::array< double, 3 > &coords, int owner, long id)
 
void restoreVertices (std::istream &stream)
 
void setAdaptionMode (AdaptionMode mode)
 
void setAdaptionStatus (AdaptionStatus status)
 
void setAdjacenciesBuildStrategy (AdjacenciesBuildStrategy status)
 
void setBoundingBox (const std::array< double, 3 > &minPoint, const std::array< double, 3 > &maxPoint)
 
void setBoundingBoxDirty (bool dirty)
 
void setBoundingBoxFrozen (bool frozen)
 
void setCellAlterationFlags (AlterationFlags flags)
 
void setCellAlterationFlags (long id, AlterationFlags flags)
 
void setExpert (bool expert)
 
void setInterfaceAlterationFlags (AlterationFlags flags)
 
void setInterfaceAlterationFlags (long id, AlterationFlags flags)
 
void setInterfacesBuildStrategy (InterfacesBuildStrategy status)
 
void setPartitioned (bool partitioned)
 
void setPartitioningMode (PartitioningMode mode)
 
void setPartitioningStatus (PartitioningStatus status)
 
bool testAlterationFlags (AlterationFlags availableFlags, AlterationFlags requestedFlags) const
 
bool testCellAlterationFlags (long id, AlterationFlags flags) const
 
bool testInterfaceAlterationFlags (long id, AlterationFlags flags) const
 
void unsetCellAlterationFlags (AlterationFlags flags)
 
void unsetCellAlterationFlags (long id, AlterationFlags flags)
 
void unsetInterfaceAlterationFlags (AlterationFlags flags)
 
void unsetInterfaceAlterationFlags (long id, AlterationFlags flags)
 
void updateFirstGhostCellId ()
 
void updateFirstGhostVertexId ()
 
void updateLastInternalCellId ()
 
void updateLastInternalVertexId ()
 

Additional Inherited Members

- Public Types inherited from bitpit::PatchKernel
enum  AdaptionMode { ADAPTION_DISABLED = -1 , ADAPTION_AUTOMATIC , ADAPTION_MANUAL }
 
enum  AdaptionStatus { ADAPTION_CLEAN , ADAPTION_DIRTY , ADAPTION_PREPARED , ADAPTION_ALTERED }
 
enum  AdjacenciesBuildStrategy { ADJACENCIES_NONE = -1 , ADJACENCIES_AUTOMATIC }
 
typedef PiercedVector< Cell >::const_iterator CellConstIterator
 
typedef PiercedVector< Cell >::const_range CellConstRange
 
typedef PiercedVector< Cell >::iterator CellIterator
 
typedef PiercedVector< Cell >::range CellRange
 
typedef PiercedVector< Interface >::const_iterator InterfaceConstIterator
 
typedef PiercedVector< Interface >::const_range InterfaceConstRange
 
typedef PiercedVector< Interface >::iterator InterfaceIterator
 
typedef PiercedVector< Interface >::range InterfaceRange
 
enum  InterfacesBuildStrategy { INTERFACES_NONE = -1 , INTERFACES_AUTOMATIC }
 
enum  PartitioningMode { PARTITIONING_DISABLED = -1 , PARTITIONING_ENABLED }
 
enum  PartitioningStatus { PARTITIONING_CLEAN , PARTITIONING_PREPARED , PARTITIONING_ALTERED }
 
typedef PiercedVector< Vertex >::const_iterator VertexConstIterator
 
typedef PiercedVector< Vertex >::const_range VertexConstRange
 
typedef PiercedVector< Vertex >::iterator VertexIterator
 
typedef PiercedVector< Vertex >::range VertexRange
 
enum  WriteTarget { WRITE_TARGET_CELLS_ALL , WRITE_TARGET_CELLS_INTERNAL }
 
- Static Public Member Functions inherited from bitpit::PatchKernel
template<typename patch_t >
static std::unique_ptr< patch_t > clone (const patch_t *original)
 
- Protected Types inherited from bitpit::PatchKernel
typedef uint16_t AlterationFlags
 
typedef std::unordered_map< long, AlterationFlags > AlterationFlagsStorage
 
- Protected Attributes inherited from bitpit::PatchKernel
AlterationFlagsStorage m_alteredCells
 
AlterationFlagsStorage m_alteredInterfaces
 
PiercedVector< Cellm_cells
 
PiercedVector< Interfacem_interfaces
 
PiercedVector< Vertexm_vertices
 
- Static Protected Attributes inherited from bitpit::PatchKernel
static const double DEFAULT_PARTITIONING_WEIGTH = 1.
 
static const AlterationFlags FLAG_ADJACENCIES_DIRTY = (1u << 1)
 
static const AlterationFlags FLAG_DANGLING = (1u << 3)
 
static const AlterationFlags FLAG_DELETED = (1u << 0)
 
static const AlterationFlags FLAG_INTERFACES_DIRTY = (1u << 2)
 
static const AlterationFlags FLAG_NONE = 0x0
 

Detailed Description

The VolOctree defines a Octree patch.

VolOctree defines a Octree patch.

Examples
POD_example_00002.cpp, RBF_example_00001.cpp, and voloctree_adaptation_example_00001.cpp.

Definition at line 37 of file voloctree.hpp.

Constructor & Destructor Documentation

◆ VolOctree() [1/7]

bitpit::VolOctree::VolOctree ( MPI_Comm communicator,
std::size_t haloSize = 1 )

Creates an uninitialized partitioned patch.

Cells will be initialized the cells only on the process identified by the rank zero in the communicator.

If a null comunicator is provided, a serial patch will be created, this means that each processor will be unaware of the existence of the other processes.

Parameters
communicatoris the communicator to be used for exchanging data among the processes. If a null comunicator is provided, a serial patch will be created
haloSizeis the size, expressed in number of layers, of the ghost cells halo

Definition at line 76 of file voloctree.cpp.

◆ VolOctree() [2/7]

bitpit::VolOctree::VolOctree ( int dimension,
const std::array< double, 3 > & origin,
double length,
double dh,
MPI_Comm communicator,
std::size_t haloSize = 1 )

Creates a patch.

Cells will be initialized the cells only on the process identified by the rank zero in the communicator.

If a null comunicator is provided, a serial patch will be created, this means that each processor will be unaware of the existence of the other processes.

Parameters
dimensionis the dimension of the patch
originis the origin of the domain
lengthis the length of the domain
dhis the maximum allowed cell size of the initial refinement
communicatoris the communicator to be used for exchanging data among the processes. If a null comunicator is provided, a serial patch will be created
haloSizeis the size, expressed in number of layers, of the ghost cells halo

Definition at line 132 of file voloctree.cpp.

◆ VolOctree() [3/7]

bitpit::VolOctree::VolOctree ( int id,
int dimension,
const std::array< double, 3 > & origin,
double length,
double dh,
MPI_Comm communicator,
std::size_t haloSize = 1 )

Creates a patch.

Cells will be initialized the cells only on the process identified by the rank zero in the communicator.

If a null comunicator is provided, a serial patch will be created, this means that each processor will be unaware of the existence of the other processes.

Parameters
idis the id that will be assigned to the patch
dimensionis the dimension of the patch
originis the origin of the domain
lengthis the length of the domain
dhis the maximum allowed cell size of the initial refinement
communicatoris the communicator to be used for exchanging data among the processes. If a null comunicator is provided, a serial patch will be created
haloSizeis the size, expressed in number of layers, of the ghost cells halo

Definition at line 171 of file voloctree.cpp.

◆ VolOctree() [4/7]

bitpit::VolOctree::VolOctree ( std::istream & stream,
MPI_Comm communicator,
std::size_t haloSize = 1 )

Creates a patch restoring the patch saved in the specified stream.

The number of processes in the communicator should be equal to the number of processes of the communicator used when dumping the patch.

Parameters
streamis the stream to read from
communicatoris the communicator to be used for exchanging data among the processes
haloSizeis the size, expressed in number of layers, of the ghost cells halo

Definition at line 245 of file voloctree.cpp.

◆ VolOctree() [5/7]

bitpit::VolOctree::VolOctree ( std::unique_ptr< PabloUniform > && tree,
std::unique_ptr< PabloUniform > * adopter = nullptr )

Creates a patch.

If the tree provides a valid communicator the patch will be considered partitioned, otherwise the patch will be serial.

Parameters
treeis the tree that will be used
adopteris a pointer to the tree adopter

Definition at line 284 of file voloctree.cpp.

◆ VolOctree() [6/7]

bitpit::VolOctree::VolOctree ( int id,
std::unique_ptr< PabloUniform > && tree,
std::unique_ptr< PabloUniform > * adopter = nullptr )

Creates a paritioned patch.

Cells will be initialized the cells only on the process identified by the rank zero in the communicator.

If the tree provides a valid communicator the patch will be considered partitioned, otherwise the patch will be serial.

Parameters
idis the id that will be assigned to the patch
treeis the tree that will be used
adopteris a pointer to the tree adopter

Definition at line 306 of file voloctree.cpp.

◆ ~VolOctree()

bitpit::VolOctree::~VolOctree ( )

Destructor.

Definition at line 385 of file voloctree.cpp.

◆ VolOctree() [7/7]

bitpit::VolOctree::VolOctree ( const VolOctree & other)
protected

Copy constructor.

Parameters
otheris another patch whose content is copied in this element

Definition at line 347 of file voloctree.cpp.

Member Function Documentation

◆ _adaptionAlter()

std::vector< adaption::Info > bitpit::VolOctree::_adaptionAlter ( bool trackAdaption)
overrideprotectedvirtual

Alter the patch performing the adpation.

Parameters
trackAdaptionif set to true the function will return the changes done to the patch during the adaption
Returns
If the adaption is tracked, returns a vector of adaption::Info with all the changes done to the patch during the adaption, otherwise an empty vector will be returned.

Reimplemented from bitpit::PatchKernel.

Definition at line 1024 of file voloctree.cpp.

◆ _adaptionCleanup()

void bitpit::VolOctree::_adaptionCleanup ( )
overrideprotectedvirtual

Cleanup patch data structured after the adaption.

Reimplemented from bitpit::PatchKernel.

Definition at line 1046 of file voloctree.cpp.

◆ _adaptionPrepare()

std::vector< adaption::Info > bitpit::VolOctree::_adaptionPrepare ( bool trackAdaption)
overrideprotectedvirtual

Prepares the patch for performing the adaption.

NOTE: only cells are tracked.

Parameters
trackAdaptionif set to true the function will return the changes that will be performed in the alter step
Returns
If the adaption is tracked, returns a vector of adaption::Info that can be used to discover what changes will be performed in the alter step, otherwise an empty vector will be returned.

Reimplemented from bitpit::PatchKernel.

Definition at line 939 of file voloctree.cpp.

◆ _dump()

void bitpit::VolOctree::_dump ( std::ostream & stream) const
overrideprotectedvirtual

Write the patch to the specified stream.

Parameters
streamis the stream to write to

Implements bitpit::PatchKernel.

Definition at line 2238 of file voloctree.cpp.

◆ _enableCellBalancing()

bool bitpit::VolOctree::_enableCellBalancing ( long id,
bool enabled )
overrideprotectedvirtual

Enables cell balancing.

Parameters
idis the id of the cell
enableddefines if enable the balancing for the specified cell
Returns
Returns true if the falg was properly set, false otherwise.

Reimplemented from bitpit::PatchKernel.

Definition at line 2122 of file voloctree.cpp.

◆ _findCellEdgeNeighs()

void bitpit::VolOctree::_findCellEdgeNeighs ( long id,
int edge,
const std::vector< long > * blackList,
std::vector< long > * neighs ) const
overrideprotectedvirtual

Extracts the neighbours of the specified cell for the given edge.

This function can be only used with three-dimensional cells.

Parameters
idis the id of the cell
edgeis an edge of the cell
blackListis a list of cells that are excluded from the search. The blacklist has to be a pointer to a unique list of ordered cell ids or a null pointer if no cells should be excluded from the search
[in,out]neighsis the vector were the neighbours of the specified cell for the given edge will be stored. The vector is not cleared before adding the neighbours, it is extended by appending all the neighbours found by this function

Reimplemented from bitpit::PatchKernel.

Definition at line 2540 of file voloctree.cpp.

◆ _findCellNeighs()

void bitpit::VolOctree::_findCellNeighs ( long id,
const std::vector< long > * blackList,
std::vector< long > * neighs ) const
overrideprotectedvirtual

Extracts all the neighbours of the specified cell

This implementation can NOT handle hanging nodes.

Parameters
idis the id of the cell
blackListis a list of cells that are excluded from the search. The blacklist has to be a pointer to a unique list of ordered cell ids or a null pointer if no cells should be excluded from the search
[in,out]neighsis the vector were the neighbours of the specified cell for the given vertex will be stored. The vector is not cleared before adding the neighbours, it is extended by appending all the neighbours found by this function

Reimplemented from bitpit::PatchKernel.

Definition at line 2505 of file voloctree.cpp.

◆ _findCellVertexNeighs()

void bitpit::VolOctree::_findCellVertexNeighs ( long id,
int vertex,
const std::vector< long > * blackList,
std::vector< long > * neighs ) const
overrideprotectedvirtual

Extracts the neighbours of the specified cell for the given local vertex.

Parameters
idis the id of the cell
vertexis a local vertex of the cell
blackListis a list of cells that are excluded from the search. The blacklist has to be a pointer to a unique list of ordered cell ids or a null pointer if no cells should be excluded from the search
[in,out]neighsis the vector were the neighbours of the specified cell for the given vertex will be stored. The vector is not cleared before adding the neighbours, it is extended by appending all the neighbours found by this function

Reimplemented from bitpit::PatchKernel.

Definition at line 2597 of file voloctree.cpp.

◆ _findGhostCellExchangeSources()

std::vector< long > bitpit::VolOctree::_findGhostCellExchangeSources ( int rank)
overrideprotectedvirtual

Finds the internal cells that will be ghost cells for the processes with the specified ranks. During data exchange, these cells will be the sources form which data will be read from.

Parameters
rankis the rank for which the information will be built

Reimplemented from bitpit::PatchKernel.

Definition at line 219 of file voloctree_parallel.cpp.

◆ _getCellAdaptionMarker()

adaption::Marker bitpit::VolOctree::_getCellAdaptionMarker ( long id)
overrideprotectedvirtual

Returns the adaption marker of the specified cell.

Parameters
idis the id of the cell
Returns
The adaption marker of the cell.

Reimplemented from bitpit::PatchKernel.

Definition at line 2080 of file voloctree.cpp.

◆ _getCellNativeIndex()

long bitpit::VolOctree::_getCellNativeIndex ( long id) const
overrideprotectedvirtual

Get the native index of a cell.

Parameters
idis the id of the cell
Returns
The native index of a cell.

Reimplemented from bitpit::PatchKernel.

Definition at line 2364 of file voloctree.cpp.

◆ _getDumpVersion()

int bitpit::VolOctree::_getDumpVersion ( ) const
overrideprotectedvirtual

Get the version associated to the binary dumps.

Returns
The version associated to the binary dumps.

Implements bitpit::PatchKernel.

Definition at line 2226 of file voloctree.cpp.

◆ _getMaxHaloSize()

std::size_t bitpit::VolOctree::_getMaxHaloSize ( )
overrideprotectedvirtual

Gets the maximum allowed size, expressed in number of layers, of the ghost cells halo.

Returns
The maximum allowed size, expressed in number of layers, of the ghost cells halo.

Reimplemented from bitpit::PatchKernel.

Definition at line 95 of file voloctree_parallel.cpp.

◆ _markCellForCoarsening()

bool bitpit::VolOctree::_markCellForCoarsening ( long id)
overrideprotectedvirtual

Marks a cell for coarsening.

Parameters
idis the id of the cell that needs to be coarsened

Reimplemented from bitpit::PatchKernel.

Definition at line 2058 of file voloctree.cpp.

◆ _markCellForRefinement()

bool bitpit::VolOctree::_markCellForRefinement ( long id)
overrideprotectedvirtual

Marks a cell for refinement.

Parameters
idis the id of the cell that needs to be refined

Reimplemented from bitpit::PatchKernel.

Definition at line 2048 of file voloctree.cpp.

◆ _partitioningAlter()

std::vector< adaption::Info > bitpit::VolOctree::_partitioningAlter ( bool trackPartitioning)
overrideprotectedvirtual

Alter the patch performing the partitioning.

Default implementation is a no-op function.

Parameters
trackPartitioningif set to true the function will return the changes done to the patch during the partitioning
Returns
If the partitioning is tracked, returns a vector of adaption::Info with all the changes done to the patch during the adaption, otherwise an empty vector will be returned.

Reimplemented from bitpit::PatchKernel.

Definition at line 182 of file voloctree_parallel.cpp.

◆ _partitioningCleanup()

void bitpit::VolOctree::_partitioningCleanup ( )
overrideprotectedvirtual

Cleanup patch data structured after the partitioning.

Reimplemented from bitpit::PatchKernel.

Definition at line 206 of file voloctree_parallel.cpp.

◆ _partitioningPrepare()

std::vector< adaption::Info > bitpit::VolOctree::_partitioningPrepare ( const std::unordered_map< long, double > & cellWeights,
double defaultWeight,
bool trackPartitioning )
overrideprotectedvirtual

Prepares the patch for performing the partitioning.

Parameters
cellWeightsare the weights of the cells, the weight represents the relative computational cost associated to a specified cell. If no weight is specified for a cell, the default weight will be used
defaultWeightis the default weight that will assigned to the cells for which an explicit weight has not been defined
trackPartitioningif set to true the function will return the changes that will be performed in the alter step
Returns
If the partitioning is tracked, returns a vector of adaption::Info that can be used to discover what changes will be performed in the alter step, otherwise an empty vector will be returned.

Reimplemented from bitpit::PatchKernel.

Definition at line 126 of file voloctree_parallel.cpp.

◆ _resetCellAdaptionMarker()

bool bitpit::VolOctree::_resetCellAdaptionMarker ( long id)
overrideprotectedvirtual

Resets the adaption marker of the specified cell.

Parameters
idthe cell to be refined
Returns
Returns true if the marker was properly reset, false otherwise.

Reimplemented from bitpit::PatchKernel.

Definition at line 2069 of file voloctree.cpp.

◆ _resetTol()

void bitpit::VolOctree::_resetTol ( )
overrideprotectedvirtual

Internal function to reset the tolerance for the geometrical checks.

Reimplemented from bitpit::PatchKernel.

Definition at line 2213 of file voloctree.cpp.

◆ _restore()

void bitpit::VolOctree::_restore ( std::istream & stream)
overrideprotectedvirtual

Restore the patch from the specified stream.

Parameters
streamis the stream to read from

Implements bitpit::PatchKernel.

Definition at line 2313 of file voloctree.cpp.

◆ _setHaloSize()

void bitpit::VolOctree::_setHaloSize ( std::size_t haloSize)
overrideprotectedvirtual

Internal function to set the size, expressed in number of layers, of the ghost cells halo.

Parameters
haloSizeis the size, expressed in number of layers, of the ghost cells halo

Reimplemented from bitpit::PatchKernel.

Definition at line 107 of file voloctree_parallel.cpp.

◆ _setTol()

void bitpit::VolOctree::_setTol ( double tolerance)
overrideprotectedvirtual

Internal function to set the tolerance for the geometrical checks.

Parameters
toleranceis the tolerance that will be used for the geometrical checks

Reimplemented from bitpit::PatchKernel.

Definition at line 2203 of file voloctree.cpp.

◆ _updateAdjacencies()

void bitpit::VolOctree::_updateAdjacencies ( )
overrideprotectedvirtual

Internal function to update the adjacencies of the patch.

In addition to the cells whose adjacencies are marked as dirty, also the adjacencies of their neighbours will be updated.

Reimplemented from bitpit::PatchKernel.

Definition at line 1910 of file voloctree.cpp.

◆ clone()

std::unique_ptr< PatchKernel > bitpit::VolOctree::clone ( ) const
overridevirtual

Creates a clone of the pach.

Returns
A clone of the pach.

Implements bitpit::PatchKernel.

Definition at line 397 of file voloctree.cpp.

◆ evalCellCentroid()

std::array< double, 3 > bitpit::VolOctree::evalCellCentroid ( long id) const
overridevirtual

Evaluates the centroid of the specified cell.

Parameters
idis the id of the cell
Returns
The centroid of the specified cell.

Reimplemented from bitpit::PatchKernel.

Definition at line 715 of file voloctree.cpp.

◆ evalCellSize()

double bitpit::VolOctree::evalCellSize ( long id) const
overridevirtual

Evaluates the characteristic size of the specified cell.

Parameters
idis the id of the cell
Returns
The characteristic size of the specified cell.

Implements bitpit::PatchKernel.

Definition at line 729 of file voloctree.cpp.

◆ evalCellVolume()

double bitpit::VolOctree::evalCellVolume ( long id) const
overridevirtual

Evaluates the volume of the specified cell.

Parameters
idis the id of the cell
Returns
The volume of the specified cell.

Implements bitpit::VolumeKernel.

Definition at line 701 of file voloctree.cpp.

◆ evalInterfaceArea()

double bitpit::VolOctree::evalInterfaceArea ( long id) const
overridevirtual

Evaluates the area of the specified interface.

Parameters
idis the id of the interface
Returns
The area of the specified interface.

Implements bitpit::VolumeKernel.

Definition at line 743 of file voloctree.cpp.

◆ evalInterfaceNormal()

std::array< double, 3 > bitpit::VolOctree::evalInterfaceNormal ( long id) const
overridevirtual

Evaluates the normal of the specified interface.

Parameters
idis the id of the interface
Returns
The normal of the specified interface.

Implements bitpit::VolumeKernel.

Definition at line 760 of file voloctree.cpp.

◆ findAdjoinNeighFace()

int bitpit::VolOctree::findAdjoinNeighFace ( const Cell & cell,
int cellFace,
const Cell & neigh ) const
overrideprotectedvirtual

Finds the face of the supposed neighbour that adjoins the target face.

Parameters
cellis the cell
cellFaceis the target face of the cell
neighis a supposed neighbour of the cell
Returns
The face of the neighbour which adjoins the target face. If the two cells are not neighbours, a negative number is returned.

Reimplemented from bitpit::PatchKernel.

Definition at line 2669 of file voloctree.cpp.

◆ getCellFamilySplitLocalVertex()

int bitpit::VolOctree::getCellFamilySplitLocalVertex ( long id) const

Get the local index of the family-splitting node for the specified cell.

Parameters
idis the id of the cell
Returns
The local index of the family-splitting node for the specified cell.

Definition at line 920 of file voloctree.cpp.

◆ getCellLevel()

int bitpit::VolOctree::getCellLevel ( long id) const

Gets the refinement level of the cell with the specified id.

Parameters
idis the id of the cell
Returns
The refinement level of the specified cell.

Definition at line 906 of file voloctree.cpp.

◆ getCellOctant()

VolOctree::OctantInfo bitpit::VolOctree::getCellOctant ( long id) const

Gets the octant of the cell with the specified id.

Parameters
idthe id of the cell
Returns
The octant info of the specified cell

Definition at line 778 of file voloctree.cpp.

◆ getLength()

double bitpit::VolOctree::getLength ( ) const

Gets the reference length of the patch domain.

Returns
The the reference length of the patch domain.

Definition at line 2416 of file voloctree.cpp.

◆ getOctantId()

long bitpit::VolOctree::getOctantId ( const OctantInfo & octantInfo) const

Gets the id of the specified octant.

Parameters
octantInfothe data of the octant
Returns
The id of the specified octant

Definition at line 827 of file voloctree.cpp.

◆ getOctantPointer() [1/2]

Octant * bitpit::VolOctree::getOctantPointer ( const OctantInfo & octantInfo)

Gets a pointer to the specified octant.

Parameters
octantInfothe data of the octant
Returns
The pointer of the specified octant

Definition at line 851 of file voloctree.cpp.

◆ getOctantPointer() [2/2]

const Octant * bitpit::VolOctree::getOctantPointer ( const OctantInfo & octantInfo) const

Gets a constant pointer to the specified octant.

Parameters
octantInfothe data of the octant
Returns
The constant pointer of the specified octant

Definition at line 869 of file voloctree.cpp.

◆ getOrigin()

std::array< double, 3 > bitpit::VolOctree::getOrigin ( ) const

Gets the origin of the patch.

The origin is the lower-left-back corner of the box that defines the patch domain.

Returns
The origin of the patch.

Definition at line 2378 of file voloctree.cpp.

◆ getTree() [1/2]

PabloUniform & bitpit::VolOctree::getTree ( )

Gets a reference to the octree associated with the patch.

Returns
A reference to the octree associated to the patch.

Definition at line 795 of file voloctree.cpp.

◆ getTree() [2/2]

const PabloUniform & bitpit::VolOctree::getTree ( ) const

Gets constant a reference to the octree associated with the patch.

Returns
A constant reference to the octree associated to the patch.

Definition at line 805 of file voloctree.cpp.

◆ isPointInside() [1/6]

bool bitpit::VolOctree::isPointInside ( const std::array< double, 3 > & point) const
overridevirtual

Checks if the specified point is inside the patch.

Parameters
[in]pointis the point to be checked
Returns
Returns true if the point is inside the patch, false otherwise.

Implements bitpit::VolumeKernel.

Definition at line 2140 of file voloctree.cpp.

◆ isPointInside() [2/6]

virtual bool bitpit::VolumeKernel::isPointInside ( const std::array< double, 3 > & point) const
virtual

Implements bitpit::VolumeKernel.

◆ isPointInside() [3/6]

bool bitpit::VolumeKernel::isPointInside ( double x,
double y,
double z ) const

Checks if the specified point is inside the patch.

Parameters
[in]xis the x coordinate of the point
[in]yis the y coordinate of the point
[in]zis the z coordinate of the point
Returns
Returns true if the point is inside the patch, false otherwise.

Definition at line 43 of file volume_kernel.cpp.

◆ isPointInside() [4/6]

bool bitpit::VolOctree::isPointInside ( long id,
const std::array< double, 3 > & point ) const
overridevirtual

Checks if the specified point is inside a cell.

Parameters
[in]idis the idof the cell
[in]pointis the point to be checked
Returns
Returns true if the point is inside the cell, false otherwise.

Implements bitpit::VolumeKernel.

Definition at line 2154 of file voloctree.cpp.

◆ isPointInside() [5/6]

virtual bool bitpit::VolumeKernel::isPointInside ( long id,
const std::array< double, 3 > & point ) const
virtual

Implements bitpit::VolumeKernel.

◆ isPointInside() [6/6]

bool bitpit::VolumeKernel::isPointInside ( long id,
double x,
double y,
double z ) const

Checks if the specified point is inside a cell.

Parameters
[in]idis the index of the cells
[in]xis the x coordinate of the point
[in]yis the y coordinate of the point
[in]zis the z coordinate of the point
Returns
Returns true if the point is inside the cell, false otherwise.

Definition at line 45 of file volume_kernel.cpp.

◆ isSameFace()

bool bitpit::VolOctree::isSameFace ( const Cell & cell_A,
int face_A,
const Cell & cell_B,
int face_B ) const
overrideprotectedvirtual

Check whether the face "face_A" on cell "cell_A" is the same as the face "face_B" on cell "cell_B".

Parameters
[in]cell_Ais the first cell
[in]face_Ais the face on the first cell
[in]cell_Bis the the second cell
[in]face_Bis the face on the second cell
Returns
Returns true if the two faces are the same.

Reimplemented from bitpit::PatchKernel.

Definition at line 2698 of file voloctree.cpp.

◆ locatePoint() [1/3]

long bitpit::VolOctree::locatePoint ( const std::array< double, 3 > & point) const
overridevirtual

Locates the cell the contains the point.

If the point is not inside the patch, the function returns the id of the null element.

Parameters
[in]pointis the point to be checked
Returns
Returns the id of the cell the contains the point. If the point is not inside the patch, the function returns the id of the null element.

Implements bitpit::PatchKernel.

Definition at line 2185 of file voloctree.cpp.

◆ locatePoint() [2/3]

virtual long bitpit::PatchKernel::locatePoint ( const std::array< double, 3 > & point) const
virtual

Implements bitpit::PatchKernel.

◆ locatePoint() [3/3]

long bitpit::PatchKernel::locatePoint ( double x,
double y,
double z ) const

Locates the cell the contains the point.

If the point is not inside the patch, the function returns the id of the null element.

Parameters
[in]xis the x coordinate of the point
[in]yis the y coordinate of the point
[in]zis the z coordinate of the point
Returns
Returns the id of the cell the contains the point. If the point is not inside the patch, the function returns the id of the null element.

Definition at line 645 of file patch_kernel.cpp.

◆ operator=()

VolOctree & bitpit::VolOctree::operator= ( const VolOctree & other)

Copy assignment.

Parameters
otheris another patch whose content is copied in this element

Definition at line 374 of file voloctree.cpp.

◆ reset()

void bitpit::VolOctree::reset ( )
overridevirtual

Internal function to reset the patch.

Reimplemented from bitpit::PatchKernel.

Definition at line 405 of file voloctree.cpp.

◆ scale()

void bitpit::VolOctree::scale ( const std::array< double, 3 > & scaling,
const std::array< double, 3 > & center )
overridevirtual

Scales the patch.

Parameters
[in]scalingis the scaling factor vector
[in]centeris the center of the scaling

Reimplemented from bitpit::PatchKernel.

Definition at line 2466 of file voloctree.cpp.

◆ setCommunicator()

void bitpit::VolOctree::setCommunicator ( MPI_Comm communicator)
overrideprotectedvirtual

Sets the MPI communicator to be used for parallel communications.

Parameters
communicatoris the communicator to be used for parallel communications.

Reimplemented from bitpit::PatchKernel.

Definition at line 81 of file voloctree_parallel.cpp.

◆ setDimension()

void bitpit::VolOctree::setDimension ( int dimension)
overridevirtual

Sets the dimension of the patch.

Parameters
dimensionthe dimension of the patch

Reimplemented from bitpit::PatchKernel.

Definition at line 510 of file voloctree.cpp.

◆ setLength()

void bitpit::VolOctree::setLength ( double length)

Sets the the reference length of the patch domain.

Parameters
lengthis the reference length of the patch domain

Definition at line 2426 of file voloctree.cpp.

◆ setOrigin()

void bitpit::VolOctree::setOrigin ( const std::array< double, 3 > & origin)

Sets the origin of the patch.

The origin is the lower-left-back corner.

Parameters
originis the new origin of the patch

Definition at line 2390 of file voloctree.cpp.

◆ settleAdaptionMarkers()

void bitpit::VolOctree::settleAdaptionMarkers ( )
overridevirtual

Make the adaption markers set by the user consistent with the internal criteria defined by the patch.

The patch will enforce the 2:1 balancing on the cells that have it enabled and will verify the feasability of coarsening. Adaption markers will be updated consequently.

Reimplemented from bitpit::PatchKernel.

Definition at line 1059 of file voloctree.cpp.

◆ setTreeAdopter()

void bitpit::VolOctree::setTreeAdopter ( std::unique_ptr< PabloUniform > * adopter)

Sets the tree adopter, i.e., the pointer that will take the ownership of the tree when the patch is desctructed.

Parameters
adopteris a pointer to the tree adopter

Definition at line 816 of file voloctree.cpp.

◆ simulateCellUpdate()

void bitpit::VolOctree::simulateCellUpdate ( long id,
adaption::Marker marker,
std::vector< Cell > * virtualCells,
PiercedVector< Vertex, long > * virtualVertices ) const
overridevirtual

Simulate the adaption of the specified cell.

Parameters
idis the id of the cell
markeris the adaption marker of the simulated update
[out]virtualCellsare the virtual cells that would be outcome of the update
[out]virtualVerticesare the vertices of the virtual cells that would be outcome of the update

Reimplemented from bitpit::PatchKernel.

Definition at line 638 of file voloctree.cpp.

◆ translate()

void bitpit::VolOctree::translate ( const std::array< double, 3 > & translation)
overridevirtual

Translates the patch.

Parameters
[in]translationis the translation vector

Reimplemented from bitpit::PatchKernel.

Definition at line 2401 of file voloctree.cpp.


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