Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
bitpit::PatchKernel Class Referenceabstract

The PatchKernel class provides an interface for defining patches. More...

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

Classes

struct  CellFuzzyPositionGreater
 
struct  CellFuzzyPositionLess
 
struct  CellPositionGreater
 
struct  CellPositionLess
 
struct  PointPositionLess
 
struct  VertexPositionGreater
 
struct  VertexPositionLess
 

Public Types

enum  AdaptionStatus {
  ADAPTION_UNSUPPORTED = -1 , 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  PartitioningStatus { PARTITIONING_UNSUPPORTED = -1 , PARTITIONING_CLEAN , PARTITIONING_PREPARED , PARTITIONING_ALTERED }
 
enum  SpawnStatus { SPAWN_UNNEEDED = -1 , SPAWN_NEEDED , SPAWN_DONE }
 
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 }
 

Public Member Functions

 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 ()
 
virtual std::unique_ptr< PatchKernelclone () const =0
 
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
 
virtual std::array< double, 3 > evalCellCentroid (long id) const
 
virtual double evalCellSize (long id) const =0
 
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
 
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
 
virtual int getLineCodimension () const =0
 
std::vector< int > getNeighbourRanks ()
 
int getOwner (bool allowDirty=false) const
 
PartitioningStatus getPartitioningStatus (bool global=false) const
 
virtual int getPointCodimension () const =0
 
int getProcessorCount () const
 
int getRank () const
 
SpawnStatus getSpawnStatus () const
 
virtual int getSurfaceCodimension () const =0
 
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
 
virtual int getVolumeCodimension () const =0
 
VTKUnstructuredGridgetVTK ()
 
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
 
virtual long locatePoint (const std::array< double, 3 > &point) const =0
 
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)
 
virtual void reset ()
 
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)
 
virtual void scale (const std::array< double, 3 > &scaling, const std::array< double, 3 > &origin)
 
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)
 
virtual void setDimension (int dimension)
 
void setHaloSize (std::size_t haloSize)
 
void setId (int id)
 
void setInterfaceAutoIndexing (bool enabled)
 
virtual void settleAdaptionMarkers ()
 
void setTol (double tolerance)
 
void setVertexAutoIndexing (bool enabled)
 
void setVTKWriteTarget (WriteTarget targetCells)
 
virtual void simulateCellUpdate (const long id, adaption::Marker marker, std::vector< Cell > *virtualCells, PiercedVector< Vertex, long > *virtualVertices) const
 
bool sort ()
 
bool sortCells ()
 
bool sortInterfaces ()
 
bool sortVertices ()
 
std::vector< adaption::Infospawn (bool trackSpawn)
 
bool squeeze ()
 
bool squeezeCells ()
 
bool squeezeInterfaces ()
 
bool squeezeVertices ()
 
virtual void translate (const std::array< double, 3 > &translation)
 
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
 

Static Public Member Functions

template<typename patch_t >
static std::unique_ptr< patch_t > clone (const patch_t *original)
 

Protected Types

typedef uint16_t AlterationFlags
 
typedef std::unordered_map< long, AlterationFlags > AlterationFlagsStorage
 

Protected Member Functions

 PatchKernel (const PatchKernel &other)
 
 PatchKernel (int dimension, MPI_Comm communicator, std::size_t haloSize, bool expert)
 
 PatchKernel (int id, int dimension, MPI_Comm communicator, std::size_t haloSize, bool expert)
 
 PatchKernel (MPI_Comm communicator, std::size_t haloSize, bool expert)
 
virtual std::vector< adaption::Info_adaptionAlter (bool trackAdaption)
 
virtual void _adaptionCleanup ()
 
virtual std::vector< adaption::Info_adaptionPrepare (bool trackAdaption)
 
virtual void _dump (std::ostream &stream) const =0
 
virtual bool _enableCellBalancing (long id, bool enabled)
 
virtual void _findCellEdgeNeighs (long id, int edge, const std::vector< long > *blackList, std::vector< long > *neighs) const
 
virtual void _findCellFaceNeighs (long id, int face, const std::vector< long > *blackList, std::vector< long > *neighs) const
 
virtual void _findCellNeighs (long id, const std::vector< long > *blackList, std::vector< long > *neighs) const
 
virtual void _findCellVertexNeighs (long id, int vertex, const std::vector< long > *blackList, std::vector< long > *neighs) const
 
virtual std::vector< long > _findGhostCellExchangeSources (int rank)
 
virtual adaption::Marker _getCellAdaptionMarker (long id)
 
virtual long _getCellNativeIndex (long id) const
 
virtual int _getDumpVersion () const =0
 
virtual std::size_t _getMaxHaloSize ()
 
virtual bool _markCellForCoarsening (long id)
 
virtual bool _markCellForRefinement (long id)
 
virtual std::vector< adaption::Info_partitioningAlter (bool trackPartitioning)
 
virtual void _partitioningCleanup ()
 
virtual std::vector< adaption::Info_partitioningPrepare (const std::unordered_map< long, double > &cellWeights, double defaultWeight, bool trackPartitioning)
 
virtual std::vector< adaption::Info_partitioningPrepare (const std::unordered_map< long, int > &cellRanks, bool trackPartitioning)
 
virtual void _resetAdjacencies (bool release)
 
virtual bool _resetCellAdaptionMarker (long id)
 
virtual void _resetInterfaces (bool release)
 
virtual void _resetTol ()
 
virtual void _restore (std::istream &stream)=0
 
virtual void _setHaloSize (std::size_t haloSize)
 
virtual void _setTol (double tolerance)
 
virtual std::vector< adaption::Info_spawn (bool trackAdaption)
 
virtual void _updateAdjacencies ()
 
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
 
virtual int findAdjoinNeighFace (const Cell &cell, int cellFace, const Cell &neigh) 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
 
virtual bool isSameFace (const Cell &cell_A, int face_A, const Cell &cell_B, int face_B) 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 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)
 
virtual void setCommunicator (MPI_Comm communicator)
 
void setExpert (bool expert)
 
void setInterfaceAlterationFlags (AlterationFlags flags)
 
void setInterfaceAlterationFlags (long id, AlterationFlags flags)
 
void setInterfacesBuildStrategy (InterfacesBuildStrategy status)
 
void setPartitioned (bool partitioned)
 
void setPartitioningStatus (PartitioningStatus status)
 
void setSpawnStatus (SpawnStatus 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 ()
 

Protected Attributes

AlterationFlagsStorage m_alteredCells
 
AlterationFlagsStorage m_alteredInterfaces
 
PiercedVector< Cellm_cells
 
PiercedVector< Interfacem_interfaces
 
PiercedVector< Vertexm_vertices
 

Static Protected Attributes

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
 

Friends

class PatchGlobalInfo
 
class PatchInfo
 
class PatchManager
 
class PatchNumberingInfo
 

Detailed Description

The PatchKernel class provides an interface for defining patches.

PatchKernel is the base class for defining patches.

Examples
voloctree_adaptation_example_00001.cpp.

Definition at line 54 of file patch_kernel.hpp.

Member Typedef Documentation

◆ AlterationFlags

typedef uint16_t bitpit::PatchKernel::AlterationFlags
protected

Definition at line 782 of file patch_kernel.hpp.

◆ AlterationFlagsStorage

typedef std::unordered_map<long, AlterationFlags> bitpit::PatchKernel::AlterationFlagsStorage
protected

Definition at line 783 of file patch_kernel.hpp.

◆ CellConstIterator

Definition at line 69 of file patch_kernel.hpp.

◆ CellConstRange

Definition at line 77 of file patch_kernel.hpp.

◆ CellIterator

Definition at line 65 of file patch_kernel.hpp.

◆ CellRange

Definition at line 73 of file patch_kernel.hpp.

◆ InterfaceConstIterator

Definition at line 70 of file patch_kernel.hpp.

◆ InterfaceConstRange

Definition at line 78 of file patch_kernel.hpp.

◆ InterfaceIterator

Definition at line 66 of file patch_kernel.hpp.

◆ InterfaceRange

Definition at line 74 of file patch_kernel.hpp.

◆ VertexConstIterator

Definition at line 68 of file patch_kernel.hpp.

◆ VertexConstRange

Definition at line 76 of file patch_kernel.hpp.

◆ VertexIterator

Definition at line 64 of file patch_kernel.hpp.

◆ VertexRange

Definition at line 72 of file patch_kernel.hpp.

Member Enumeration Documentation

◆ AdaptionStatus

Adaption status

Definition at line 344 of file patch_kernel.hpp.

◆ AdjacenciesBuildStrategy

Adjacencies build strategy

Definition at line 319 of file patch_kernel.hpp.

◆ InterfacesBuildStrategy

Interfaces build strategy

Definition at line 327 of file patch_kernel.hpp.

◆ PartitioningStatus

Partitioning status

Definition at line 355 of file patch_kernel.hpp.

◆ SpawnStatus

Spawn status

Definition at line 335 of file patch_kernel.hpp.

◆ WriteTarget

enum bitpit::PatchKernel::WriteTarget

Definition at line 80 of file patch_kernel.hpp.

Constructor & Destructor Documentation

◆ PatchKernel() [1/5]

bitpit::PatchKernel::PatchKernel ( PatchKernel && other)

Move constructor.

Parameters
otheris another patch whose content is moved into this

Definition at line 277 of file patch_kernel.cpp.

◆ ~PatchKernel()

bitpit::PatchKernel::~PatchKernel ( )
virtual

Destroys the patch.

Definition at line 596 of file patch_kernel.cpp.

◆ PatchKernel() [2/5]

bitpit::PatchKernel::PatchKernel ( MPI_Comm communicator,
std::size_t haloSize,
bool expert )
protected

Creates a patch.

Patches that are filled automatically (e.g. VolOctree) will initialize 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
expertif true, the expert mode will be enabled

Definition at line 70 of file patch_kernel.cpp.

◆ PatchKernel() [3/5]

bitpit::PatchKernel::PatchKernel ( int dimension,
MPI_Comm communicator,
std::size_t haloSize,
bool expert )
protected

Creates a patch.

Patches that are filled automatically (e.g. VolOctree) will initialize 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
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
expertif true, the expert mode will be enabled

Definition at line 112 of file patch_kernel.cpp.

◆ PatchKernel() [4/5]

bitpit::PatchKernel::PatchKernel ( int id,
int dimension,
MPI_Comm communicator,
std::size_t haloSize,
bool expert )
protected

Creates a patch.

Patches that are filled automatically (e.g. VolOctree) will initialize 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
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
expertif true, the expert mode will be enabled

Definition at line 159 of file patch_kernel.cpp.

◆ PatchKernel() [5/5]

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

Copy constructor.

Parameters
otheris another patch whose content is copied into this

Definition at line 194 of file patch_kernel.cpp.

Member Function Documentation

◆ _adaptionAlter()

std::vector< adaption::Info > bitpit::PatchKernel::_adaptionAlter ( bool trackAdaption)
protectedvirtual

Alter the patch performing the adaption.

Default implementation is a no-op function.

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 in bitpit::VolOctree.

Definition at line 5238 of file patch_kernel.cpp.

◆ _adaptionCleanup()

void bitpit::PatchKernel::_adaptionCleanup ( )
protectedvirtual

Cleanup patch data structured after the adaption.

Default implementation is a no-op function.

Reimplemented in bitpit::VolOctree.

Definition at line 5252 of file patch_kernel.cpp.

◆ _adaptionPrepare()

std::vector< adaption::Info > bitpit::PatchKernel::_adaptionPrepare ( bool trackAdaption)
protectedvirtual

Prepares the patch for performing the adaption.

Default implementation is a no-op function.

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 in bitpit::VolOctree.

Definition at line 5220 of file patch_kernel.cpp.

◆ _dump()

virtual void bitpit::PatchKernel::_dump ( std::ostream & stream) const
protectedpure virtual

◆ _enableCellBalancing()

bool bitpit::PatchKernel::_enableCellBalancing ( long id,
bool enabled )
protectedvirtual

Enables cell balancing.

Default implementation is a no-op function.

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

Reimplemented in bitpit::VolOctree.

Definition at line 5325 of file patch_kernel.cpp.

◆ _findCellEdgeNeighs()

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

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 in bitpit::VolCartesian, and bitpit::VolOctree.

Definition at line 3730 of file patch_kernel.cpp.

◆ _findCellFaceNeighs()

void bitpit::PatchKernel::_findCellFaceNeighs ( long id,
int face,
const std::vector< long > * blackList,
std::vector< long > * neighs ) const
protectedvirtual

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

Parameters
idis the id of the cell
faceis a face 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 face 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 in bitpit::VolCartesian.

Definition at line 3602 of file patch_kernel.cpp.

◆ _findCellNeighs()

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

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 in bitpit::VolOctree.

Definition at line 3509 of file patch_kernel.cpp.

◆ _findCellVertexNeighs()

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

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

Cells that has only a vertex in common are considered neighbours only if there are other cells "connecting" them.

              .-----.                   .-----.
              |     |                   |     |
            V | A1  |                 V | A2  |
        .-----+-----.             .-----+-----.
        |     |                   |     |     |
        | B1  |                   | B2  | C2  |
        .-----.                   .-----.-----.

For example, A1 and B1 are not neighbours (although they share the vertex V), whereas A2 and B2 are neighbours.

This implementation can NOT handle hanging nodes.

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 in bitpit::VolCartesian, and bitpit::VolOctree.

Definition at line 3895 of file patch_kernel.cpp.

◆ _findGhostCellExchangeSources()

std::vector< long > bitpit::PatchKernel::_findGhostCellExchangeSources ( int rank)
protectedvirtual

Finds the internal cells that will be ghost cells for the process 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 in bitpit::VolOctree.

Definition at line 4764 of file patch_kernel_parallel.cpp.

◆ _getCellAdaptionMarker()

adaption::Marker bitpit::PatchKernel::_getCellAdaptionMarker ( long id)
protectedvirtual

Returns the adaption marker of the specified cell.

Default implementation always return an undefined marker.

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

Reimplemented in bitpit::VolOctree.

Definition at line 5309 of file patch_kernel.cpp.

◆ _getCellNativeIndex()

long bitpit::PatchKernel::_getCellNativeIndex ( long id) const
protectedvirtual

Get the native index of a cell.

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

Reimplemented in bitpit::VolOctree.

Definition at line 3391 of file patch_kernel.cpp.

◆ _getDumpVersion()

virtual int bitpit::PatchKernel::_getDumpVersion ( ) const
protectedpure virtual

◆ _getMaxHaloSize()

std::size_t bitpit::PatchKernel::_getMaxHaloSize ( )
protectedvirtual

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 in bitpit::VolOctree, and bitpit::VolUnstructured.

Definition at line 327 of file patch_kernel_parallel.cpp.

◆ _markCellForCoarsening()

bool bitpit::PatchKernel::_markCellForCoarsening ( long id)
protectedvirtual

Marks a cell for coarsening.

Default implementation is a no-op function.

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

Reimplemented in bitpit::VolOctree.

Definition at line 5279 of file patch_kernel.cpp.

◆ _markCellForRefinement()

bool bitpit::PatchKernel::_markCellForRefinement ( long id)
protectedvirtual

Marks a cell for refinement.

Default implementation is a no-op function.

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

Reimplemented in bitpit::VolOctree.

Definition at line 5264 of file patch_kernel.cpp.

◆ _partitioningAlter()

std::vector< adaption::Info > bitpit::PatchKernel::_partitioningAlter ( bool trackPartitioning)
protectedvirtual

Alter the patch performing the partitioning.

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 partitioning, otherwise an empty vector will be returned.

Reimplemented in bitpit::VolOctree.

Definition at line 2076 of file patch_kernel_parallel.cpp.

◆ _partitioningCleanup()

void bitpit::PatchKernel::_partitioningCleanup ( )
protectedvirtual

Cleanup patch data structured after the partitioning.

Default implementation is a no-op function.

Reimplemented in bitpit::VolOctree.

Definition at line 3744 of file patch_kernel_parallel.cpp.

◆ _partitioningPrepare() [1/2]

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

Prepares the patch for performing the partitioning.

Default implementation is a no-op function and can only be used if the patch is empty or if the patch is not distributed and a single partition is requested.

Parameters
cellWeightsare the weights of the cells, the weight represents the relative computational cost associated with 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 in bitpit::VolOctree.

Definition at line 1834 of file patch_kernel_parallel.cpp.

◆ _partitioningPrepare() [2/2]

std::vector< adaption::Info > bitpit::PatchKernel::_partitioningPrepare ( const std::unordered_map< long, int > & cellRanks,
bool trackPartitioning )
protectedvirtual

Partitions the patch among the processes. Each cell will be assigned to a specific process according to the specified input.

Parameters
cellRanksare the ranks of the cells after the partitioning
trackPartitioningif set to true, the changes to the patch will be tracked
Returns
Returns a vector of adaption::Info that can be used to track the changes done during the partitioning.

Definition at line 1951 of file patch_kernel_parallel.cpp.

◆ _resetAdjacencies()

void bitpit::PatchKernel::_resetAdjacencies ( bool release)
protectedvirtual

Internal function to reset the adjacencies.

This function doesn't change the alteration flags.

Parameters
releaseif it's true the memory hold by the adjacencies will be released, otherwise the adjacencies will be reset but their memory will not be relased

Definition at line 5991 of file patch_kernel.cpp.

◆ _resetCellAdaptionMarker()

bool bitpit::PatchKernel::_resetCellAdaptionMarker ( long id)
protectedvirtual

Resets the adaption marker of the specified cell.

Default implementation is a no-op function.

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

Reimplemented in bitpit::VolOctree.

Definition at line 5294 of file patch_kernel.cpp.

◆ _resetInterfaces()

void bitpit::PatchKernel::_resetInterfaces ( bool release)
protectedvirtual

Internal function to reset the interfaces of the patch.

This function doesn't change the alteration flags.

Parameters
releaseif it's true the memory hold by the interfaces will be released, otherwise the interfaces will be reset but their memory will not be relased

Definition at line 1076 of file patch_kernel.cpp.

◆ _resetTol()

void bitpit::PatchKernel::_resetTol ( )
protectedvirtual

Internal function to reset the tolerance for the geometrical checks.

If a derived patch re-implements this function, it's up to the derived patch to initialize the tolerance of the newly created patches. Since the tolerance is initialized in the constructor, PatchKernel can only reset the tolerance using its base method. Derived classes need to explicitly initialize the tolerance calling the method they have re-implemented.

Reimplemented in bitpit::VolOctree.

Definition at line 7645 of file patch_kernel.cpp.

◆ _restore()

virtual void bitpit::PatchKernel::_restore ( std::istream & stream)
protectedpure virtual

◆ _setHaloSize()

void bitpit::PatchKernel::_setHaloSize ( std::size_t haloSize)
protectedvirtual

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 in bitpit::VolOctree.

Definition at line 339 of file patch_kernel_parallel.cpp.

◆ _setTol()

void bitpit::PatchKernel::_setTol ( double tolerance)
protectedvirtual

Internal function to set the tolerance for the geometrical checks.

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

Reimplemented in bitpit::VolOctree.

Definition at line 7611 of file patch_kernel.cpp.

◆ _spawn()

std::vector< adaption::Info > bitpit::PatchKernel::_spawn ( bool trackSpawn)
protectedvirtual

Generates the patch.

Default implementation is a no-op function.

Parameters
trackSpawnif set to true the changes to the patch will be tracked
Returns
Returns a vector of adaption::Info that can be used to track the changes done during the spawn.

Reimplemented in bitpit::VolCartesian, and bitpit::VolOctree.

Definition at line 5200 of file patch_kernel.cpp.

◆ _updateAdjacencies()

void bitpit::PatchKernel::_updateAdjacencies ( )
protectedvirtual

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.

This implementation can NOT handle hanging nodes.

Reimplemented in bitpit::VolCartesian, and bitpit::VolOctree.

Definition at line 6049 of file patch_kernel.cpp.

◆ _updateInterfaces()

void bitpit::PatchKernel::_updateInterfaces ( )
protectedvirtual

Internal function to update the interfaces of the patch.

The function will process the cells whose interfaces have been marked as dirty.

Reimplemented in bitpit::VolCartesian.

Definition at line 6541 of file patch_kernel.cpp.

◆ _writeFinalize()

void bitpit::PatchKernel::_writeFinalize ( )
protectedvirtual

Internal function to be called after writing the patch.

Definition at line 1297 of file patch_kernel.cpp.

◆ _writePrepare()

void bitpit::PatchKernel::_writePrepare ( )
protectedvirtual

Internal function to be called before writing the patch.

Definition at line 1223 of file patch_kernel.cpp.

◆ adaption()

std::vector< adaption::Info > bitpit::PatchKernel::adaption ( bool trackAdaption = true,
bool squeezeStorage = false )

Execute patch adaption.

Parameters
trackAdaptionif set to true the changes to the patch will be tracked
squeezeStorageif set to true patch data structures will be squeezed after the update
Returns
Returns a vector of adaption::Info that can be used to track the changes done during the update.

Definition at line 718 of file patch_kernel.cpp.

◆ adaptionAlter()

std::vector< adaption::Info > bitpit::PatchKernel::adaptionAlter ( bool trackAdaption = true,
bool squeezeStorage = false )

Alter the patch performing the adaption.

The actual modification of the patch takes place during this phase. After this phase the adaption is completed and the patch is in its final state. Optionally the patch can track the changes performed to the patch.

Parameters
trackAdaptionif set to true the function will return the changes done to the patch during the adaption
squeezeStorageif set to true patch data structures will be squeezed after 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.
Examples
POD_example_00002.cpp.

Definition at line 788 of file patch_kernel.cpp.

◆ adaptionCleanup()

void bitpit::PatchKernel::adaptionCleanup ( )

Cleanup patch data structured after the adaption.

The patch will only clean-up the data structures needed for adaption.

Examples
POD_example_00002.cpp.

Definition at line 817 of file patch_kernel.cpp.

◆ adaptionPrepare()

std::vector< adaption::Info > bitpit::PatchKernel::adaptionPrepare ( bool trackAdaption = true)

Prepares the patch for performing the adaption.

The patch will prepare its data structured for the adaption and optionally track the changes that will be performed to the patch. During this phase no changes will be performed to the patch.

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.
Examples
POD_example_00002.cpp.

Definition at line 752 of file patch_kernel.cpp.

◆ addCell() [1/15]

PatchKernel::CellIterator bitpit::PatchKernel::addCell ( Cell && source,
int owner,
int haloLayer,
long id = Element::NULL_ID )

Adds the specified cell to the patch.

If valid, the specified id will we assigned to the newly created cell, otherwise a new unique id will be generated for the cell. However, it is not possible to create a new cell with an id already assigned to an existing cell of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
sourceis the cell that will be added
owneris the rank that owns the cell that will be added
haloLayeris the halo layer the cell belongs to, this argument is only relevant if the cell is a ghost
idis the id that will be assigned to the newly created cell. If a negative id value is specified, the id of the source will be used
Returns
An iterator pointing to the added cell.

Definition at line 908 of file patch_kernel_parallel.cpp.

◆ addCell() [2/15]

PatchKernel::CellIterator bitpit::PatchKernel::addCell ( Cell && source,
int owner,
long id = Element::NULL_ID )

Adds the specified cell to the patch.

If valid, the specified id will we assigned to the newly created cell, otherwise a new unique id will be generated for the cell. However, it is not possible to create a new cell with an id already assigned to an existing cell of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
sourceis the cell that will be added
owneris the rank that owns the cell that will be added
idis the id that will be assigned to the newly created cell. If a negative id value is specified, the id of the source will be used
Returns
An iterator pointing to the added cell.

Definition at line 792 of file patch_kernel_parallel.cpp.

◆ addCell() [3/15]

PatchKernel::CellIterator bitpit::PatchKernel::addCell ( Cell && source,
long id = Element::NULL_ID )

Adds the specified cell to the patch.

If valid, the specified id will we assigned to the newly created cell, otherwise a new unique id will be generated for the cell. However, it is not possible to create a new cell with an id already assigned to an existing cell of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
sourceis the cell that will be added
idis the id that will be assigned to the newly created cell. If a negative id value is specified, the id of the source will be used
Returns
An iterator pointing to the added cell.

Definition at line 2813 of file patch_kernel.cpp.

◆ addCell() [4/15]

PatchKernel::CellIterator bitpit::PatchKernel::addCell ( const Cell & source,
int owner,
int haloLayer,
long id = Element::NULL_ID )

Adds the specified cell to the patch.

If valid, the specified id will we assigned to the newly created cell, otherwise a new unique id will be generated for the cell. However, it is not possible to create a new cell with an id already assigned to an existing cell of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
sourceis the cell that will be added
owneris the rank that owns the cell that will be added
haloLayeris the halo layer the cell belongs to, this argument is only relevant if the cell is a ghost
idis the id that will be assigned to the newly created cell. If a negative id value is specified, a new unique id will be generated for the cell
Returns
An iterator pointing to the added cell.

Definition at line 883 of file patch_kernel_parallel.cpp.

◆ addCell() [5/15]

PatchKernel::CellIterator bitpit::PatchKernel::addCell ( const Cell & source,
int owner,
long id = Element::NULL_ID )

Adds the specified cell to the patch.

If valid, the specified id will we assigned to the newly created cell, otherwise a new unique id will be generated for the cell. However, it is not possible to create a new cell with an id already assigned to an existing cell of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
sourceis the cell that will be added
owneris the rank that owns the cell that will be added
idis the id that will be assigned to the newly created cell. If a negative id value is specified, a new unique id will be generated for the cell
Returns
An iterator pointing to the added cell.

Definition at line 772 of file patch_kernel_parallel.cpp.

◆ addCell() [6/15]

PatchKernel::CellIterator bitpit::PatchKernel::addCell ( const Cell & source,
long id = Element::NULL_ID )

Adds the specified cell to the patch.

If valid, the specified id will we assigned to the newly created cell, otherwise a new unique id will be generated for the cell. However, it is not possible to create a new cell with an id already assigned to an existing cell of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
sourceis the cell that will be added
idis the id that will be assigned to the newly created cell. If a negative id value is specified, a new unique id will be generated for the cell
Returns
An iterator pointing to the added cell.

Definition at line 2791 of file patch_kernel.cpp.

◆ addCell() [7/15]

PatchKernel::CellIterator bitpit::PatchKernel::addCell ( ElementType type,
const std::vector< long > & connectivity,
int owner,
int haloLayer,
long id = Element::NULL_ID )

Adds a new cell with the specified id, type, and connectivity.

If valid, the specified id will we assigned to the newly created cell, otherwise a new unique id will be generated for the cell. However, it is not possible to create a new cell with an id already assigned to an existing cell of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
typeis the type of the cell
connectivityis the connectivity of the cell
owneris the rank that owns the cell that will be added
haloLayeris the halo layer the cell belongs to, this argument is only relevant if the cell is a ghost
idis the id that will be assigned to the newly created cell. If a negative id value is specified, a new unique id will be generated for the cell
Returns
An iterator pointing to the added cell.

Definition at line 980 of file patch_kernel_parallel.cpp.

◆ addCell() [8/15]

PatchKernel::CellIterator bitpit::PatchKernel::addCell ( ElementType type,
const std::vector< long > & connectivity,
int owner,
long id = Element::NULL_ID )

Adds a new cell with the specified id, type, and connectivity.

If valid, the specified id will we assigned to the newly created cell, otherwise a new unique id will be generated for the cell. However, it is not possible to create a new cell with an id already assigned to an existing cell of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
typeis the type of the cell
connectivityis the connectivity of the cell
owneris the rank that owns the cell that will be added
idis the id that will be assigned to the newly created cell. If a negative id value is specified, a new unique id will be generated for the cell
Returns
An iterator pointing to the added cell.

Definition at line 835 of file patch_kernel_parallel.cpp.

◆ addCell() [9/15]

PatchKernel::CellIterator bitpit::PatchKernel::addCell ( ElementType type,
const std::vector< long > & connectivity,
long id = Element::NULL_ID )

Adds a new cell with the specified id, type, and connectivity.

If valid, the specified id will we assigned to the newly created cell, otherwise a new unique id will be generated for the cell. However, it is not possible to create a new cell with an id already assigned to an existing cell of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
typeis the type of the cell
connectivityis the connectivity of the cell
idis the id that will be assigned to the newly created cell. If a negative id value is specified, a new unique id will be generated for the cell
Returns
An iterator pointing to the added cell.

Definition at line 2884 of file patch_kernel.cpp.

◆ addCell() [10/15]

PatchKernel::CellIterator bitpit::PatchKernel::addCell ( ElementType type,
int owner,
int haloLayer,
long id = Element::NULL_ID )

Adds a new cell with the specified id and type.

If valid, the specified id will we assigned to the newly created cell, otherwise a new unique id will be generated for the cell. However, it is not possible to create a new cell with an id already assigned to an existing cell of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
typeis the type of the cell
owneris the rank that owns the cell that will be added
haloLayeris the halo layer the cell belongs to, this argument is only relevant if the cell is a ghost
idis the id that will be assigned to the newly created cell. If a negative id value is specified, a new unique id will be generated for the cell
Returns
An iterator pointing to the added cell.

Definition at line 948 of file patch_kernel_parallel.cpp.

◆ addCell() [11/15]

PatchKernel::CellIterator bitpit::PatchKernel::addCell ( ElementType type,
int owner,
long id = Element::NULL_ID )

Adds a new cell with the specified id and type.

If valid, the specified id will we assigned to the newly created cell, otherwise a new unique id will be generated for the cell. However, it is not possible to create a new cell with an id already assigned to an existing cell of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
typeis the type of the cell
owneris the rank that owns the cell that will be added
idis the id that will be assigned to the newly created cell. If a negative id value is specified, a new unique id will be generated for the cell
Returns
An iterator pointing to the added cell.

Definition at line 813 of file patch_kernel_parallel.cpp.

◆ addCell() [12/15]

PatchKernel::CellIterator bitpit::PatchKernel::addCell ( ElementType type,
long id = Element::NULL_ID )

Adds a new cell with the specified id and type.

If valid, the specified id will we assigned to the newly created cell, otherwise a new unique id will be generated for the cell. However, it is not possible to create a new cell with an id already assigned to an existing cell of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
typeis the type of the cell
idis the id that will be assigned to the newly created cell. If a negative id value is specified, a new unique id will be generated for the cell
Returns
An iterator pointing to the added cell.

Definition at line 2855 of file patch_kernel.cpp.

◆ addCell() [13/15]

PatchKernel::CellIterator bitpit::PatchKernel::addCell ( ElementType type,
std::unique_ptr< long[]> && connectStorage,
int owner,
int haloLayer,
long id = Element::NULL_ID )

Adds a new cell with the specified id, type, and connectivity.

If valid, the specified id will we assigned to the newly created cell, otherwise a new unique id will be generated for the cell. However, it is not possible to create a new cell with an id already assigned to an existing cell of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
typeis the type of the cell
connectStorageis the storage the contains or will contain the connectivity of the element
owneris the rank that owns the cell that will be added
haloLayeris the halo layer the cell belongs to, this argument is only relevant if the cell is a ghost
idis the id that will be assigned to the newly created cell. If a negative id value is specified, a new unique id will be generated for the cell
Returns
An iterator pointing to the added cell.

Definition at line 1010 of file patch_kernel_parallel.cpp.

◆ addCell() [14/15]

PatchKernel::CellIterator bitpit::PatchKernel::addCell ( ElementType type,
std::unique_ptr< long[]> && connectStorage,
int owner,
long id = Element::NULL_ID )

Adds a new cell with the specified id, type, and connectivity.

If valid, the specified id will we assigned to the newly created cell, otherwise a new unique id will be generated for the cell. However, it is not possible to create a new cell with an id already assigned to an existing cell of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
typeis the type of the cell
connectStorageis the storage the contains or will contain the connectivity of the element
owneris the rank that owns the cell that will be added
idis the id that will be assigned to the newly created cell. If a negative id value is specified, a new unique id will be generated for the cell
Returns
An iterator pointing to the added cell.

Definition at line 859 of file patch_kernel_parallel.cpp.

◆ addCell() [15/15]

PatchKernel::CellIterator bitpit::PatchKernel::addCell ( ElementType type,
std::unique_ptr< long[]> && connectStorage,
long id = Element::NULL_ID )

Adds a new cell with the specified id, type, and connectivity.

If valid, the specified id will we assigned to the newly created cell, otherwise a new unique id will be generated for the cell. However, it is not possible to create a new cell with an id already assigned to an existing cell of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
typeis the type of the cell
connectStorageis the storage the contains or will contain the connectivity of the element
idis the id that will be assigned to the newly created cell. If a negative id value is specified, a new unique id will be generated for the cell
Returns
An iterator pointing to the added cell.

Definition at line 2911 of file patch_kernel.cpp.

◆ addInterface() [1/5]

PatchKernel::InterfaceIterator bitpit::PatchKernel::addInterface ( const Interface & source,
long id = Element::NULL_ID )

Adds the specified interface to the patch.

If valid, the specified id will we assigned to the newly created interface, otherwise a new unique id will be generated for the interface. However, it is not possible to create a new interface with an id already assigned to an existing interface of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
sourceis the interface that will be added
idis the id that will be assigned to the newly created interface. If a negative id value is specified, a new unique id will be generated for the interface
Returns
An iterator pointing to the added interface.

Definition at line 4406 of file patch_kernel.cpp.

◆ addInterface() [2/5]

PatchKernel::InterfaceIterator bitpit::PatchKernel::addInterface ( ElementType type,
const std::vector< long > & connectivity,
long id = Element::NULL_ID )

Adds a new interface with the specified id.

If valid, the specified id will we assigned to the newly created interface, otherwise a new unique id will be generated for the interface. However, it is not possible to create a new interface with an id already assigned to an existing interface of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
typeis the type of the interface
connectivityis the connectivity of the interface
idis the id of the new interface. If a negative id value is specified, ad new unique id will be generated
Returns
An iterator pointing to the added interface.

Definition at line 4496 of file patch_kernel.cpp.

◆ addInterface() [3/5]

PatchKernel::InterfaceIterator bitpit::PatchKernel::addInterface ( ElementType type,
long id = Element::NULL_ID )

Adds a new interface with the specified id.

If valid, the specified id will we assigned to the newly created interface, otherwise a new unique id will be generated for the interface. However, it is not possible to create a new interface with an id already assigned to an existing interface of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
typeis the type of the interface
idis the id that will be assigned to the newly created interface. If a negative id value is specified, a new unique id will be generated for the interface
Returns
An iterator pointing to the added interface.

Definition at line 4473 of file patch_kernel.cpp.

◆ addInterface() [4/5]

PatchKernel::InterfaceIterator bitpit::PatchKernel::addInterface ( ElementType type,
std::unique_ptr< long[]> && connectStorage,
long id = Element::NULL_ID )

Adds a new interface with the specified id.

If valid, the specified id will we assigned to the newly created interface, otherwise a new unique id will be generated for the interface. However, it is not possible to create a new interface with an id already assigned to an existing interface of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
typeis the type of the interface
connectStorageis the storage the contains or will contain the connectivity of the element
idis the id of the new cell. If a negative id value is specified, ad new unique id will be generated
Returns
An iterator pointing to the added interface.

Definition at line 4523 of file patch_kernel.cpp.

◆ addInterface() [5/5]

PatchKernel::InterfaceIterator bitpit::PatchKernel::addInterface ( Interface && source,
long id = Element::NULL_ID )

Adds the specified interface to the patch.

If valid, the specified id will we assigned to the newly created interface, otherwise a new unique id will be generated for the interface. However, it is not possible to create a new interface with an id already assigned to an existing interface of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
sourceis the interface that will be added
idis the id that will be assigned to the newly created interface. If a negative id value is specified, the id of the source will be used
Returns
An iterator pointing to the added interface.

Definition at line 4429 of file patch_kernel.cpp.

◆ addPointToBoundingBox()

void bitpit::PatchKernel::addPointToBoundingBox ( const std::array< double, 3 > & point)
protected

Update the bounding adding the specified point.

The bounding box is not updated if it's set as frozen, or if it's in a dirty state.

Parameters
pointis the a new point that will be added to the bounding box

Definition at line 7253 of file patch_kernel.cpp.

◆ addVertex() [1/3]

PatchKernel::VertexIterator bitpit::PatchKernel::addVertex ( const std::array< double, 3 > & coords,
long id = Vertex::NULL_ID )

Adds a new vertex with the specified coordinates.

All new vertices will be temporarily added as internal vertices, is needed they will be converted to ghost vertices when updating ghost information.

If valid, the specified id will we assigned to the newly created vertex, otherwise a new unique id will be generated for the vertex. However, it is not possible to create a new vertex with an id already assigned to an existing vertex of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
coordsare the coordinates of the vertex
idis the id that will be assigned to the newly created vertex. If a negative id value is specified, a new unique id will be generated for the vertex
Returns
An iterator pointing to the added vertex.

Definition at line 1928 of file patch_kernel.cpp.

◆ addVertex() [2/3]

PatchKernel::VertexIterator bitpit::PatchKernel::addVertex ( const Vertex & source,
long id = Vertex::NULL_ID )

Adds the specified vertex to the patch.

All new vertices will be temporarily added as internal vertices, is needed they will be converted to ghost vertices when updating ghost information.

If valid, the specified id will we assigned to the newly created vertex, otherwise a new unique id will be generated for the vertex. However, it is not possible to create a new vertex with an id already assigned to an existing vertex of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
sourceis the vertex that will be added
idis the id that will be assigned to the newly created vertex. If a negative id value is specified, a new unique id will be generated for the vertex
Returns
An iterator pointing to the added vertex.

Definition at line 1854 of file patch_kernel.cpp.

◆ addVertex() [3/3]

PatchKernel::VertexIterator bitpit::PatchKernel::addVertex ( Vertex && source,
long id = Vertex::NULL_ID )

Adds the specified vertex to the patch.

All new vertices will be temporarily added as internal vertices, is needed they will be converted to ghost vertices when updating ghost information.

If valid, the specified id will we assigned to the newly created vertex, otherwise a new unique id will be generated for the vertex. However, it is not possible to create a new vertex with an id already assigned to an existing vertex of the patch. If this happens, an exception is thrown. Ids are considered valid if they are greater or equal than zero.

Parameters
sourceis the vertex that will be added
idis the id that will be assigned to the newly created vertex. If a negative id value is specified, the id of the source will be used
Returns
An iterator pointing to the added vertex.

Definition at line 1879 of file patch_kernel.cpp.

◆ areAdjacenciesDirty()

bool bitpit::PatchKernel::areAdjacenciesDirty ( bool global = false) const

Checks if the adjacencies are dirty.

Parameters
globalif set to true, the dirty status will be evaluated globally across all the partitions
Returns
Returns true if the adjacencies are dirty, false otherwise.

Definition at line 5832 of file patch_kernel.cpp.

◆ areInterfacesDirty()

bool bitpit::PatchKernel::areInterfacesDirty ( bool global = false) const

Checks if the interfaces are dirty.

Parameters
globalif set to true, the dirty status will be evaluated globally across all the partitions
Returns
Returns true if the interfaces are dirty, false otherwise.

Definition at line 6323 of file patch_kernel.cpp.

◆ arePartitioningInfoDirty()

bool bitpit::PatchKernel::arePartitioningInfoDirty ( bool global = true) const

Checks if the partitioning information are dirty.

Parameters
globalif set to true, the dirty status will be evaluated globally across all the partitions
Returns
Returns true if the partitioning information are dirty, false otherwise.

Definition at line 4265 of file patch_kernel_parallel.cpp.

◆ binGroupVertices() [1/2]

std::unordered_map< long, std::vector< long > > bitpit::PatchKernel::binGroupVertices ( const PiercedVector< Vertex > & vertices,
int nBins )
protected

Group specified vertices on regular bins.

Parameters
[in]verticesare the vertices to be sorted
[in]nBinsis the number of bins (on each space direction)
Returns
Returns the vertices grouped into bins.

Definition at line 7390 of file patch_kernel.cpp.

◆ binGroupVertices() [2/2]

std::unordered_map< long, std::vector< long > > bitpit::PatchKernel::binGroupVertices ( int nBins)
protected

Group vertices on regular bins.

Parameters
[in]nBinsis the number of bins (on each space direction)
Returns
Returns the vertices grouped into bins.

Definition at line 7378 of file patch_kernel.cpp.

◆ buildAdjacencies()

void bitpit::PatchKernel::buildAdjacencies ( )

Fill adjacencies info for each cell.

If adjacencies are already built, all adjacencies will be deleted and they will be re-generated from scratch.

Definition at line 5865 of file patch_kernel.cpp.

◆ buildInterfaces()

void bitpit::PatchKernel::buildInterfaces ( )

Build interfaces among the cells.

If interfaces are already built, all interfaces will be deleted and they will be re-generated from scratch.

Definition at line 6358 of file patch_kernel.cpp.

◆ cellBegin()

PatchKernel::CellIterator bitpit::PatchKernel::cellBegin ( )

Returns iterator pointing to the first cell.

Returns
An iterator to the first cell.

Definition at line 2641 of file patch_kernel.cpp.

◆ cellConstBegin()

PatchKernel::CellConstIterator bitpit::PatchKernel::cellConstBegin ( ) const

Returns a constant iterator pointing to the first cell.

Returns
A constant iterator to the first cell.

Definition at line 2715 of file patch_kernel.cpp.

◆ cellConstEnd()

PatchKernel::CellConstIterator bitpit::PatchKernel::cellConstEnd ( ) const

Returns a constant iterator pointing to last cell.

Returns
A constant iterator to the last cell.

Definition at line 2725 of file patch_kernel.cpp.

◆ cellEnd()

PatchKernel::CellIterator bitpit::PatchKernel::cellEnd ( )

Returns iterator pointing to last cell.

Returns
An iterator to the last cell.

Definition at line 2651 of file patch_kernel.cpp.

◆ clearBoundingBox()

void bitpit::PatchKernel::clearBoundingBox ( )
protected

Clears the bounding box.

The box will be cleared also if it declared frozen.

Definition at line 7095 of file patch_kernel.cpp.

◆ clone() [1/2]

virtual std::unique_ptr< PatchKernel > bitpit::PatchKernel::clone ( ) const
pure virtual

◆ clone() [2/2]

template<typename patch_t >
std::unique_ptr< patch_t > bitpit::PatchKernel::clone ( const patch_t * original)
static

Creates a clone of the specified pach.

Parameters
originalis the patch that will be cloned
Returns
A clone of the pach.

Definition at line 39 of file patch_kernel.tpp.

◆ collapseCoincidentVertices()

std::vector< long > bitpit::PatchKernel::collapseCoincidentVertices ( )

Find and collapse coincident vertices. Cell connectivity is automatically updated.

Returns
The list of the of the collapsed vertices.

Definition at line 2237 of file patch_kernel.cpp.

◆ consecutiveItemRenumbering()

template<typename item_t , typename id_t >
std::unordered_map< id_t, id_t > bitpit::PatchKernel::consecutiveItemRenumbering ( PiercedVector< item_t, id_t > & container,
long offset )
protected

Renumber the ids of the items in the specified container.

Parameters
containeris the container
offsetis the offset that will be used

Definition at line 199 of file patch_kernel.tpp.

◆ consecutiveRenumber()

void bitpit::PatchKernel::consecutiveRenumber ( long vertexOffset,
long cellOffset,
long interfaceOffset )

Renumbering vertices, cells and interfaces consecutively, starting from given offsets.

Parameters
[in]vertexOffsetis the starting id of the vertices
[in]cellOffsetis the starting id of the cells
[in]interfaceOffsetis the starting id of the interfaces

Definition at line 8190 of file patch_kernel.cpp.

◆ consecutiveRenumberCells()

void bitpit::PatchKernel::consecutiveRenumberCells ( long offset = 0)

Renumbers cells consecutively, starting from a given offset.

Parameters
[in]offsetis the starting id

Definition at line 8104 of file patch_kernel.cpp.

◆ consecutiveRenumberInterfaces()

void bitpit::PatchKernel::consecutiveRenumberInterfaces ( long offset = 0)

Renumbers interfaces consecutively, starting from a given offset.

Parameters
[in]offsetis the starting id

Definition at line 8161 of file patch_kernel.cpp.

◆ consecutiveRenumberVertices()

void bitpit::PatchKernel::consecutiveRenumberVertices ( long offset = 0)

Renumbers vertices consecutively, starting from a given offset.

Parameters
[in]offsetis the starting id

Definition at line 8078 of file patch_kernel.cpp.

◆ countBorderCells()

long bitpit::PatchKernel::countBorderCells ( ) const

Counts border cells within the patch.

A cell is border if contains at least one border face.

Returns
The number of border cells.

Definition at line 3213 of file patch_kernel.cpp.

◆ countBorderFaces()

long bitpit::PatchKernel::countBorderFaces ( ) const

Counts border faces within the patch.

A face is border if a cell has no adjacent along that faces.

Returns
The number of border faces.

Definition at line 4871 of file patch_kernel.cpp.

◆ countBorderInterfaces()

long bitpit::PatchKernel::countBorderInterfaces ( ) const

Counts border interfaces within the patch.

An interface is border if belongs to just one cell.

Returns
The number of border interfaces.

Definition at line 4729 of file patch_kernel.cpp.

◆ countBorderVertices()

long bitpit::PatchKernel::countBorderVertices ( ) const

Counts border vertices within the patch.

A border vertex is a vertex on a border face.

Returns
The number of border vertices.

Definition at line 2125 of file patch_kernel.cpp.

◆ countDuplicateCells()

long bitpit::PatchKernel::countDuplicateCells ( ) const

Finds duplicate cells within the patch.

A cell is a duplicate if there is at least one other cell with exactly the same vertices.

Returns
The number of duplicate cells.

Definition at line 3293 of file patch_kernel.cpp.

◆ countFaces()

long bitpit::PatchKernel::countFaces ( ) const

Count faces within the patch.

Returns
The total number of faces in the patch.

Definition at line 4835 of file patch_kernel.cpp.

◆ countFreeCells()

long bitpit::PatchKernel::countFreeCells ( ) const

Counts free cells within the patch.

A cell is free if contains at least one free face.

Returns
The number of free cells.

Definition at line 3201 of file patch_kernel.cpp.

◆ countFreeFaces()

long bitpit::PatchKernel::countFreeFaces ( ) const

Counts free faces within the patch.

A face is free if a cell has no adjacent along that faces.

Returns
The number of free faces.

Definition at line 4859 of file patch_kernel.cpp.

◆ countFreeInterfaces()

long bitpit::PatchKernel::countFreeInterfaces ( ) const

Counts free interfaces within the patch.

An interface is free if belongs to just one cell.

Returns
The number of free interfaces.

Definition at line 4717 of file patch_kernel.cpp.

◆ countFreeVertices()

long bitpit::PatchKernel::countFreeVertices ( ) const

Counts free vertices within the patch.

A free vertex is a vertex on a free face.

Returns
The number of free vertices.

Definition at line 2113 of file patch_kernel.cpp.

◆ countOrphanCells()

long bitpit::PatchKernel::countOrphanCells ( ) const

Counts orphan cells within the patch.

A cell is orphan if not adjacent to any cell in the patch (neither along an edge, nor at vertex)

Returns
The number of orphan cells.

Definition at line 3237 of file patch_kernel.cpp.

◆ countOrphanInterfaces()

long bitpit::PatchKernel::countOrphanInterfaces ( ) const

Counts orphan interfaces within the patch.

An interface is considered orphan if it has no owner nor neighbour or if it's on a border face of a ghost cell.

Returns
The number of orphan interfaces.

Definition at line 4749 of file patch_kernel.cpp.

◆ countOrphanVertices()

long bitpit::PatchKernel::countOrphanVertices ( ) const

Count orphan vertices in the patch.

An orphan vertex is a vertex not linked by any cells.

Returns
The number of orphan vertices.

Definition at line 2153 of file patch_kernel.cpp.

◆ deleteCell()

bool bitpit::PatchKernel::deleteCell ( long id)

Deletes a cell.

Parameters
idis the id of the cell

Definition at line 3106 of file patch_kernel.cpp.

◆ deleteCells()

template<typename IdStorage >
bool bitpit::PatchKernel::deleteCells ( const IdStorage & ids)

Deletes a list of cells.

Parameters
idsare the ids of the cells to be deleted

Definition at line 54 of file patch_kernel.tpp.

◆ deleteCoincidentVertices()

bool bitpit::PatchKernel::deleteCoincidentVertices ( )

Remove coincident vertices from the patch.

Definition at line 2327 of file patch_kernel.cpp.

◆ deleteInterface()

bool bitpit::PatchKernel::deleteInterface ( long id)

Deletes an interface.

Parameters
idis the id of the interface

Definition at line 4668 of file patch_kernel.cpp.

◆ deleteInterfaces()

template<typename IdStorage >
bool bitpit::PatchKernel::deleteInterfaces ( const IdStorage & ids)

Deletes a list of interfaces.

Parameters
idsare the ids of the interfaces to be deleted

Definition at line 156 of file patch_kernel.tpp.

◆ deleteOrphanInterfaces()

bool bitpit::PatchKernel::deleteOrphanInterfaces ( )

Remove orphan interfaces

Definition at line 4788 of file patch_kernel.cpp.

◆ deleteOrphanVertices()

bool bitpit::PatchKernel::deleteOrphanVertices ( )

Remove orphan vertices

Definition at line 2218 of file patch_kernel.cpp.

◆ deleteVertex()

bool bitpit::PatchKernel::deleteVertex ( long id)
protected

Deletes a vertex.

Parameters
idis the id of the vertex

Definition at line 2060 of file patch_kernel.cpp.

◆ deleteVertices()

template<typename IdStorage >
bool bitpit::PatchKernel::deleteVertices ( const IdStorage & ids)
protected

Deletes a list of vertices.

Parameters
idsare the ids of the vertices to be deleted

Definition at line 105 of file patch_kernel.tpp.

◆ destroyAdjacencies()

void bitpit::PatchKernel::destroyAdjacencies ( )

Destroy the adjacencies.

After deleting the adjacencies, this function changes the build strategy to "None".

Definition at line 5945 of file patch_kernel.cpp.

◆ destroyInterfaces()

void bitpit::PatchKernel::destroyInterfaces ( )

Destroy the interfaces.

After deleting the interfaces, this function changes the build strategy to "None".

Definition at line 6458 of file patch_kernel.cpp.

◆ displayCells()

void bitpit::PatchKernel::displayCells ( std::ostream & out,
unsigned int padding = 0 ) const

Display all the cells currently stored within the patch.

Parameters
[in,out]outoutput stream
[in]padding(default = 0) number of leading spaces for formatted output

Definition at line 7779 of file patch_kernel.cpp.

◆ displayInterfaces()

void bitpit::PatchKernel::displayInterfaces ( std::ostream & out,
unsigned int padding = 0 ) const

Display all the interfaces currently stored within the patch.

Parameters
[in,out]outoutput stream
[in]padding(default = 0) number of leading spaces for formatted output

Definition at line 7795 of file patch_kernel.cpp.

◆ displayTopologyStats()

void bitpit::PatchKernel::displayTopologyStats ( std::ostream & out,
unsigned int padding = 0 ) const

Display patch statistics.

Parameters
[in,out]outoutput stream
[in]padding(default = 0) number of leading spaces for formatted output

Definition at line 7726 of file patch_kernel.cpp.

◆ displayVertices()

void bitpit::PatchKernel::displayVertices ( std::ostream & out,
unsigned int padding = 0 ) const

Display all the vertices currently stored within the patch.

Parameters
[in,out]outoutput stream
[in]padding(default = 0) number of leading spaces for formatted output

Definition at line 7763 of file patch_kernel.cpp.

◆ dump() [1/2]

bool bitpit::PatchKernel::dump ( std::ostream & stream)

Write the patch to the specified stream.

Dumping a patch that is not up-to-date is not supported. If the patch is not up-to-date, it will be automatically updated before dump it.

Parameters
streamis the stream to write to
Returns
Return true if the patch was successfully dumped, false otherwise.

Definition at line 8218 of file patch_kernel.cpp.

◆ dump() [2/2]

bool bitpit::PatchKernel::dump ( std::ostream & stream) const

Write the patch to the specified stream.

Dumping a patch that is not up-to-date is not supported. If the patch is not up-to-date and compilation of assertions is enabled, the function will assert, whereas if compilation of assertions is not enabled, the function is a no-op.

Parameters
streamis the stream to write to
Returns
Return true if the patch was successfully dumped, false otherwise.

Definition at line 8239 of file patch_kernel.cpp.

◆ dumpCells()

void bitpit::PatchKernel::dumpCells ( std::ostream & stream) const
protected

Write the cells to the specified stream.

Parameters
streamis the stream to write to

Definition at line 4982 of file patch_kernel.cpp.

◆ dumpInterfaces()

void bitpit::PatchKernel::dumpInterfaces ( std::ostream & stream) const
protected

Write the interfaces to the specified stream.

Parameters
streamis the stream to write to

Definition at line 5103 of file patch_kernel.cpp.

◆ dumpVertices()

void bitpit::PatchKernel::dumpVertices ( std::ostream & stream) const
protected

Write the vertices to the specified stream.

Parameters
streamis the stream to write to

Definition at line 4891 of file patch_kernel.cpp.

◆ empty()

bool bitpit::PatchKernel::empty ( bool global = true) const

Return true if the patch is empty.

Parameters
globalif set to true, the empty status will be evaluated globally across all the partitions
Returns
Return true if the patch is empty.

Definition at line 2386 of file patch_kernel.cpp.

◆ enableCellBalancing()

void bitpit::PatchKernel::enableCellBalancing ( long id,
bool enabled )

Enables cell balancing.

Parameters
idis the id of the cell
enableddefines if enable the balancing for the specified cell

Definition at line 966 of file patch_kernel.cpp.

◆ evalCellBoundingBox()

void bitpit::PatchKernel::evalCellBoundingBox ( long id,
std::array< double, 3 > * minPoint,
std::array< double, 3 > * maxPoint ) const
virtual

Evaluates the bounding box of the specified cell.

Parameters
idis the id of the cell
[out]minPointis the minimum point of the bounding box
[out]maxPointis the maximum point of the bounding box

Reimplemented in bitpit::VolCartesian.

Definition at line 5534 of file patch_kernel.cpp.

◆ evalCellCentroid()

std::array< double, 3 > bitpit::PatchKernel::evalCellCentroid ( long id) const
virtual

Evaluates the centroid of the specified cell.

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

Reimplemented in bitpit::VolCartesian, and bitpit::VolOctree.

Definition at line 5520 of file patch_kernel.cpp.

◆ evalCellSize()

virtual double bitpit::PatchKernel::evalCellSize ( long id) const
pure virtual

◆ evalElementBoundingBox()

void bitpit::PatchKernel::evalElementBoundingBox ( const Element & element,
std::array< double, 3 > * minPoint,
std::array< double, 3 > * maxPoint ) const

Evaluates the bounding box of the specified element.

Parameters
elementis the element
[out]minPointis the minimum point of the bounding box
[out]maxPointis the maximum point of the bounding box

Definition at line 5692 of file patch_kernel.cpp.

◆ evalElementCentroid()

std::array< double, 3 > bitpit::PatchKernel::evalElementCentroid ( const Element & element) const

Evaluates the centroid of the specified element.

Element centroid is computed as the arithmetic average of element vertex coordinates.

Parameters
elementis the element
Returns
The centroid of the specified element.

Definition at line 5675 of file patch_kernel.cpp.

◆ evalInterfaceBoundingBox()

void bitpit::PatchKernel::evalInterfaceBoundingBox ( long id,
std::array< double, 3 > * minPoint,
std::array< double, 3 > * maxPoint ) const
virtual

Evaluates the bounding box of the specified interface.

Parameters
idis the id of the interface
[out]minPointis the minimum point of the bounding box
[out]maxPointis the maximum point of the bounding box

Definition at line 5610 of file patch_kernel.cpp.

◆ evalInterfaceCentroid()

std::array< double, 3 > bitpit::PatchKernel::evalInterfaceCentroid ( long id) const
virtual

Evaluates the centroid of the specified interface.

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

Definition at line 5596 of file patch_kernel.cpp.

◆ evalPartitioningUnbalance() [1/2]

double bitpit::PatchKernel::evalPartitioningUnbalance ( ) const

Evaluate partitioning load unbalance index.

This index measures the performance lost to imbalanced load or, conversely, the performance that could be reclaimed by balancing the load.

Unbalance index is evaluate almost as in Equation 1 of paper "Quantifying the Effectiveness of Load Balance Algorithms", Olga Pearce, Todd Gamblin†, Bronis R. de Supinski†, Martin Schulz†, Nancy M. Amato, Department of Computer Science and Engineering, Texas A&M University, College Station, TX, USA. The difference is that the imbalance factor evaluate by this function is not a percentage, i.e., it is not multiplied by 100.

Returns
Partitioning load unbalance index.

Definition at line 1745 of file patch_kernel_parallel.cpp.

◆ evalPartitioningUnbalance() [2/2]

double bitpit::PatchKernel::evalPartitioningUnbalance ( const std::unordered_map< long, double > & cellWeights) const

Evaluate partitioning load unbalance index.

Parameters
cellWeightsare the weights of the cells, the weight represents the relative computational cost associated with a specified cell. If no weight is specified for a cell, a weight equal to one is used.
Returns
Partitioning load unbalance index.

Definition at line 1760 of file patch_kernel_parallel.cpp.

◆ extractEnvelope()

void bitpit::PatchKernel::extractEnvelope ( PatchKernel & envelope) const
protected

Extracts the external envelope and appends it to the given patch.

The external envelope is composed by all the free faces of the patch.

Parameters
[in,out]envelopeis the patch to which the external envelope will be appended

Definition at line 7671 of file patch_kernel.cpp.

◆ findAdjoinNeighFace()

int bitpit::PatchKernel::findAdjoinNeighFace ( const Cell & cell,
int cellFace,
const Cell & neigh ) const
protectedvirtual

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

Parameters
cellis the cell
cellFaceis the target face of the cell
neighis the 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 in bitpit::VolOctree.

Definition at line 6759 of file patch_kernel.cpp.

◆ findCellEdgeNeighs() [1/4]

void bitpit::PatchKernel::findCellEdgeNeighs ( long id,
bool complete,
std::vector< long > * neighs ) const

Extracts the neighbours of all the edges of the specified cell.

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

Parameters
idis the id of the cell
completecontrols if the list of neighbours should contain only the neighbours that share just the specified edge, or should contain also neighbours that share an entire face
[in,out]neighsis the vector were the neighbours of all the edges of the specified cell will be stored. The vector is not cleared before adding the neighbours, it is extended by appending all the neighbours found by this function

Definition at line 3649 of file patch_kernel.cpp.

◆ findCellEdgeNeighs() [2/4]

std::vector< long > bitpit::PatchKernel::findCellEdgeNeighs ( long id,
bool complete = true ) const

Extracts the neighbours of all the edges of the specified cell.

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

Parameters
idis the id of the cell
completecontrols if the list of neighbours should contain only the neighbours that share just the specified edge, or should contain also neighbours that share an entire face
Returns
The neighbours of all the edges of the specified cell.

Definition at line 3627 of file patch_kernel.cpp.

◆ findCellEdgeNeighs() [3/4]

std::vector< long > bitpit::PatchKernel::findCellEdgeNeighs ( long id,
int edge ) const

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
Returns
The neighbours of the specified cell for the given edge.

Definition at line 3690 of file patch_kernel.cpp.

◆ findCellEdgeNeighs() [4/4]

void bitpit::PatchKernel::findCellEdgeNeighs ( long id,
int edge,
std::vector< long > * neighs ) const

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
[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

Definition at line 3710 of file patch_kernel.cpp.

◆ findCellFaceNeighs() [1/4]

std::vector< long > bitpit::PatchKernel::findCellFaceNeighs ( long id) const

Extracts the neighbours of all the faces of the specified cell.

Parameters
idis the id of the cell
Returns
The neighbours of all the faces of the specified cell.

Definition at line 3487 of file patch_kernel.cpp.

◆ findCellFaceNeighs() [2/4]

std::vector< long > bitpit::PatchKernel::findCellFaceNeighs ( long id,
int face ) const

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

Parameters
idis the id of the cell
faceis a face of the cell
Returns
The neighbours of the specified cell for the given face.

Definition at line 3566 of file patch_kernel.cpp.

◆ findCellFaceNeighs() [3/4]

void bitpit::PatchKernel::findCellFaceNeighs ( long id,
int face,
std::vector< long > * neighs ) const

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

Parameters
idis the id of the cell
faceis a face of the cell
[in,out]neighsis the vector were the neighbours of the specified cell for the given face will be stored. The vector is not cleared before adding the neighbours, it is extended by appending all the neighbours found by this function

Definition at line 3584 of file patch_kernel.cpp.

◆ findCellFaceNeighs() [4/4]

void bitpit::PatchKernel::findCellFaceNeighs ( long id,
std::vector< long > * neighs ) const

Extracts the neighbours of all the faces of the specified cell.

Parameters
idis the id of the cell
[in,out]neighsis the vector were the neighbours of all the faces of the specified cell will be stored. The vector is not cleared before adding the neighbours, it is extended by appending all the neighbours found by this function

Definition at line 3538 of file patch_kernel.cpp.

◆ findCellNeighs() [1/4]

std::vector< long > bitpit::PatchKernel::findCellNeighs ( long id) const

Extracts all the neighbours of the specified cell

Parameters
idis the id of the cell
Returns
All the neighbours of the specified cell.
Examples
POD_example_00002.cpp.

Definition at line 3402 of file patch_kernel.cpp.

◆ findCellNeighs() [2/4]

void bitpit::PatchKernel::findCellNeighs ( long id,
int codimension,
bool complete,
std::vector< long > * neighs ) const

Extracts all the neighbours of the specified cell for the given codimension.

Parameters
idis the id of the cell
codimensionthe codimension for which the neighbours are requested. For a three-dimensional cell a codimension equal 1 will extract the face neighbours, a codimension equal 2 will extract the edge negihbours and a codimension equal 3 will extract the vertex neighbours. For a two-dimensional cell a codimension qual 1 will extract the face neighbours, and a codimension equal 2 will extract the vertex neighbours.
completecontrols if the list of neighbours should contain only the neighbours for the specified codimension, or should contain also the neighbours for lower codimensions.
[in,out]neighsis the vector were the neighbours of the specified cell for the given codimension. The vector is not cleared before dding the neighbours, it is extended by appending all the neighbours found by this function

Definition at line 3468 of file patch_kernel.cpp.

◆ findCellNeighs() [3/4]

std::vector< long > bitpit::PatchKernel::findCellNeighs ( long id,
int codimension,
bool complete = true ) const

Extracts all the neighbours of the specified cell for the given codimension.

Parameters
idis the id of the cell
codimensionthe codimension for which the neighbours are requested. For a three-dimensional cell a codimension equal 1 will extract the face neighbours, a codimension equal 2 will extract the edge negihbours and a codimension equal 3 will extract the vertex neighbours. For a two-dimensional cell a codimension qual 1 will extract the face neighbours, and a codimension equal 2 will extract the vertex neighbours.
completecontrols if the list of neighbours should contain only the neighbours for the specified codimension, or should contain also the neighbours for lower codimensions.
Returns
The neighbours for the specified codimension.

Definition at line 3440 of file patch_kernel.cpp.

◆ findCellNeighs() [4/4]

void bitpit::PatchKernel::findCellNeighs ( long id,
std::vector< long > * neighs ) const

Extracts all the neighbours of the specified cell

Parameters
idis the id of the cell
[in,out]neighsis the vector were the neighbours will be stored. The vector is not cleared before adding the neighbours, it is extended by appending all the neighbours found by this function

Definition at line 3418 of file patch_kernel.cpp.

◆ findCellVertexNeighs() [1/4]

void bitpit::PatchKernel::findCellVertexNeighs ( long id,
bool complete,
std::vector< long > * neighs ) const

Extracts the neighbours of all the vertices of the specified cell.

Parameters
idis the id of the cell
completecontrols if the list of neighbours should contain only the neighbours that share just the specified vertex, or should contain also neighbours that share an entire face or an entire edge
[in,out]neighsis the vector were the neighbours of all the vertices of the specified cell will be stored. The vector is not cleared before adding the neighbours, it is extended by appending all the neighbours found by this function

Definition at line 3805 of file patch_kernel.cpp.

◆ findCellVertexNeighs() [2/4]

std::vector< long > bitpit::PatchKernel::findCellVertexNeighs ( long id,
bool complete = true ) const

Extracts the neighbours of all the vertices of the specified cell.

Parameters
idis the id of the cell
completecontrols if the list of neighbours should contain only the neighbours that share just the specified vertex, or should contain also neighbours that share an entire face or an entire edge
Returns
The neighbours of all the vertices of the specified cell.

Definition at line 3785 of file patch_kernel.cpp.

◆ findCellVertexNeighs() [3/4]

std::vector< long > bitpit::PatchKernel::findCellVertexNeighs ( long id,
int vertex ) const

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

Parameters
idis the id of the cell
vertexis a vertex of the cell
Returns
The neighbours of the specified cell for the given vertex.

Definition at line 3843 of file patch_kernel.cpp.

◆ findCellVertexNeighs() [4/4]

void bitpit::PatchKernel::findCellVertexNeighs ( long id,
int vertex,
std::vector< long > * neighs ) const

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

Parameters
idis the id of the cell
vertexis a vertex of the cell
[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

Definition at line 3861 of file patch_kernel.cpp.

◆ findCellVertexOneRing() [1/2]

std::vector< long > bitpit::PatchKernel::findCellVertexOneRing ( long id,
int vertex ) const

Finds the one-ring of the specified vertex of the cell.

Parameters
idis the id of the cell
vertexis a vertex of the cell
Returns
The one-ring of the specified vertex of the cell.

Definition at line 4014 of file patch_kernel.cpp.

◆ findCellVertexOneRing() [2/2]

void bitpit::PatchKernel::findCellVertexOneRing ( long id,
int vertex,
std::vector< long > * ring ) const

Finds the one-ring of the specified vertex of the cell.

Parameters
idis the id of the cell
vertexis a vertex of the cell
[in,out]ringis the vector were the one-ring of the specified vertex of the cell will be stored. The vector is not cleared before adding the neighbours, it is extended by appending all the neighbours found by this function

Definition at line 4032 of file patch_kernel.cpp.

◆ findDuplicateCells()

std::vector< long > bitpit::PatchKernel::findDuplicateCells ( ) const

Finds duplicate cells within the patch.

A cell is a duplicate if there is at least one other cell with exactly the same vertices.

Returns
The list of duplicate cells.

Definition at line 3306 of file patch_kernel.cpp.

◆ findFaceNeighCell()

bool bitpit::PatchKernel::findFaceNeighCell ( long cellId,
long neighId,
int * cellFace,
int * cellAdjacencyId ) const

Find the face and the adjacency that are shared by the specified cells.

If the two cells don't share a face, the output arguments are set to a negative value.

Parameters
[in]cellIdis the id of the cell
[in]neighIdis the id of the neighbour
[out]cellFaceis the face of the cell that is shared with the neighbour. If the cell doesn't share any face with the neighbour, the argument is set to a negative number
[out]cellAdjacencyIdis the adjacency of the cell that is shared with the neighbour. If the cell doesn't share any adjacency with the neighbour, the argument is set to a negative number
Returns
Return true if the two cells share a face, false otherwise.

Definition at line 4054 of file patch_kernel.cpp.

◆ findOrphanCells()

std::vector< long > bitpit::PatchKernel::findOrphanCells ( ) const

Finds orphan cells within the patch.

A cell is orphan if not adjacent to any cell in the patch (neither along an edge, nor at vertex)

Returns
The number of orphan cells.

Definition at line 3250 of file patch_kernel.cpp.

◆ findOrphanInterfaces()

std::vector< long > bitpit::PatchKernel::findOrphanInterfaces ( ) const

Find orphan interfaces in the patch.

An interface is considered orphan if it has no owner nor neighbour or if it's on a border face of a ghost cell.

Returns
The list of orphan interfaces.

Definition at line 4771 of file patch_kernel.cpp.

◆ findOrphanVertices()

std::vector< long > bitpit::PatchKernel::findOrphanVertices ( )

Find orphan vertices in the patch.

An orphan vertex is a vertex not linked by any cells.

Returns
The list of orphan vertice.

Definition at line 2174 of file patch_kernel.cpp.

◆ findVertexOneRing() [1/2]

std::vector< long > bitpit::PatchKernel::findVertexOneRing ( long vertexId) const

Find the cells that share the specified vertex.

This function doesn't support coincident vertices with different ids.

Parameters
vertexIdis the index of the vertex
Returns
The cells that share the vertex.

Definition at line 4123 of file patch_kernel.cpp.

◆ findVertexOneRing() [2/2]

void bitpit::PatchKernel::findVertexOneRing ( long vertexId,
std::vector< long > * ring ) const

Find the cells that share the specified vertex.

This function doesn't support coincident vertices with different ids.

Parameters
vertexIdis the index of the vertex
[in,out]ringis the vector were the one-ring of the specified 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.

Definition at line 4141 of file patch_kernel.cpp.

◆ flushData()

void bitpit::PatchKernel::flushData ( std::fstream & stream,
const std::string & name,
VTKFormat format )
overridevirtual

Interface for writing data to stream.

Parameters
[in]streamis the stream to write to
[in]nameis the name of the data to be written. Either user data or patch data
[in]formatis the format that will be used for writing data. Only the "appended" format is supported. The "appended" format requires an unformatted binary stream

Implements bitpit::VTKBaseStreamer.

Definition at line 7915 of file patch_kernel.cpp.

◆ getAdaptionStatus()

PatchKernel::AdaptionStatus bitpit::PatchKernel::getAdaptionStatus ( bool global = false) const

Returns the current adaption status.

Parameters
globalif set to true, the adaption status will be evaluated globally across all the partitions
Returns
The current adaption status.

Definition at line 1343 of file patch_kernel.cpp.

◆ getAdjacenciesBuildStrategy()

PatchKernel::AdjacenciesBuildStrategy bitpit::PatchKernel::getAdjacenciesBuildStrategy ( ) const

Returns the current adjacencies build strategy.

Returns
The current adjacencies build strategy.

Definition at line 5810 of file patch_kernel.cpp.

◆ getBoundingBox() [1/2]

void bitpit::PatchKernel::getBoundingBox ( bool global,
std::array< double, 3 > & minPoint,
std::array< double, 3 > & maxPoint ) const

Gets the previously stored patch bounding box.

Parameters
globalif set to true, the bounding box will be evaluated globally across all the partitions
[out]minPointon output stores the minimum point of the patch
[out]maxPointon output stores the maximum point of the patch

Definition at line 7143 of file patch_kernel.cpp.

◆ getBoundingBox() [2/2]

void bitpit::PatchKernel::getBoundingBox ( std::array< double, 3 > & minPoint,
std::array< double, 3 > & maxPoint ) const

Gets the previously stored patch bounding box.

Parameters
[out]minPointon output stores the minimum point of the patch
[out]maxPointon output stores the maximum point of the patch

Definition at line 7130 of file patch_kernel.cpp.

◆ getCell() [1/2]

Cell & bitpit::PatchKernel::getCell ( long id)

Gets a reference to the cell with the specified id.

Parameters
idis the id of the requested cell
Returns
A reference to the cell with the specified id.

Definition at line 2579 of file patch_kernel.cpp.

◆ getCell() [2/2]

const Cell & bitpit::PatchKernel::getCell ( long id) const

Gets a constant reference to the cell with the specified id.

Parameters
idis the id of the requested cell
Returns
A constant reference to the cell with the specified id.

Definition at line 2590 of file patch_kernel.cpp.

◆ getCellAdaptionMarker()

adaption::Marker bitpit::PatchKernel::getCellAdaptionMarker ( long id)

Returns the adaption marker of the specified cell.

The marker only defines the type of adaption requested for the cell, it is not guaranteed that the adaption will effectively perform the requested action (i.e., the requested marker may not be consistent with the internal criteria defined by the patch).

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

Definition at line 955 of file patch_kernel.cpp.

◆ getCellAlterationFlags()

PatchKernel::AlterationFlags bitpit::PatchKernel::getCellAlterationFlags ( long id) const
protected

Get the alteration flags of the specified cell.

Parameters
idis the id of the cell
Returns
The alteration flags of the cell.

Definition at line 6820 of file patch_kernel.cpp.

◆ getCellConstIterator()

PatchKernel::CellConstIterator bitpit::PatchKernel::getCellConstIterator ( long id) const

Returns a constant iterator pointing to the specified cell.

Returns
A constant iterator to the specified cell.

Definition at line 2705 of file patch_kernel.cpp.

◆ getCellCount()

long bitpit::PatchKernel::getCellCount ( ) const
virtual

Gets the number of cells in the patch.

Returns
The number of cells in the patch.

Reimplemented in bitpit::VolCartesian.

Examples
POD_example_00002.cpp.

Definition at line 2528 of file patch_kernel.cpp.

◆ getCellHaloLayer()

int bitpit::PatchKernel::getCellHaloLayer ( long id) const

Gets the halo layer of the specified cell.

Parameters
idis the id of the requested cell
Returns
The halo layer of the specified cell.

Definition at line 3786 of file patch_kernel_parallel.cpp.

◆ getCellIterator()

PatchKernel::CellIterator bitpit::PatchKernel::getCellIterator ( long id)

Returns an iterator pointing to the specified cell.

Returns
An iterator to the specified cell.

Definition at line 2631 of file patch_kernel.cpp.

◆ getCellOwner()

int bitpit::PatchKernel::getCellOwner ( long id) const

Gets the rank of the process that owns the specified cell.

Parameters
idis the id of the requested cell
Returns
The rank that owns the specified cell.

Definition at line 3770 of file patch_kernel_parallel.cpp.

◆ getCellRank()

int bitpit::PatchKernel::getCellRank ( long id) const

Gets the rank of the process that owns the specified cell.

Parameters
idis the id of the requested cell
Returns
The rank that owns the specified cell.

Definition at line 3754 of file patch_kernel_parallel.cpp.

◆ getCells() [1/2]

PiercedVector< Cell > & bitpit::PatchKernel::getCells ( )

Gets the cells owned by the patch.

Returns
The cells owned by the patch.
Examples
POD_example_00002.cpp.

Definition at line 2558 of file patch_kernel.cpp.

◆ getCells() [2/2]

const PiercedVector< Cell > & bitpit::PatchKernel::getCells ( ) const

Gets a constant reference of the cells owned by the patch.

Returns
A constant reference of the cells owned by the patch.

Definition at line 2568 of file patch_kernel.cpp.

◆ getCellType()

ElementType bitpit::PatchKernel::getCellType ( long id) const
virtual

Gets the element type for the cell with the specified id.

Parameters
idis the id of the requested cell
Returns
The element type for the cell with the specified id.

Reimplemented in bitpit::VolCartesian, and bitpit::VolCartesian.

Definition at line 2601 of file patch_kernel.cpp.

◆ getCellVertexCoordinates() [1/3]

ConstProxyVector< std::array< double, 3 > > bitpit::PatchKernel::getCellVertexCoordinates ( long id) const

Get vertex coordinates of the specified cell.

Parameters
idis the id of the cell
Returns
Vertex coordinates of the cell.

Definition at line 5547 of file patch_kernel.cpp.

◆ getCellVertexCoordinates() [2/3]

void bitpit::PatchKernel::getCellVertexCoordinates ( long id,
std::array< double, 3 > * coordinates ) const

Get vertex coordinates of the specified cell.

Parameters
idis the id of the cell
[out]coordinateson output will contain the vertex coordinates, it is up to the caller to ensure that the storage has enough space for all the vertex coordinates

Definition at line 5583 of file patch_kernel.cpp.

◆ getCellVertexCoordinates() [3/3]

void bitpit::PatchKernel::getCellVertexCoordinates ( long id,
std::unique_ptr< std::array< double, 3 >[]> * coordinates ) const

Get vertex coordinates of the specified cell.

Parameters
idis the id of the cell
[out]coordinateson output will contain the vertex coordinates

Definition at line 5568 of file patch_kernel.cpp.

◆ getCommunicator()

const MPI_Comm & bitpit::PatchKernel::getCommunicator ( ) const

Gets the MPI communicator associated with the patch

Returns
The MPI communicator associated with the patch.

Definition at line 128 of file patch_kernel_parallel.cpp.

◆ getDimension()

int bitpit::PatchKernel::getDimension ( ) const

Gets the dimension of the patch.

Returns
The dimension of the patch.

Definition at line 1532 of file patch_kernel.cpp.

◆ getDumpVersion()

int bitpit::PatchKernel::getDumpVersion ( ) const

Get the version associated to the binary dumps.

Returns
The version associated to the binary dumps.

Definition at line 8202 of file patch_kernel.cpp.

◆ getElementVertexCoordinates() [1/3]

ConstProxyVector< std::array< double, 3 > > bitpit::PatchKernel::getElementVertexCoordinates ( const Element & element) const

Get the coordinates of the specified element

Parameters
elementis the element
Returns
The coordinates of the element.

Definition at line 7332 of file patch_kernel.cpp.

◆ getElementVertexCoordinates() [2/3]

void bitpit::PatchKernel::getElementVertexCoordinates ( const Element & element,
std::array< double, 3 > * coordinates ) const

Get vertex coordinates of the specified element

Parameters
elementis the element
[out]coordinateson output will contain the vertex coordinates, it is up to the caller to ensure that the storage has enough space for all the vertex coordinates

Definition at line 7366 of file patch_kernel.cpp.

◆ getElementVertexCoordinates() [3/3]

void bitpit::PatchKernel::getElementVertexCoordinates ( const Element & element,
std::unique_ptr< std::array< double, 3 >[]> * coordinates ) const

Get vertex coordinates of the specified element

Parameters
elementis the element
[out]coordinateson output will contain the vertex coordinates

Definition at line 7352 of file patch_kernel.cpp.

◆ getFirstGhost() [1/2]

Cell & bitpit::PatchKernel::getFirstGhost ( )

Gets a reference to the first ghost cell.

Returns
A reference to the first ghost cell.

Definition at line 731 of file patch_kernel_parallel.cpp.

◆ getFirstGhost() [2/2]

const Cell & bitpit::PatchKernel::getFirstGhost ( ) const

Gets a constant reference to the first ghost cell.

Returns
A constant reference to the first ghost cell.

Definition at line 751 of file patch_kernel_parallel.cpp.

◆ getFirstGhostCell() [1/2]

Cell & bitpit::PatchKernel::getFirstGhostCell ( )

Gets a reference to the first ghost cell.

Returns
A reference to the first ghost cell.

Definition at line 721 of file patch_kernel_parallel.cpp.

◆ getFirstGhostCell() [2/2]

const Cell & bitpit::PatchKernel::getFirstGhostCell ( ) const

Gets a constant reference to the first ghost cell.

Returns
A constant reference to the first ghost cell.

Definition at line 741 of file patch_kernel_parallel.cpp.

◆ getFirstGhostVertex() [1/2]

Vertex & bitpit::PatchKernel::getFirstGhostVertex ( )

Gets a reference to the first ghost vertex.

Returns
A reference to the first ghost vertex.

Definition at line 444 of file patch_kernel_parallel.cpp.

◆ getFirstGhostVertex() [2/2]

const Vertex & bitpit::PatchKernel::getFirstGhostVertex ( ) const

Gets a constant reference to the first ghost vertex.

Returns
A constant reference to the first ghost vertex.

Definition at line 454 of file patch_kernel_parallel.cpp.

◆ getGhostCellCount()

long bitpit::PatchKernel::getGhostCellCount ( ) const

Gets the number of ghost cells in the patch.

Returns
The number of ghost cells in the patch.

Definition at line 701 of file patch_kernel_parallel.cpp.

◆ getGhostCellExchangeSources() [1/2]

const std::unordered_map< int, std::vector< long > > & bitpit::PatchKernel::getGhostCellExchangeSources ( ) const

Gets a constant reference to the cells that define the "sources" for the exchange of data on ghost cells. For each process, the corresponding list of "sources" is returned.

Sources are internal cells (i.e. cells owned by the current partition) that are ghost cells on other partitions. When exchanging data on ghost cells, these cells will be the sources form which data will be read from.

Source and target cells are ordered using a geometrical criterion (the same criterion is used on all the partitions), in this way the n-th source on a partition will correspond to the n-th target on the other partition.

Returns
A constant reference to the cells that define the "sources" for the exchange of data on ghost cells.

Definition at line 4041 of file patch_kernel_parallel.cpp.

◆ getGhostCellExchangeSources() [2/2]

const std::vector< long > & bitpit::PatchKernel::getGhostCellExchangeSources ( int rank) const

Gets a constant reference to the cells that define the "sources" for the exchange of data on ghost cells with the specified process.

Sources are internal cells (i.e. cells owned by the current partition) that are ghost cells on other partitions. When exchanging data on ghost cells, these cells will be the sources form which data will be read from.

Source and target cells are ordered using a geometrical criterion (the same criterion is used on all the partitions), in this way the n-th source on a partition will correspond to the n-th target on the other partition.

Parameters
rankis the rank to which data will be send
Returns
A constant reference to the cells that define the "sources" for the exchange of data on ghost cells with the specified process.

Definition at line 4083 of file patch_kernel_parallel.cpp.

◆ getGhostCellExchangeTargets() [1/2]

const std::unordered_map< int, std::vector< long > > & bitpit::PatchKernel::getGhostCellExchangeTargets ( ) const

Gets a constant reference to the cells that define the "targets" for the exchange of data on ghost cells. For each process, the corresponding list of "targets" is returned.

During data exchange, each partition will send the data of its "source" cells to the corresponding "target" cells (i.e., ghost cells) on other partitions.

Source and target cells are ordered using a geometrical criterion (the same criterion is used on all the partitions), in this way the n-th source on a partition will correspond to the n-th target on the other partition.

Returns
A constant reference to the cells that define the "targets" for the exchange of data on ghost cells.

Definition at line 3957 of file patch_kernel_parallel.cpp.

◆ getGhostCellExchangeTargets() [2/2]

const std::vector< long > & bitpit::PatchKernel::getGhostCellExchangeTargets ( int rank) const

Gets a constant reference to the cells that define the "targets" for the exchange of data on ghost cells with the specified process.

During data exchange, each partition will send the data of its "source" cells to the corresponding "target" cells (i.e., ghost cells) on other partitions.

Source and target cells are ordered using a geometrical criterion (the same criterion is used on all the partitions), in this way the n-th source on a partition will correspond to the n-th target on the other partition.

Parameters
rankis the rank data will be received from
Returns
A constant reference to the cells that define the "targets" for the exchange of data on ghost cells with the specified process.

Definition at line 3999 of file patch_kernel_parallel.cpp.

◆ getGhostCount()

long bitpit::PatchKernel::getGhostCount ( ) const

Gets the number of ghost cells in the patch.

Returns
The number of ghost cells in the patch.

Definition at line 711 of file patch_kernel_parallel.cpp.

◆ getGhostExchangeSources() [1/2]

const std::unordered_map< int, std::vector< long > > & bitpit::PatchKernel::getGhostExchangeSources ( ) const

Gets a constant reference to the cells that define the "sources" for the exchange of data on ghost cells. For each process, the corresponding list of "sources" is returned.

Sources are internal cells (i.e. cells owned by the current partition) that are ghost cells on other partitions. When exchanging data on ghost cells, these cells will be the sources form which data will be read from.

Source and target cells are ordered using a geometrical criterion (the same criterion is used on all the partitions), in this way the n-th source on a partition will correspond to the n-th target on the other partition.

Returns
A constant reference to the cells that define the "sources" for the exchange of data on ghost cells.

Definition at line 4062 of file patch_kernel_parallel.cpp.

◆ getGhostExchangeSources() [2/2]

const std::vector< long > & bitpit::PatchKernel::getGhostExchangeSources ( int rank) const

Gets a constant reference to the cells that define the "sources" for the exchange of data on ghost cells with the specified process.

Sources are internal cells (i.e. cells owned by the current partition) that are ghost cells on other partitions. When exchanging data on ghost cells, these cells will be the sources form which data will be read from.

Source and target cells are ordered using a geometrical criterion (the same criterion is used on all the partitions), in this way the n-th source on a partition will correspond to the n-th target on the other partition.

Parameters
rankis the rank to which data will be send
Returns
A constant reference to the cells that define the "sources" for the exchange of data on ghost cells with the specified process.

Definition at line 4104 of file patch_kernel_parallel.cpp.

◆ getGhostExchangeTargets() [1/2]

const std::unordered_map< int, std::vector< long > > & bitpit::PatchKernel::getGhostExchangeTargets ( ) const

Gets a constant reference to the cells that define the "targets" for the exchange of data on ghost cells. For each process, the corresponding list of "targets" is returned.

During data exchange, each partition will send the data of its "source" cells to the corresponding "target" cells (i.e., ghost cells) on other partitions.

Source and target cells are ordered using a geometrical criterion (the same criterion is used on all the partitions), in this way the n-th source on a partition will correspond to the n-th target on the other partition.

Returns
A constant reference to the cells that define the "targets" for the exchange of data on ghost cells.

Definition at line 3978 of file patch_kernel_parallel.cpp.

◆ getGhostExchangeTargets() [2/2]

const std::vector< long > & bitpit::PatchKernel::getGhostExchangeTargets ( int rank) const

Gets a constant reference to the cells that define the "targets" for the exchange of data on ghost cells with the specified process.

During data exchange, each partition will send the data of its "source" cells to the corresponding "target" cells (i.e., ghost cells) on other partitions.

Source and target cells are ordered using a geometrical criterion (the same criterion is used on all the partitions), in this way the n-th source on a partition will correspond to the n-th target on the other partition.

Parameters
rankis the rank data will be received from
Returns
A constant reference to the cells that define the "targets" for the exchange of data on ghost cells with the specified process.

Definition at line 4020 of file patch_kernel_parallel.cpp.

◆ getGhostVertexCount()

long bitpit::PatchKernel::getGhostVertexCount ( ) const

Gets the number of ghost vertices in the patch.

Returns
The number of ghost vertices in the patch

Definition at line 434 of file patch_kernel_parallel.cpp.

◆ getGhostVertexExchangeSources() [1/2]

const std::unordered_map< int, std::vector< long > > & bitpit::PatchKernel::getGhostVertexExchangeSources ( ) const

Gets a constant reference to the vertices that define the "sources" for the exchange of data on ghost vertices. For each process, the corresponding list of "sources" is returned.

Sources are internal vertices (i.e. vertices owned by the current partition) that are ghost vertices on other partitions. When exchanging data on ghost vertices, these vertices will be the sources form which data will be read from.

Source and target vertices are ordered using a geometrical criterion (the same criterion is used on all the partitions), in this way the n-th source on a partition will correspond to the n-th target on the other partition.

Returns
A constant reference to the vertices that define the "sources" for the exchange of data on ghost vertices with the specified process.

Definition at line 3914 of file patch_kernel_parallel.cpp.

◆ getGhostVertexExchangeSources() [2/2]

const std::vector< long > & bitpit::PatchKernel::getGhostVertexExchangeSources ( int rank) const

Gets a constant reference to the vertices that define the "sources" for the exchange of data on ghost vertices with the specified process.

Sources are internal vertices (i.e. vertices owned by the current partition) that are ghost vertices on other partitions. When exchanging data on ghost vertices, these vertices will be the sources form which data will be read from.

Source and target vertices are ordered using a geometrical criterion (the same criterion is used on all the partitions), in this way the n-th source on a partition will correspond to the n-th target on the other partition.

Parameters
rankis the rank to which data will be send
Returns
A constant reference to the vertices that define the "sources" for the exchange of data on ghost vertices with the specified process.

Definition at line 3936 of file patch_kernel_parallel.cpp.

◆ getGhostVertexExchangeTargets() [1/2]

const std::unordered_map< int, std::vector< long > > & bitpit::PatchKernel::getGhostVertexExchangeTargets ( ) const

Gets a constant reference to the vertices that define the "targets" for the exchange of data on ghost vertices. For each process, the corresponding list of "targets" is returned.

During data exchange, each partition will send the data of its "source" vertices to the corresponding "target" vertices (i.e., ghost vertices) on other partitions.

Source and target vertices are ordered using a geometrical criterion (the same criterion is used on all the partitions), in this way the n-th source on a partition will correspond to the n-th target on the other partition.

Returns
A constant reference to the vertices that define the "targets" for the exchange of data on ghost vertices.

Definition at line 3871 of file patch_kernel_parallel.cpp.

◆ getGhostVertexExchangeTargets() [2/2]

const std::vector< long > & bitpit::PatchKernel::getGhostVertexExchangeTargets ( int rank) const

Gets a constant reference to the vertices that define the "targets" for the exchange of data on ghost vertices with the specified process.

During data exchange, each partition will send the data of its "source" vertices to the corresponding "target" vertices (i.e., ghost vertices) on other partitions.

Source and target vertices are ordered using a geometrical criterion (the same criterion is used on all the partitions), in this way the n-th source on a partition will correspond to the n-th target on the other partition.

Parameters
rankis the rank data will be received from
Returns
A constant reference to the vertices that define the "targets" for the exchange of data on ghost vertices with the specified process.

Definition at line 3892 of file patch_kernel_parallel.cpp.

◆ getHaloSize()

std::size_t bitpit::PatchKernel::getHaloSize ( ) const

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

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

Definition at line 315 of file patch_kernel_parallel.cpp.

◆ getId()

int bitpit::PatchKernel::getId ( ) const

Gets the id associated with the patch.

Returns
The id associated with the patch.

Definition at line 1502 of file patch_kernel.cpp.

◆ getInterface() [1/2]

Interface & bitpit::PatchKernel::getInterface ( long id)

Gets a reference to the interface with the specified id.

Parameters
idis the id of the requested interface
Returns
A reference to the interface with the specified id.

Definition at line 4304 of file patch_kernel.cpp.

◆ getInterface() [2/2]

const Interface & bitpit::PatchKernel::getInterface ( long id) const

Gets a constant reference to the interface with the specified id.

Parameters
idis the id of the requested interface
Returns
A constant reference to the interface with the specified id.

Definition at line 4315 of file patch_kernel.cpp.

◆ getInterfaceAlterationFlags()

PatchKernel::AlterationFlags bitpit::PatchKernel::getInterfaceAlterationFlags ( long id) const
protected

Get the alteration flags of the specified interface.

Parameters
idis the id of the interface
Returns
The alteration flags of the interface.

Definition at line 6899 of file patch_kernel.cpp.

◆ getInterfaceConstIterator()

PatchKernel::InterfaceConstIterator bitpit::PatchKernel::getInterfaceConstIterator ( long id) const

Returns a constant iterator pointing to the specified interface.

Returns
A constant iterator to the specified interface.

Definition at line 4366 of file patch_kernel.cpp.

◆ getInterfaceCount()

long bitpit::PatchKernel::getInterfaceCount ( ) const
virtual

Gets the number of interfaces in the patch.

Returns
The number of interfaces in the patch

Reimplemented in bitpit::VolCartesian.

Definition at line 4273 of file patch_kernel.cpp.

◆ getInterfaceIterator()

PatchKernel::InterfaceIterator bitpit::PatchKernel::getInterfaceIterator ( long id)

Returns an iterator pointing to the specified interface.

Returns
An iterator to the specified interface.

Definition at line 4336 of file patch_kernel.cpp.

◆ getInterfaces() [1/2]

PiercedVector< Interface > & bitpit::PatchKernel::getInterfaces ( )

Gets the interfaces owned by the patch.

Returns
The interfaces owned by the patch.

Definition at line 4283 of file patch_kernel.cpp.

◆ getInterfaces() [2/2]

const PiercedVector< Interface > & bitpit::PatchKernel::getInterfaces ( ) const

Gets a constant reference to the interfaces owned by the patch.

Returns
A constant reference to the interfaces owned by the patch.

Definition at line 4293 of file patch_kernel.cpp.

◆ getInterfacesBuildStrategy()

PatchKernel::InterfacesBuildStrategy bitpit::PatchKernel::getInterfacesBuildStrategy ( ) const

Returns the current interfaces build strategy.

Returns
The current interfaces build strategy.

Definition at line 6295 of file patch_kernel.cpp.

◆ getInterfaceType()

ElementType bitpit::PatchKernel::getInterfaceType ( long id) const
virtual

Gets the element type for the interface with the specified id.

Parameters
idis the id of the requested interface
Returns
The element type for the interface with the specified id.

Reimplemented in bitpit::VolCartesian, and bitpit::VolCartesian.

Definition at line 4326 of file patch_kernel.cpp.

◆ getInterfaceVertexCoordinates() [1/3]

ConstProxyVector< std::array< double, 3 > > bitpit::PatchKernel::getInterfaceVertexCoordinates ( long id) const

Get vertex coordinates of the specified interface.

Parameters
idis the id of the interface
Returns
Vertex coordinates of the interface.

Definition at line 5623 of file patch_kernel.cpp.

◆ getInterfaceVertexCoordinates() [2/3]

void bitpit::PatchKernel::getInterfaceVertexCoordinates ( long id,
std::array< double, 3 > * coordinates ) const

Get vertex coordinates of the specified interface.

Parameters
idis the id of the interface
[out]coordinateson output will contain the vertex coordinates, it is up to the caller to ensure that the storage has enough space for all the vertex coordinates

Definition at line 5659 of file patch_kernel.cpp.

◆ getInterfaceVertexCoordinates() [3/3]

void bitpit::PatchKernel::getInterfaceVertexCoordinates ( long id,
std::unique_ptr< std::array< double, 3 >[]> * coordinates ) const

Get vertex coordinates of the specified interface.

Parameters
idis the id of the interface
[out]coordinateson output will contain the vertex coordinates

Definition at line 5644 of file patch_kernel.cpp.

◆ getInternalCellCount()

long bitpit::PatchKernel::getInternalCellCount ( ) const

Gets the number of internal cells in the patch.

Returns
The number of internal cells in the patch.

Definition at line 2538 of file patch_kernel.cpp.

◆ getInternalCellPIDs()

std::set< int > bitpit::PatchKernel::getInternalCellPIDs ( )

Get the PIDs of the internal cells.

Returns
The PIDs of the internal cells.

Definition at line 4085 of file patch_kernel.cpp.

◆ getInternalCellsByPID()

std::vector< long > bitpit::PatchKernel::getInternalCellsByPID ( int pid)

Get all the internal cells which belongs to the specified PID.

Parameters
pidis the PID
Returns
All the internal cells which belongs to the specified PID.

Definition at line 4102 of file patch_kernel.cpp.

◆ getInternalCount()

long bitpit::PatchKernel::getInternalCount ( ) const

Gets the number of internal cells in the patch.

Returns
The number of internal cells in the patch.

Definition at line 2548 of file patch_kernel.cpp.

◆ getInternalVertexCount()

long bitpit::PatchKernel::getInternalVertexCount ( ) const

Gets the number of internal vertices in the patch.

Returns
The number of internal vertices in the patch.

Definition at line 1661 of file patch_kernel.cpp.

◆ getLastInternalCell() [1/2]

Cell & bitpit::PatchKernel::getLastInternalCell ( )

Gets a reference to the last internal cell.

Returns
A reference to the last internal cell.

Definition at line 2611 of file patch_kernel.cpp.

◆ getLastInternalCell() [2/2]

const Cell & bitpit::PatchKernel::getLastInternalCell ( ) const

Gets a constant reference to the last internal cell.

Returns
A constant reference to the last internal cell.

Definition at line 2621 of file patch_kernel.cpp.

◆ getLastInternalVertex() [1/2]

Vertex & bitpit::PatchKernel::getLastInternalVertex ( )

Gets a reference to the last internal vertex.

Returns
A reference to the last internal vertex.

Definition at line 1713 of file patch_kernel.cpp.

◆ getLastInternalVertex() [2/2]

const Vertex & bitpit::PatchKernel::getLastInternalVertex ( ) const

Gets a constant reference to the last internal vertex.

Returns
A constant reference to the last internal vertex.

Definition at line 1723 of file patch_kernel.cpp.

◆ getLineCodimension()

virtual int bitpit::PatchKernel::getLineCodimension ( ) const
pure virtual

◆ getNeighbourRanks()

std::vector< int > bitpit::PatchKernel::getNeighbourRanks ( )

Get a list of neighbour ranks.

Returns
A list of neighbour ranks.

Definition at line 3844 of file patch_kernel_parallel.cpp.

◆ getOwner()

int bitpit::PatchKernel::getOwner ( bool allowDirty = false) const

If the path is NOT distributed among different processes, returns the process that owns the patch, otherwise returns a negative number.

Setting the appropriate function argument, this function can be called also when the patch is not up-to-date. If dirty patches are allowed and the patch is actually dirty, the function will evaluate the owner on-the-fly. Otherwise the function will return the owner evaluated during the last update. In any case, if dirt patches are allowed, the function is a collective function and needs to be called by all processes (otherwise a deadlock will occur).

Parameters
allowDirtyif set to true, the function will evaluate the owner of a dirty patch on on-the-fly; otherwise the function will return the owner evaluated during the last updated, even if the patch is currently dirty. If dirty patch are allowed, the function is a collective function and needs to be called by all processes (otherwise a deadlock will occur)
Returns
If the path is NOT distributed among different processes, returns the process that owns the patch, otherwise returns a negative number.

Definition at line 211 of file patch_kernel_parallel.cpp.

◆ getPartitioningStatus()

PatchKernel::PartitioningStatus bitpit::PatchKernel::getPartitioningStatus ( bool global = false) const

Returns the current partitioning status.

Parameters
globalif set to true the partitioning status will be
Returns
The current partitioning status.

Definition at line 1707 of file patch_kernel_parallel.cpp.

◆ getPointCodimension()

virtual int bitpit::PatchKernel::getPointCodimension ( ) const
pure virtual

◆ getProcessorCount()

int bitpit::PatchKernel::getProcessorCount ( ) const

Count the MPI processes in the communicator associated with the patch.

Returns
The number of MPI processes in the communicator associated with the patch.

Definition at line 167 of file patch_kernel_parallel.cpp.

◆ getRank()

int bitpit::PatchKernel::getRank ( ) const

Gets the MPI rank associated with the patch.

Returns
The MPI rank associated with the patch.

Definition at line 156 of file patch_kernel_parallel.cpp.

◆ getSpawnStatus()

PatchKernel::SpawnStatus bitpit::PatchKernel::getSpawnStatus ( ) const

Returns the current spawn status.

Returns
The current spawn status.

Definition at line 1307 of file patch_kernel.cpp.

◆ getSurfaceCodimension()

virtual int bitpit::PatchKernel::getSurfaceCodimension ( ) const
pure virtual

◆ getTol()

double bitpit::PatchKernel::getTol ( ) const

Gets the tolerance for geometrical checks.

Returns
The tolerance for geometrical checks.

Definition at line 7621 of file patch_kernel.cpp.

◆ getVertex() [1/2]

Vertex & bitpit::PatchKernel::getVertex ( long id)

Gets a reference to the vertex with the specified id.

Parameters
idis the id of the requested vertex
Returns
A reference to the vertex with the specified id.

Definition at line 1692 of file patch_kernel.cpp.

◆ getVertex() [2/2]

const Vertex & bitpit::PatchKernel::getVertex ( long id) const

Gets a constant reference to the vertex with the specified id.

Parameters
idis the id of the requested vertex
Returns
A constant reference to the vertex with the specified id.

Definition at line 1703 of file patch_kernel.cpp.

◆ getVertexConstIterator()

PatchKernel::VertexConstIterator bitpit::PatchKernel::getVertexConstIterator ( long id) const

Returns a constant iterator pointing to the specified vertex.

Returns
A constant iterator to the specified vertex.

Definition at line 1787 of file patch_kernel.cpp.

◆ getVertexCoords() [1/3]

const std::array< double, 3 > & bitpit::PatchKernel::getVertexCoords ( long id) const

Gets the coordinates of the specified vertex.

Parameters
idis the id of the vertex
Returns
The coordinates of the specified vertex.

Definition at line 2345 of file patch_kernel.cpp.

◆ getVertexCoords() [2/3]

void bitpit::PatchKernel::getVertexCoords ( std::size_t nVertices,
const long * ids,
std::array< double, 3 > * coordinates ) const

Gets the coordinates of the specified vertices.

Parameters
nVerticesis the number of vertices
idsare the ids of the requested vertices
[out]coordinateson output will contain the vertex coordinates, it is up to the caller to ensure that the storage has enough space for all the vertex coordinates

Definition at line 2372 of file patch_kernel.cpp.

◆ getVertexCoords() [3/3]

void bitpit::PatchKernel::getVertexCoords ( std::size_t nVertices,
const long * ids,
std::unique_ptr< std::array< double, 3 >[]> * coordinates ) const

Gets the coordinates of the specified vertices.

Parameters
nVerticesis the number of vertices
idsare the ids of the requested vertices
[out]coordinateson output will contain the vertex coordinates

Definition at line 2357 of file patch_kernel.cpp.

◆ getVertexCount()

long bitpit::PatchKernel::getVertexCount ( ) const
virtual

Gets the number of vertices in the patch.

Returns
The number of vertices in the patch

Reimplemented in bitpit::VolCartesian.

Definition at line 1651 of file patch_kernel.cpp.

◆ getVertexIterator()

PatchKernel::VertexIterator bitpit::PatchKernel::getVertexIterator ( long id)

Returns an iterator pointing to the specified vertex.

Returns
An iterator to the specified vertex.

Definition at line 1733 of file patch_kernel.cpp.

◆ getVertexOwner()

int bitpit::PatchKernel::getVertexOwner ( long id) const

Gets the rank of the process that owns the specified vertex.

Parameters
idis the id of the requested vertex
Returns
The rank that owns the specified vertex.

Definition at line 3818 of file patch_kernel_parallel.cpp.

◆ getVertexRank()

int bitpit::PatchKernel::getVertexRank ( long id) const

Gets the rank of the process that owns the specified vertex.

Parameters
idis the id of the requested vertex
Returns
The rank that owns the specified vertex.

Definition at line 3802 of file patch_kernel_parallel.cpp.

◆ getVertices() [1/2]

PiercedVector< Vertex > & bitpit::PatchKernel::getVertices ( )

Gets the nodes owned by the patch.

Returns
The nodes owned by the patch.

Definition at line 1671 of file patch_kernel.cpp.

◆ getVertices() [2/2]

const PiercedVector< Vertex > & bitpit::PatchKernel::getVertices ( ) const

Gets a constant reference to the vertices owned by the patch.

Returns
A constant reference to the vertices owned by the patch.

Definition at line 1681 of file patch_kernel.cpp.

◆ getVolumeCodimension()

virtual int bitpit::PatchKernel::getVolumeCodimension ( ) const
pure virtual

◆ getVTK()

VTKUnstructuredGrid & bitpit::PatchKernel::getVTK ( )

Get the VTK object.

Returns
The VTK object.
Examples
volcartesian_example_00001.cpp.

Definition at line 7809 of file patch_kernel.cpp.

◆ getVTKCellWriteRange()

const PatchKernel::CellConstRange bitpit::PatchKernel::getVTKCellWriteRange ( ) const

Get the VTK cell write range.

Returns
The VTK cell write range.
Examples
voloctree_adaptation_example_00001.cpp.

Definition at line 7839 of file patch_kernel.cpp.

◆ getVTKWriteTarget()

PatchKernel::WriteTarget bitpit::PatchKernel::getVTKWriteTarget ( ) const

Get the VTK write target.

Returns
The VTK write target.

Definition at line 7819 of file patch_kernel.cpp.

◆ ghostBegin()

PatchKernel::CellIterator bitpit::PatchKernel::ghostBegin ( )

Returns iterator to the first ghost cells within the cell list.

Returns
An iterator to the first ghost cell.

Definition at line 1218 of file patch_kernel_parallel.cpp.

◆ ghostCell2InternalCell()

PatchKernel::CellIterator bitpit::PatchKernel::ghostCell2InternalCell ( long id)

Converts a ghost cell to an internal cell.

Parameters
[in]idis the index of the cell

Definition at line 658 of file patch_kernel_parallel.cpp.

◆ ghostCellBegin()

PatchKernel::CellIterator bitpit::PatchKernel::ghostCellBegin ( )

Returns iterator to the first ghost cells within the cell list.

Returns
An iterator to the first ghost cell.

Definition at line 1204 of file patch_kernel_parallel.cpp.

◆ ghostCellConstBegin()

PatchKernel::CellConstIterator bitpit::PatchKernel::ghostCellConstBegin ( ) const

Returns a constant iterator to the first ghost cells within the cell list.

Returns
A constant iterator to the first ghost cell.

Definition at line 1248 of file patch_kernel_parallel.cpp.

◆ ghostCellConstEnd()

PatchKernel::CellConstIterator bitpit::PatchKernel::ghostCellConstEnd ( ) const

Returns a constant iterator to the end of the list of ghost cells.

Returns
A constant iterator to the end of the list of ghost cell.

Definition at line 1272 of file patch_kernel_parallel.cpp.

◆ ghostCellEnd()

PatchKernel::CellIterator bitpit::PatchKernel::ghostCellEnd ( )

Returns iterator to the end of the list of ghost cells.

Returns
An iterator to the end of the list of ghost cell.

Definition at line 1228 of file patch_kernel_parallel.cpp.

◆ ghostConstBegin()

PatchKernel::CellConstIterator bitpit::PatchKernel::ghostConstBegin ( ) const

Returns a constant iterator to the first ghost cells within the cell list.

Returns
A constant iterator to the first ghost cell.

Definition at line 1262 of file patch_kernel_parallel.cpp.

◆ ghostConstEnd()

PatchKernel::CellConstIterator bitpit::PatchKernel::ghostConstEnd ( ) const

Returns a constant iterator to the end of the list of ghost cells.

Returns
A constant iterator to the end of the list of ghost cell.

Definition at line 1282 of file patch_kernel_parallel.cpp.

◆ ghostEnd()

PatchKernel::CellIterator bitpit::PatchKernel::ghostEnd ( )

Returns iterator to the end of the list of ghost cells.

Returns
An iterator to the end of the list of ghost cell.

Definition at line 1238 of file patch_kernel_parallel.cpp.

◆ ghostVertex2InternalVertex()

PatchKernel::VertexIterator bitpit::PatchKernel::ghostVertex2InternalVertex ( long id)
protected

Converts a ghost vertex to an internal vertex.

Parameters
[in]idis the index of the vertex

Definition at line 391 of file patch_kernel_parallel.cpp.

◆ ghostVertexBegin()

PatchKernel::VertexIterator bitpit::PatchKernel::ghostVertexBegin ( )

Returns iterator to the first ghost vertex within the vertex list.

Returns
An iterator to the first ghost vertex.

Definition at line 551 of file patch_kernel_parallel.cpp.

◆ ghostVertexConstBegin()

PatchKernel::VertexConstIterator bitpit::PatchKernel::ghostVertexConstBegin ( ) const

Returns a constant iterator to the first ghost vertices within the vertex list.

Returns
A constant iterator to the first ghost vertex.

Definition at line 576 of file patch_kernel_parallel.cpp.

◆ ghostVertexConstEnd()

PatchKernel::VertexConstIterator bitpit::PatchKernel::ghostVertexConstEnd ( ) const

Returns a constant iterator to the end of the list of ghost vertices.

Returns
A constant iterator to the end of the list of ghost vertex.

Definition at line 590 of file patch_kernel_parallel.cpp.

◆ ghostVertexEnd()

PatchKernel::VertexIterator bitpit::PatchKernel::ghostVertexEnd ( )

Returns iterator to the end of the list of ghost vertices.

Returns
An iterator to the end of the list of ghost vertex.

Definition at line 565 of file patch_kernel_parallel.cpp.

◆ initializeAdjacencies()

void bitpit::PatchKernel::initializeAdjacencies ( AdjacenciesBuildStrategy strategy = ADJACENCIES_AUTOMATIC)

Initialize the adjacencies using the specified build strategy.

If the current strategy doesn't match the requested strategy, all adjacencies will be deleted and they will be re-generated from scratch.

Parameters
strategyis the build strategy that will be used

Definition at line 5878 of file patch_kernel.cpp.

◆ initializeInterfaces()

void bitpit::PatchKernel::initializeInterfaces ( InterfacesBuildStrategy strategy = INTERFACES_AUTOMATIC)

Initialize the interfaces using the specified build strategy.

If the current strategy doesn't match the requested strategy, all interfaces will be deleted and they will be re-generated from scratch.

Adjacencies are a mandatory requirement for building interfaces, if the adjacencies are not yet initialized an exception is thrown.

Parameters
strategyis the build strategy that will be used

Definition at line 6374 of file patch_kernel.cpp.

◆ interfaceBegin()

PatchKernel::InterfaceIterator bitpit::PatchKernel::interfaceBegin ( )

Returns iterator pointing to the first interface.

Returns
An iterator to the first interface.

Definition at line 4346 of file patch_kernel.cpp.

◆ interfaceConstBegin()

PatchKernel::InterfaceConstIterator bitpit::PatchKernel::interfaceConstBegin ( ) const

Returnsa a constant iterator pointing to the first interface.

Returns
A constant iterator to the first interface.

Definition at line 4376 of file patch_kernel.cpp.

◆ interfaceConstEnd()

PatchKernel::InterfaceConstIterator bitpit::PatchKernel::interfaceConstEnd ( ) const

Returns a constant iterator pointing to last interface.

Returns
A constant iterator to the last interface.

Definition at line 4386 of file patch_kernel.cpp.

◆ interfaceEnd()

PatchKernel::InterfaceIterator bitpit::PatchKernel::interfaceEnd ( )

Returns iterator pointing to last interface.

Returns
An iterator to the last interface.

Definition at line 4356 of file patch_kernel.cpp.

◆ internalBegin()

PatchKernel::CellIterator bitpit::PatchKernel::internalBegin ( )

Returns iterator pointing to the first internal cell.

Returns
An iterator to the first internal cell.

Definition at line 2671 of file patch_kernel.cpp.

◆ internalCell2GhostCell()

PatchKernel::CellIterator bitpit::PatchKernel::internalCell2GhostCell ( long id,
int owner,
int haloLayer )

Converts an internal cell to a ghost cell.

Parameters
[in]idis the index of the cell
[in]owneris the rank of the process that owns the ghost cell
[in]haloLayeris the halo layer the ghost cell belongs to

Definition at line 617 of file patch_kernel_parallel.cpp.

◆ internalCellBegin()

PatchKernel::CellIterator bitpit::PatchKernel::internalCellBegin ( )

Returns iterator pointing to the first internal cell.

Returns
An iterator to the first internal cell.

Definition at line 2661 of file patch_kernel.cpp.

◆ internalCellConstBegin()

PatchKernel::CellConstIterator bitpit::PatchKernel::internalCellConstBegin ( ) const

Returns a constant iterator pointing to the first internal cell.

Returns
A constant iterator to the first internal cell.

Definition at line 2735 of file patch_kernel.cpp.

◆ internalCellConstEnd()

PatchKernel::CellConstIterator bitpit::PatchKernel::internalCellConstEnd ( ) const

Returns a constant iterator pointing to the end of the list of internal cells.

Returns
A constant iterator to the end of the list of internal cells.

Definition at line 2756 of file patch_kernel.cpp.

◆ internalCellEnd()

PatchKernel::CellIterator bitpit::PatchKernel::internalCellEnd ( )

Returns iterator pointing to the end of the list of internal cells.

Returns
An iterator to the end of the list of internal cells.

Definition at line 2681 of file patch_kernel.cpp.

◆ internalConstBegin()

PatchKernel::CellConstIterator bitpit::PatchKernel::internalConstBegin ( ) const

Returns a constant iterator pointing to the first internal cell.

Returns
A constant iterator to the first internal cell.

Definition at line 2745 of file patch_kernel.cpp.

◆ internalConstEnd()

PatchKernel::CellConstIterator bitpit::PatchKernel::internalConstEnd ( ) const

Returns a constant iterator pointing to the end of the list of internal cells.

Returns
A constant iterator to the end of the list of internal cells.

Definition at line 2771 of file patch_kernel.cpp.

◆ internalEnd()

PatchKernel::CellIterator bitpit::PatchKernel::internalEnd ( )

Returns iterator pointing to the end of the list of internal cells.

Returns
An iterator to the end of the list of internal cells.

Definition at line 2695 of file patch_kernel.cpp.

◆ internalVertex2GhostVertex()

PatchKernel::VertexIterator bitpit::PatchKernel::internalVertex2GhostVertex ( long id,
int owner )
protected

Converts an internal vertex to a ghost vertex.

Parameters
[in]idis the index of the vertex
[in]owneris the rank of the process that owns the ghost cell

Definition at line 350 of file patch_kernel_parallel.cpp.

◆ internalVertexBegin()

PatchKernel::VertexIterator bitpit::PatchKernel::internalVertexBegin ( )

Returns iterator pointing to the first internal vertex.

Returns
An iterator to the first internal vertex.

Definition at line 1763 of file patch_kernel.cpp.

◆ internalVertexConstBegin()

PatchKernel::VertexConstIterator bitpit::PatchKernel::internalVertexConstBegin ( ) const

Returns a constant iterator pointing to the first internal vertex.

Returns
A constant iterator to the first internal vertex.

Definition at line 1817 of file patch_kernel.cpp.

◆ internalVertexConstEnd()

PatchKernel::VertexConstIterator bitpit::PatchKernel::internalVertexConstEnd ( ) const

Returns a constant iterator pointing to last internal vertex.

Returns
A constant iterator to the last internal vertex.

Definition at line 1827 of file patch_kernel.cpp.

◆ internalVertexEnd()

PatchKernel::VertexIterator bitpit::PatchKernel::internalVertexEnd ( )

Returns iterator pointing to the end of the list of internal vertices.

Returns
An iterator to the end of the list of internal vertices.

Definition at line 1773 of file patch_kernel.cpp.

◆ isAdaptionSupported()

bool bitpit::PatchKernel::isAdaptionSupported ( ) const

Checks if the patch supports adaption.

Returns
Returns true if the patch supports adaption, false otherwise.

Definition at line 1331 of file patch_kernel.cpp.

◆ isBoundingBoxDirty()

bool bitpit::PatchKernel::isBoundingBoxDirty ( bool global = false) const

Checks if the bounding box is dirty.

Parameters
globalif set to true, the dirty status will be evaluated globally across all the partitions
Returns
Returns true if the bounding box is dirty, false otherwise.

Definition at line 7191 of file patch_kernel.cpp.

◆ isBoundingBoxFrozen()

bool bitpit::PatchKernel::isBoundingBoxFrozen ( ) const
protected

Checks if the bounding box is frozen.

Returns
Returns true if the bounding box is frozen, false otherwise.

Definition at line 7164 of file patch_kernel.cpp.

◆ isCellAutoIndexingEnabled()

bool bitpit::PatchKernel::isCellAutoIndexingEnabled ( ) const

Returns true if auto-indexing is enabled for cells.

When auto-indexing is disabled, cell ids for newly added cells should be provided by the user.

Returns
Returns true if auto-indexing is enabled for cells.

Definition at line 2432 of file patch_kernel.cpp.

◆ isCommunicatorSet()

bool bitpit::PatchKernel::isCommunicatorSet ( ) const
protected

Checks if the communicator to be used for parallel communications has already been set.

Returns
Returns true if the communicator has been set, false otherwise.

Definition at line 118 of file patch_kernel_parallel.cpp.

◆ isDirty()

bool bitpit::PatchKernel::isDirty ( bool global = false) const

Returns true if the the patch needs to update its data structures.

Parameters
globalif set to true, the dirty status will be evaluated globally across all the partitions
Returns
This method returns true to indicate the patch needs to update its data structures. Otherwise, it returns false.

Definition at line 1377 of file patch_kernel.cpp.

◆ isDistributed()

bool bitpit::PatchKernel::isDistributed ( bool allowDirty = false) const

Check if the patch is distributed among different processes.

A patch is distributed among different processes if it doesn't have an owner.

Setting the appropriate function argument, this function can be called also when the patch is not up-to-date. If dirty patches are allowed and the patch is actually dirty, the function will evaluate the owner on-the-fly. Otherwise the function will return the owner evaluated during the last update. In any case, if dirt patches are allowed, the function is a collective function and needs to be called by all processes (otherwise a deadlock will occur).

Returns
Return true if the patch is distributed among different processes, false otherwise.

Definition at line 187 of file patch_kernel_parallel.cpp.

◆ isExpert()

bool bitpit::PatchKernel::isExpert ( ) const

Checks if the expert mode is enabled.

When expert mode is enabled, it will be possible to change the patch using low level functions (e.g., it will be possible to add individual cells, add vertices, delete cells, ...).

Returns
This method returns true when the expert is enabled, otherwise it returns false.

Definition at line 1467 of file patch_kernel.cpp.

◆ isInterfaceAutoIndexingEnabled()

bool bitpit::PatchKernel::isInterfaceAutoIndexingEnabled ( ) const

Returns true if auto-indexing is enabled for interfaces.

When auto-indexing is disabled, ids for newly added interfaces has to be manually specified.

Returns
Returns true if auto-indexing is enabled for interfaces.

Definition at line 4170 of file patch_kernel.cpp.

◆ isInterfaceOrphan()

bool bitpit::PatchKernel::isInterfaceOrphan ( long id) const

Check if the interfaces is orphan.

An interface is considered orphan if it has no owner nor neighbour or if it's on a border face of a ghost cell.

Returns
Returns true if the interfaces is orphan, false otherwise.

Definition at line 4808 of file patch_kernel.cpp.

◆ isPartitioned()

bool bitpit::PatchKernel::isPartitioned ( ) const

Checks if the patch is partitioned.

A patch is considered partitioned if its MPI communicator spans multiple processes.

Returns
Returns true if the patch is partitioned, false otherwise.

Definition at line 1686 of file patch_kernel_parallel.cpp.

◆ isPartitioningSupported()

bool bitpit::PatchKernel::isPartitioningSupported ( ) const

Checks if the patch supports partitioning.

Returns
Returns true if the patch supports partitioning, false otherwise.

Definition at line 1696 of file patch_kernel_parallel.cpp.

◆ isRankNeighbour()

bool bitpit::PatchKernel::isRankNeighbour ( int rank)

Check if the processes associated with the specified rank is a neighbour.

Parameters
rankis the rank associated with the process
Returns
True is the process is a neighbour, false otherwise.

Definition at line 3834 of file patch_kernel_parallel.cpp.

◆ isSameFace()

bool bitpit::PatchKernel::isSameFace ( const Cell & cell_A,
int face_A,
const Cell & cell_B,
int face_B ) const
protectedvirtual

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 in bitpit::VolOctree.

Definition at line 5784 of file patch_kernel.cpp.

◆ isThreeDimensional()

bool bitpit::PatchKernel::isThreeDimensional ( ) const

Returns true if the patch is a three-dimensional patch.

Returns
This method returns true to indicate the patch is three-dimensional.

Definition at line 1542 of file patch_kernel.cpp.

◆ isTolCustomized()

bool bitpit::PatchKernel::isTolCustomized ( ) const

Checks if the tolerance for the geometrical checks has been customized by the user.

Returns
True if the tolerance was customized by the user, false otherwise.

Definition at line 7658 of file patch_kernel.cpp.

◆ isVertexAutoIndexingEnabled()

bool bitpit::PatchKernel::isVertexAutoIndexingEnabled ( ) const

Returns true if auto-indexing is enabled for vertices.

When auto-indexing is disabled, ids for newly added vertices has to be manually specified.

Returns
Returns true if auto-indexing is enabled for vertices.

Definition at line 1555 of file patch_kernel.cpp.

◆ locatePoint() [1/2]

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

◆ locatePoint() [2/2]

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 5769 of file patch_kernel.cpp.

◆ mappedItemRenumbering()

template<typename item_t , typename id_t >
void bitpit::PatchKernel::mappedItemRenumbering ( PiercedVector< item_t, id_t > & container,
const std::unordered_map< id_t, id_t > & renumberMap )
protected

Renumber the ids of the items in the specified container.

Parameters
containeris the container
renumberMapis the map that will be used for the renumer

Definition at line 225 of file patch_kernel.tpp.

◆ markCellForCoarsening()

void bitpit::PatchKernel::markCellForCoarsening ( long id)

Marks a cell for coarsening.

Parameters
idis the id of the cell that needs to be coarsened
Examples
POD_example_00002.cpp.

Definition at line 921 of file patch_kernel.cpp.

◆ markCellForRefinement()

void bitpit::PatchKernel::markCellForRefinement ( long id)

Marks a cell for refinement.

Parameters
idis the id of the cell that needs to be refined
Examples
POD_example_00002.cpp.

Definition at line 907 of file patch_kernel.cpp.

◆ operator=()

PatchKernel & bitpit::PatchKernel::operator= ( PatchKernel && other)

Move assignment operator.

Parameters
otheris another patch whose content is copied into this

Definition at line 365 of file patch_kernel.cpp.

◆ partition() [1/6]

std::vector< adaption::Info > bitpit::PatchKernel::partition ( bool trackPartitioning,
bool squeezeStorage = false )

Partitions the patch among the processes. The partitioning is done using a criteria that tries to balance the load among the processes.

Parameters
trackPartitioningif set to true, the changes to the patch will be tracked
squeezeStorageif set to true the vector that store patch information will be squeezed after the synchronization
Returns
Returns a vector of adaption::Info that can be used to track the changes done during the partitioning.

Definition at line 1385 of file patch_kernel_parallel.cpp.

◆ partition() [2/6]

std::vector< adaption::Info > bitpit::PatchKernel::partition ( const std::unordered_map< long, double > & cellWeights,
bool trackPartitioning,
bool squeezeStorage = false )

Partitions the patch among the processes. Each cell will be assigned to a specific process according to the specified input.

Parameters
cellWeightsare the weights of the cells, the weight represents the relative computational cost associated with a specified cell. If no weight is specified for a cell, a weight equal to one is used
trackPartitioningif set to true, the changes to the patch will be tracked
squeezeStorageif set to true the vector that store patch information will be squeezed after the synchronization
Returns
Returns a vector of adaption::Info that can be used to track the changes done during the partitioning.

Definition at line 1438 of file patch_kernel_parallel.cpp.

◆ partition() [3/6]

std::vector< adaption::Info > bitpit::PatchKernel::partition ( const std::unordered_map< long, int > & cellRanks,
bool trackPartitioning,
bool squeezeStorage = false )

Partitions the patch among the processes. Each cell will be assigned to a specific process according to the specified input.

Parameters
cellRanksare the ranks of the cells after the partitioning
trackPartitioningif set to true, the changes to the patch will be tracked
squeezeStorageif set to true the vector that store patch information will be squeezed after the synchronization
Returns
Returns a vector of adaption::Info that can be used to track the changes done during the partitioning.

Definition at line 1338 of file patch_kernel_parallel.cpp.

◆ partition() [4/6]

std::vector< adaption::Info > bitpit::PatchKernel::partition ( MPI_Comm communicator,
bool trackPartitioning,
bool squeezeStorage = false,
std::size_t haloSize = 1 )

Partitions the patch among the processes. The partitioning is done using a criteria that tries to balance the load among the processes.

Parameters
communicatoris the communicator that will be used
trackPartitioningif set to true, the changes to the patch will be tracked
squeezeStorageif set to true the vector that store patch information will be squeezed after the synchronization
haloSizeis the size, expressed in number of layers, of the ghost cells halo
Returns
Returns a vector of adaption::Info that can be used to track the changes done during the partitioning.

Definition at line 1363 of file patch_kernel_parallel.cpp.

◆ partition() [5/6]

std::vector< adaption::Info > bitpit::PatchKernel::partition ( MPI_Comm communicator,
const std::unordered_map< long, double > & cellWeights,
bool trackPartitioning,
bool squeezeStorage = false,
std::size_t haloSize = 1 )

Partitions the patch among the processes. Each cell will be assigned to a specific process according to the specified input.

Parameters
communicatoris the communicator that will be used
cellWeightsare the weights of the cells, the weight represents the relative computational cost associated with a specified cell. If no weight is specified for a cell, a weight equal to one is used
trackPartitioningif set to true, the changes to the patch will be tracked
squeezeStorageif set to true the vector that store patch information will be squeezed after the synchronization
haloSizeis the size, expressed in number of layers, of the ghost cells halo
Returns
Returns a vector of adaption::Info that can be used to track the changes done during the partitioning.

Definition at line 1415 of file patch_kernel_parallel.cpp.

◆ partition() [6/6]

std::vector< adaption::Info > bitpit::PatchKernel::partition ( MPI_Comm communicator,
const std::unordered_map< long, int > & cellRanks,
bool trackPartitioning,
bool squeezeStorage = false,
std::size_t haloSize = 1 )

Partitions the patch among the processes. Each cell will be assigned to a specific process according to the specified input.

Parameters
communicatoris the communicator that will be used
cellRanksare the ranks of the cells after the partitioning
trackPartitioningif set to true, the changes to the patch will be tracked
squeezeStorageif set to true the vector that store patch information will be squeezed after the synchronization
haloSizeis the size, expressed in number of layers, of the ghost cells halo
Returns
Returns a vector of adaption::Info that can be used to track the changes done during the partitioning.

Definition at line 1317 of file patch_kernel_parallel.cpp.

◆ partitioningAlter()

std::vector< adaption::Info > bitpit::PatchKernel::partitioningAlter ( bool trackPartitioning = true,
bool squeezeStorage = false )

Alter the patch performing the partitioning.

The actual modification of the patch takes place during this phase. After this phase the adaption is completed and the patch is in its final state. Optionally the patch can track the changes performed to the patch.

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

Definition at line 1619 of file patch_kernel_parallel.cpp.

◆ partitioningCleanup()

void bitpit::PatchKernel::partitioningCleanup ( )

Cleanup patch data structured after the partitioning.

The patch will only clean-up the data structures needed during the partitioning.

Definition at line 1652 of file patch_kernel_parallel.cpp.

◆ partitioningPrepare() [1/6]

std::vector< adaption::Info > bitpit::PatchKernel::partitioningPrepare ( bool trackPartitioning)

Partitions the patch among the processes. The partitioning is done using a criteria that tries to balance the load among the processes.

Parameters
trackPartitioningif set to true, the changes to the patch will be tracked
Returns
Returns a vector of adaption::Info that can be used to track the changes done during the partitioning.

Definition at line 1539 of file patch_kernel_parallel.cpp.

◆ partitioningPrepare() [2/6]

std::vector< adaption::Info > bitpit::PatchKernel::partitioningPrepare ( const std::unordered_map< long, double > & cellWeights,
bool trackPartitioning )

Partitions the patch among the processes. The partitioning is done using a criteria that tries to balance the load among the processes.

Parameters
cellWeightsare the weights of the cells, the weight represents the relative computational cost associated with a specified cell. If no weight is specified for a cell, a weight equal to one is used
trackPartitioningif set to true, the changes to the patch will be tracked
Returns
Returns a vector of adaption::Info that can be used to track the changes done during the partitioning.

Definition at line 1582 of file patch_kernel_parallel.cpp.

◆ partitioningPrepare() [3/6]

std::vector< adaption::Info > bitpit::PatchKernel::partitioningPrepare ( const std::unordered_map< long, int > & cellRanks,
bool trackPartitioning )

Partitions the patch among the processes. Each cell will be assigned to a specific process according to the specified input.

Parameters
cellRanksare the ranks of the cells after the partitioning
trackPartitioningif set to true, the changes to the patch will be tracked
Returns
Returns a vector of adaption::Info that can be used to track the changes done during the partitioning.

Definition at line 1481 of file patch_kernel_parallel.cpp.

◆ partitioningPrepare() [4/6]

std::vector< adaption::Info > bitpit::PatchKernel::partitioningPrepare ( MPI_Comm communicator,
bool trackPartitioning,
std::size_t haloSize = 1 )

Partitions the patch among the processes. The partitioning is done using a criteria that tries to balance the load among the processes.

Parameters
communicatoris the communicator that will be used
trackPartitioningif set to true, the changes to the patch will be tracked
haloSizeis the size, expressed in number of layers, of the ghost cells halo
Returns
Returns a vector of adaption::Info that can be used to track the changes done during the partitioning.

Definition at line 1519 of file patch_kernel_parallel.cpp.

◆ partitioningPrepare() [5/6]

std::vector< adaption::Info > bitpit::PatchKernel::partitioningPrepare ( MPI_Comm communicator,
const std::unordered_map< long, double > & cellWeights,
bool trackPartitioning,
std::size_t haloSize = 1 )

Partitions the patch among the processes. The partitioning is done using a criteria that tries to balance the load among the processes.

Parameters
communicatoris the communicator that will be used
cellWeightsare the weights of the cells, the weight represents the relative computational cost associated with a specified cell. If no weight is specified for a cell, a weight equal to one is used
trackPartitioningif set to true, the changes to the patch will be tracked
haloSizeis the size, expressed in number of layers, of the ghost cells halo
Returns
Returns a vector of adaption::Info that can be used to track the changes done during the partitioning.

Definition at line 1561 of file patch_kernel_parallel.cpp.

◆ partitioningPrepare() [6/6]

std::vector< adaption::Info > bitpit::PatchKernel::partitioningPrepare ( MPI_Comm communicator,
const std::unordered_map< long, int > & cellRanks,
bool trackPartitioning,
std::size_t haloSize = 1 )

Partitions the patch among the processes. The partitioning is done using a criteria that tries to balance the load among the processes.

Parameters
communicatoris the communicator that will be used
cellRanksare the ranks of the cells after the partitioning
trackPartitioningif set to true, the changes to the patch will be tracked
haloSizeis the size, expressed in number of layers, of the ghost cells halo
Returns
Returns a vector of adaption::Info that can be used to track the changes done during the partitioning.

Definition at line 1462 of file patch_kernel_parallel.cpp.

◆ processCellFaceNeighbours() [1/2]

template<typename Function >
void bitpit::PatchKernel::processCellFaceNeighbours ( long seedId,
int nLayers,
Function function ) const

Applies the specified function to all face neighbours of the provided seed.

Starting from the specified seeds, neighbours will be processed one layer after another, until the requested number of layers has been identified and processed.

Cell processing will be performed using the specified specified functor, that functor should receive in input the id of the cell to be processed and the layer the cell belongs to. The functor should return a boolean value, when the value returned by the function is true, cell processing will stop.

Parameters
seedIdis the seed
nLayersis the number of neighbour layers that will be processed
functionis a functor that will be applied

Definition at line 497 of file patch_kernel.tpp.

◆ processCellFaceNeighbours() [2/2]

template<typename Selector , typename Function >
void bitpit::PatchKernel::processCellFaceNeighbours ( long seedId,
int nLayers,
Selector selector,
Function function ) const

Applies the specified function to the selected face neighbours of the provided seed.

Neighbours are selected using the specified functor. The functor receives the id of a cell and returns true if the cell should be selected, false otherwise. The function will be evaluated only for the selected cells.

Starting from the specified seeds, neighbours will be processed one layer after another, until the requested number of layers has been identified and processed.

Cell processing will be performed using the specified specified functor, that functor should receive in input the id of the cell to be processed and the layer the cell belongs to. The functor should return a boolean value, when the value returned by the function is true, cell processing will stop.

Parameters
seedIdis the seed
nLayersis the number of neighbour layers that will be processed
functionis a functor that will be applied
selectoris a functor that controls if a neighbour is selected or not

Definition at line 530 of file patch_kernel.tpp.

◆ processCellNeighbours() [1/2]

template<typename Function >
void bitpit::PatchKernel::processCellNeighbours ( long seedId,
int nLayers,
Function function ) const

Applies the specified function to all the neighbours of the provided seed.

Starting from the specified seeds, neighbours will be processed one layer after another, until the requested number of layers has been identified and processed.

Cell processing will be performed using the specified specified functor, that functor should receive in input the id of the cell to be processed and the layer the cell belongs to. The functor should return a boolean value, when the value returned by the function is true, cell processing will stop.

Parameters
seedIdis the seed
nLayersis the number of neighbour layers that will be processed
functionis a functor that will be applied

Definition at line 332 of file patch_kernel.tpp.

◆ processCellNeighbours() [2/2]

template<typename Selector , typename Function >
void bitpit::PatchKernel::processCellNeighbours ( long seedId,
int nLayers,
Selector selector,
Function function ) const

Applies the specified function to the selected neighbours of the provided seed.

Neighbours are selected using the specified functor. The functor receives the id of a cell and returns true if the cell should be selected, false otherwise. The function will be evaluated only for the selected cells.

Starting from the specified seeds, neighbours will be processed one layer after another, until the requested number of layers has been identified and processed.

Cell processing will be performed using the specified specified functor, that functor should receive in input the id of the cell to be processed and the layer the cell belongs to. The functor should return a boolean value, when the value returned by the function is true, cell processing will stop.

Parameters
seedIdis the seed
nLayersis the number of neighbour layers that will be processed
functionis a functor that will be applied
selectoris a functor that controls if a neighbour is selected or not

Definition at line 366 of file patch_kernel.tpp.

◆ processCellsFaceNeighbours() [1/2]

template<typename Function , typename SeedContainer >
void bitpit::PatchKernel::processCellsFaceNeighbours ( const SeedContainer & seedIds,
int nLayers,
Function function ) const

Applies the specified function to all face neighbours of the provided seeds.

Starting from the specified seeds, neighbours will be processed one layer after another, until the requested number of layers has been identified and processed.

Cell processing will be performed using the specified specified functor, that functor should receive in input the id of the cell to be processed and the layer the cell belongs to. The functor should return a boolean value, when the value returned by the function is true, cell processing will stop.

Parameters
seedsare the seeds
nLayersis the number of neighbour layers that will be processed
functionis a functor that will be applied

Definition at line 587 of file patch_kernel.tpp.

◆ processCellsFaceNeighbours() [2/2]

template<typename Selector , typename Function , typename SeedContainer >
void bitpit::PatchKernel::processCellsFaceNeighbours ( const SeedContainer & seedIds,
int nLayers,
Selector selector,
Function function ) const

Applies the specified function to the selected face neighbours of the provided seeds.

Neighbours are selected using the specified functor. The functor receives the id of a cell and returns true if the cell should be selected, false otherwise. The function will be evaluated only for the selected cells.

Starting from the specified seeds, neighbours will be processed one layer after another, until the requested number of layers has been identified and processed.

Cell processing will be performed using the specified specified functor, that functor should receive in input the id of the cell to be processed and the layer the cell belongs to. The functor should return a boolean value, when the value returned by the function is true, cell processing will stop.

Parameters
seedIdsare the seeds
nLayersis the number of neighbour layers that will be processed
functionis a functor that will be applied
selectoris a functor that controls if a neighbour is selected or not

Definition at line 620 of file patch_kernel.tpp.

◆ processCellsNeighbours() [1/2]

template<typename Function , typename SeedContainer >
void bitpit::PatchKernel::processCellsNeighbours ( const SeedContainer & seeds,
int nLayers,
Function function ) const

Applies the specified function to all the neighbours of the provided seeds.

Neighbours are selected using the specified functor. The functor receives the id of a cell and returns true if the cell should be selected, false otherwise. The function will be evaluated only for the selected cells.

Starting from the specified seeds, neighbours will be processed one layer after another, until the requested number of layers has been identified and processed.

Cell processing will be performed using the specified specified functor, that functor should receive in input the id of the cell to be processed and the layer the cell belongs to. The functor should return a boolean value, when the value returned by the function is true, cell processing will stop.

Parameters
seedsare the seeds
nLayersis the number of neighbour layers that will be processed
functionis a functor that will be applied

Definition at line 408 of file patch_kernel.tpp.

◆ processCellsNeighbours() [2/2]

template<typename Selector , typename Function , typename SeedContainer >
void bitpit::PatchKernel::processCellsNeighbours ( const SeedContainer & seedIds,
int nLayers,
Selector selector,
Function function ) const

Applies the specified function to the selected neighbours of the provided seeds.

Neighbours are selected using the specified functor. The functor receives the id of a cell and returns true if the cell should be selected, false otherwise. The function will be evaluated only for the selected cells.

Starting from the specified seeds, neighbours will be processed one layer after another, until the requested number of layers has been identified and processed.

Cell processing will be performed using the specified specified functor, that functor should receive in input the id of the cell to be processed and the layer the cell belongs to. The functor should return a boolean value, when the value returned by the function is true, cell processing will stop.

Parameters
seedsare the seeds
nLayersis the number of neighbour layers that will be processed
functionis a functor that will be applied
selectoris a functor that controls if a neighbour is selected or not

Definition at line 441 of file patch_kernel.tpp.

◆ pruneStaleAdjacencies()

void bitpit::PatchKernel::pruneStaleAdjacencies ( )
protected

Prune stale adjacencies.

The list of cells to process and the list of stale adjacencies are filled during cell deletion.

Definition at line 6004 of file patch_kernel.cpp.

◆ pruneStaleInterfaces()

void bitpit::PatchKernel::pruneStaleInterfaces ( )
protected

Prune stale interfaces.

The list of cells to process and the list of stale interfaces are filled during cell deletion.

Definition at line 6484 of file patch_kernel.cpp.

◆ removePointFromBoundingBox()

void bitpit::PatchKernel::removePointFromBoundingBox ( const std::array< double, 3 > & point)
protected

Update the bounding removing the specified point.

The bounding box is not updated if it's set as frozen, or if it's in a dirty state.

Parameters
pointis the point that will be removed from to the bounding box

Definition at line 7288 of file patch_kernel.cpp.

◆ reserveCells()

bool bitpit::PatchKernel::reserveCells ( size_t nCells)

Reserve memory for cell storage.

If the reserve size is smaller than the number of cells currently stored within the patch no action will be taken.

If instead, the reserve size is greater than the current number of cells, reserve might cause re-location of the internal container into memory, potentially invalidating pointers and iterators to cell entities.

Parameters
[in]nCellsis size of memory reserve (in terms of number of cells).

Definition at line 1124 of file patch_kernel.cpp.

◆ reserveInterfaces()

bool bitpit::PatchKernel::reserveInterfaces ( size_t nInterfaces)

Reserve memory for interface storage.

If the reserve size is smaller than the number of interfaces currently stored within the patch no action will be taken.

If instead, the reserve size is greater than the current number of interfaces, reserve might cause re-location of the internal container into memory, potentially invalidating pointers and iterators to cell entities.

Parameters
[in]nInterfacesis size of memory reserve (in terms of number of interfaces).

Definition at line 1149 of file patch_kernel.cpp.

◆ reserveVertices()

bool bitpit::PatchKernel::reserveVertices ( size_t nVertices)

Reserve memory for vertex storage.

If the reserve size is smaller than the number of vertices currently stored within the patch no action will be taken.

If instead, the reserve size is greater than the current number of vertices, reserve might cause re-location of the internal container into memory, potentially invalidating pointers and iterators to vertex entities.

Parameters
[in]nVerticessize of memory reserve (in terms of number of vertices).

Definition at line 1101 of file patch_kernel.cpp.

◆ reset()

void bitpit::PatchKernel::reset ( )
virtual

Reset the patch.

Reimplemented in bitpit::VolCartesian, and bitpit::VolOctree.

Definition at line 978 of file patch_kernel.cpp.

◆ resetAdjacencies()

void bitpit::PatchKernel::resetAdjacencies ( )
protected

Reset the adjacencies.

This function doesn't change the build strategy, it only resets the existing adjacencies.

Definition at line 5968 of file patch_kernel.cpp.

◆ resetCellAdaptionMarker()

void bitpit::PatchKernel::resetCellAdaptionMarker ( long id)

Resets the adaption marker of the specified cell.

Parameters
idis the id of the cell

Definition at line 935 of file patch_kernel.cpp.

◆ resetCellAlterationFlags()

void bitpit::PatchKernel::resetCellAlterationFlags ( long id,
AlterationFlags flags = FLAG_NONE )
protected

Reset the alteration flags of the given cell.

Parameters
idis the id of the cell
flagsare the flags that will be set

Definition at line 6831 of file patch_kernel.cpp.

◆ resetCells()

void bitpit::PatchKernel::resetCells ( )
virtual

Reset the cells of the patch.

Definition at line 1011 of file patch_kernel.cpp.

◆ resetInterfaceAlterationFlags()

void bitpit::PatchKernel::resetInterfaceAlterationFlags ( long id,
AlterationFlags flags = FLAG_NONE )
protected

Reset the alteration flags of the given interface.

Parameters
idis the id of the interface
flagsare the flags that will be set

Definition at line 6910 of file patch_kernel.cpp.

◆ resetInterfaces()

void bitpit::PatchKernel::resetInterfaces ( )
virtual

Reset the interfaces of the patch.

This function doesn't change the build strategy, it only resets the existing interface.

Reimplemented in bitpit::VolCartesian.

Definition at line 1047 of file patch_kernel.cpp.

◆ resetTol()

void bitpit::PatchKernel::resetTol ( )

Resets the tolerance for geometrical checks.

Definition at line 7629 of file patch_kernel.cpp.

◆ resetVertices()

void bitpit::PatchKernel::resetVertices ( )
virtual

Reset the vertices of the patch.

Definition at line 988 of file patch_kernel.cpp.

◆ restore()

void bitpit::PatchKernel::restore ( std::istream & stream,
bool reregister = false )

Restore the patch from the specified stream.

Parameters
streamis the stream to read from
reregisteris true the patch will be unregistered and then registered again using the id found in the binary archive
Examples
POD_example_00002.cpp.

Definition at line 8322 of file patch_kernel.cpp.

◆ restoreCell()

PatchKernel::CellIterator bitpit::PatchKernel::restoreCell ( ElementType type,
std::unique_ptr< long[]> && connectStorage,
int owner,
int haloLayer,
long id )
protected

Restore the cell with the specified id.

The kernel should already contain the cell, only the contents of the cell will be updated.

Parameters
typeis the type of the cell
connectStorageis the storage the contains or will contain the connectivity of the element
owneris the rank that owns the cell that will be restored
haloLayeris the halo layer the cell belongs to, this argument is only relevant if the cell is a ghost
idis the id of the cell that will be restored
Returns
An iterator pointing to the restored cell.

Definition at line 1109 of file patch_kernel_parallel.cpp.

◆ restoreCells()

void bitpit::PatchKernel::restoreCells ( std::istream & stream)
protected

Restore the cells from the specified stream.

Parameters
streamis the stream to read from

Definition at line 5028 of file patch_kernel.cpp.

◆ restoreInterface()

PatchKernel::InterfaceIterator bitpit::PatchKernel::restoreInterface ( ElementType type,
std::unique_ptr< long[]> && connectStorage,
long id )
protected

Resore the interface with the specified id.

The kernel should already contain the interface, only the contents of the interface will be updated.

Parameters
typeis the type of the interface
connectStorageis the storage the contains or will contain the connectivity of the element
idis the id of the interface to restore
Returns
An iterator pointing to the restored interface.

Definition at line 4605 of file patch_kernel.cpp.

◆ restoreInterfaces()

void bitpit::PatchKernel::restoreInterfaces ( std::istream & stream)
protected

Restore the interfaces from the specified stream.

Parameters
streamis the stream to read from

Definition at line 5135 of file patch_kernel.cpp.

◆ restoreVertex()

PatchKernel::VertexIterator bitpit::PatchKernel::restoreVertex ( const std::array< double, 3 > & coords,
int owner,
long id )
protected

Restore the vertex with the specified id.

The kernel should already contain the vertex, only the contents of the vertex will be updated.

Parameters
coordsare the coordinates of the vertex
owneris the rank that owns the vertex that will be restored
idis the id of the vertex that will be restored
Returns
An iterator pointing to the restored vertex.

Definition at line 470 of file patch_kernel_parallel.cpp.

◆ restoreVertices()

void bitpit::PatchKernel::restoreVertices ( std::istream & stream)
protected

Restore the vertices from the specified stream.

Parameters
streamis the stream to read from

Definition at line 4927 of file patch_kernel.cpp.

◆ rotate() [1/2]

void bitpit::PatchKernel::rotate ( const std::array< double, 3 > & n0,
const std::array< double, 3 > & n1,
double angle )
virtual

Rotates the patch.

Parameters
[in]n0is a first point on the rotation axis
[in]n1is a second point on the rotation axis
[in]angleis the rotation angle, expressed in radiants and positive for counterclockwise rotations

Reimplemented in bitpit::VolCartesian.

Definition at line 7455 of file patch_kernel.cpp.

◆ rotate() [2/2]

void bitpit::PatchKernel::rotate ( double n0x,
double n0y,
double n0z,
double n1x,
double n1y,
double n1z,
double angle )

Rotates the patch.

Parameters
[in]n0xis the x-component of a first point on the rotation axis
[in]n0yis the y-component of a first point on the rotation axis
[in]n0zis the z-component of a first point on the rotation axis
[in]n1xis the x-component of a second point on the rotation axis
[in]n1yis the y-component of a second point on the rotation axis
[in]n1zis the z-component of a second point on the rotation axis
[in]angleis the rotation angle, expressed in radiants. Counterclockwise rotations are considered positive.

Definition at line 7502 of file patch_kernel.cpp.

◆ scale() [1/6]

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

Scales the patch.

The patch is scaled about the lower-left point of the bounding box.

Parameters
[in]scalingis the scaling factor vector

Definition at line 7515 of file patch_kernel.cpp.

◆ scale() [2/6]

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

Scales the patch.

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

Reimplemented in bitpit::VolCartesian, and bitpit::VolOctree.

Definition at line 7526 of file patch_kernel.cpp.

◆ scale() [3/6]

void bitpit::PatchKernel::scale ( double scaling)

Scales the patch.

The patch is scaled about the lower-left point of the bounding box.

Parameters
[in]scalingis the scaling factor

Definition at line 7549 of file patch_kernel.cpp.

◆ scale() [4/6]

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

Scales the patch.

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

Definition at line 7560 of file patch_kernel.cpp.

◆ scale() [5/6]

void bitpit::PatchKernel::scale ( double sx,
double sy,
double sz )

Scales the patch.

Parameters
[in]sxscaling factor along x direction
[in]syscaling factor along y direction
[in]szscaling factor along z direction

Definition at line 7572 of file patch_kernel.cpp.

◆ scale() [6/6]

void bitpit::PatchKernel::scale ( double sx,
double sy,
double sz,
const std::array< double, 3 > & center )

Scales the patch.

The patch is scaled about the lower-left point of the bounding box.

Parameters
[in]sxscaling factor along x direction
[in]syscaling factor along y direction
[in]szscaling factor along z direction
[in]centeris the center of the scaling

Definition at line 7587 of file patch_kernel.cpp.

◆ setAdaptionStatus()

void bitpit::PatchKernel::setAdaptionStatus ( AdaptionStatus status)
protected

Set the current adaption status.

Parameters
statusis the adaption status that will be set

Definition at line 1364 of file patch_kernel.cpp.

◆ setAdjacenciesBuildStrategy()

void bitpit::PatchKernel::setAdjacenciesBuildStrategy ( AdjacenciesBuildStrategy status)
protected

Set the current adjacencies build strategy.

Parameters
statusis the adjacencies build strategy that will be set

Definition at line 5820 of file patch_kernel.cpp.

◆ setBoundingBox()

void bitpit::PatchKernel::setBoundingBox ( const std::array< double, 3 > & minPoint,
const std::array< double, 3 > & maxPoint )
protected

Sets the bounding box.

The box will be set also if it declared frozen.

Parameters
minPointthe minimum point of the patch
maxPointthe maximum point of the patch

Definition at line 7116 of file patch_kernel.cpp.

◆ setBoundingBoxDirty()

void bitpit::PatchKernel::setBoundingBoxDirty ( bool dirty)
protected

Sets if the bounding box is dirty.

Parameters
dirtycontrols if the bounding box will be set as dirty

Definition at line 7211 of file patch_kernel.cpp.

◆ setBoundingBoxFrozen()

void bitpit::PatchKernel::setBoundingBoxFrozen ( bool frozen)
protected

Sets the bounding box as frozen.

When the bounding box is frozen it won't be updated on insertion/deletion of vertices, neither when the function to update the bounding box is called. The only way to change a frozen bounding box is the usage of the functions that explicitly sets the bounding box.

Parameters
frozencontrols if the bounding box will be set as frozen

Definition at line 7179 of file patch_kernel.cpp.

◆ setCellAlterationFlags() [1/2]

void bitpit::PatchKernel::setCellAlterationFlags ( AlterationFlags flags)
protected

Set the specified alteration flags for all the cells.

Parameters
flagsare the flags that will be set

Definition at line 6841 of file patch_kernel.cpp.

◆ setCellAlterationFlags() [2/2]

void bitpit::PatchKernel::setCellAlterationFlags ( long id,
AlterationFlags flags )
protected

Set the specified alteration flags for the given cell.

Parameters
idis the id of the cell
flagsare the flags that will be set

Definition at line 6855 of file patch_kernel.cpp.

◆ setCellAutoIndexing()

void bitpit::PatchKernel::setCellAutoIndexing ( bool enabled)

Enables or disables auto-indexing for cells.

When auto-indexing is disabled, ids for newly added cells has to be manually specified.

Parameters
enabledif set to true the auto-indexing will be enabled

Definition at line 2445 of file patch_kernel.cpp.

◆ setCommunicator()

void bitpit::PatchKernel::setCommunicator ( MPI_Comm communicator)
protectedvirtual

Sets the MPI communicator to be used for parallel communications.

Parameters
communicatoris the communicator to be used for parallel communications.

Reimplemented in bitpit::VolOctree.

Definition at line 96 of file patch_kernel_parallel.cpp.

◆ setDimension()

void bitpit::PatchKernel::setDimension ( int dimension)
virtual

Sets the dimension of the patch.

Parameters
dimensionthe dimension of the patch

Reimplemented in bitpit::VolOctree.

Definition at line 1512 of file patch_kernel.cpp.

◆ setExpert()

void bitpit::PatchKernel::setExpert ( bool expert)
protected

Enables or disables expert mode.

When expert mode is enabled, it will be possible to change the patch using low level functions (e.g., it will be possible to add individual cells, add vertices, delete cells, ...).

Parameters
expertif true, the expert mode will be enabled

Definition at line 1448 of file patch_kernel.cpp.

◆ setHaloSize()

void bitpit::PatchKernel::setHaloSize ( std::size_t haloSize)

Sets 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

Definition at line 285 of file patch_kernel_parallel.cpp.

◆ setId()

void bitpit::PatchKernel::setId ( int id)

Sets the id of the patch.

Parameters
idthe id of the patch

Definition at line 1477 of file patch_kernel.cpp.

◆ setInterfaceAlterationFlags() [1/2]

void bitpit::PatchKernel::setInterfaceAlterationFlags ( AlterationFlags flags)
protected

Set the specified alteration flags for all the interfaces.

Parameters
flagsare the flags that will be set

Definition at line 6920 of file patch_kernel.cpp.

◆ setInterfaceAlterationFlags() [2/2]

void bitpit::PatchKernel::setInterfaceAlterationFlags ( long id,
AlterationFlags flags )
protected

Set the specified alteration flags for the given interface.

Parameters
idis the id of the interface
flagsare the flags that will be set

Definition at line 6934 of file patch_kernel.cpp.

◆ setInterfaceAutoIndexing()

void bitpit::PatchKernel::setInterfaceAutoIndexing ( bool enabled)

Enables or disables auto-indexing for interfaces.

When auto-indexing is disabled, ids for newly added interfaces has to be manually specified.

Auto-indexing cannot be disabled if interfaces build strategy is set to "automatic".

Parameters
enabledif set to true the auto-indexing will be enabled

Definition at line 4186 of file patch_kernel.cpp.

◆ setInterfacesBuildStrategy()

void bitpit::PatchKernel::setInterfacesBuildStrategy ( InterfacesBuildStrategy status)
protected

Set the current interfaces build strategy.

Parameters
statusis the interfaces build strategy that will be set

Definition at line 6305 of file patch_kernel.cpp.

◆ setPartitioningStatus()

void bitpit::PatchKernel::setPartitioningStatus ( PartitioningStatus status)
protected

Set the current partitioning status.

Parameters
statusis the partitioning status that will be set

Definition at line 1724 of file patch_kernel_parallel.cpp.

◆ setSpawnStatus()

void bitpit::PatchKernel::setSpawnStatus ( SpawnStatus status)
protected

Set the current spawn status.

Parameters
statusis the spawn status that will be set

Definition at line 1320 of file patch_kernel.cpp.

◆ settleAdaptionMarkers()

void bitpit::PatchKernel::settleAdaptionMarkers ( )
virtual

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

Reimplemented in bitpit::VolOctree.

Definition at line 839 of file patch_kernel.cpp.

◆ setTol()

void bitpit::PatchKernel::setTol ( double tolerance)

Sets the tolerance for the geometrical checks.

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

Definition at line 7598 of file patch_kernel.cpp.

◆ setVertexAutoIndexing()

void bitpit::PatchKernel::setVertexAutoIndexing ( bool enabled)

Enables or disables auto-indexing for vertices.

When auto-indexing is disabled, ids for newly added vertices has to be manually specified.

Parameters
enabledif set to true the auto-indexing will be enabled

Definition at line 1568 of file patch_kernel.cpp.

◆ setVTKWriteTarget()

void bitpit::PatchKernel::setVTKWriteTarget ( WriteTarget writeTarget)

Set the VTK write target.

Parameters
writeTargetis the VTK write target.

Definition at line 7829 of file patch_kernel.cpp.

◆ simulateCellUpdate()

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

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 the outcome of the update
[out]virtualVerticesare the virtual vertices that would be the outcome of the update

Reimplemented in bitpit::VolOctree.

Definition at line 660 of file patch_kernel.cpp.

◆ sort()

bool bitpit::PatchKernel::sort ( )

Sorts internal storage for cells, vertices and interfaces in ascending id order.

Definition at line 5413 of file patch_kernel.cpp.

◆ sortCells()

bool bitpit::PatchKernel::sortCells ( )

Sorts cell storage in ascending id order.

Internal cells and ghost cells are sordered separately.

Definition at line 5367 of file patch_kernel.cpp.

◆ sortInterfaces()

bool bitpit::PatchKernel::sortInterfaces ( )

Sorts internal interface storage in ascending id order.

Definition at line 5396 of file patch_kernel.cpp.

◆ sortVertices()

bool bitpit::PatchKernel::sortVertices ( )

Sorts internal vertex storage in ascending id order.

Definition at line 5336 of file patch_kernel.cpp.

◆ spawn()

std::vector< adaption::Info > bitpit::PatchKernel::spawn ( bool trackSpawn)

Generates the patch.

Parameters
trackSpawnif set to true the changes to the patch will be tracked
Returns
Returns a vector of adaption::Info that can be used to track the changes done during the spawn.

Definition at line 677 of file patch_kernel.cpp.

◆ squeeze()

bool bitpit::PatchKernel::squeeze ( )

Requests the patch to compact the data structures and reduce its capacity to fit its size.

The request is non-binding, and after the function call the patch can still occupy more memory than it actually needs.

Definition at line 5489 of file patch_kernel.cpp.

◆ squeezeCells()

bool bitpit::PatchKernel::squeezeCells ( )

Requests the patch to compact the cell data structure and reduce its capacity to fit its size.

The request is non-binding, and after the function call the cell data structure can still occupy more memory than it actually needs.

Definition at line 5449 of file patch_kernel.cpp.

◆ squeezeInterfaces()

bool bitpit::PatchKernel::squeezeInterfaces ( )

Requests the patch to compact the interface data structure and reduce its capacity to fit its size.

The request is non-binding, and after the function call the interface data structure can still occupy more memory than it actually needs.

Definition at line 5469 of file patch_kernel.cpp.

◆ squeezeVertices()

bool bitpit::PatchKernel::squeezeVertices ( )

Requests the patch to compact the vertex data structure and reduce its capacity to fit its size.

The request is non-binding, and after the function call the vertex data structure can still occupy more memory than it actually needs.

Definition at line 5429 of file patch_kernel.cpp.

◆ testAlterationFlags()

bool bitpit::PatchKernel::testAlterationFlags ( AlterationFlags availableFlags,
AlterationFlags requestedFlags ) const
protected

Test if the requested alteration flags are among the available flags.

Parameters
availableFlagsare the available flags
requestedFlagsare the requested flags
Returns
Return true if the flags are set, false otherwise.

Definition at line 6985 of file patch_kernel.cpp.

◆ testCellAlterationFlags()

bool bitpit::PatchKernel::testCellAlterationFlags ( long id,
AlterationFlags flags ) const
protected

Test the specified alteration flags for the given cell.

Parameters
idis the id of the cell
flagsare the flags that will be tested
Returns
Return true if the flags are set, false otherwise.

Definition at line 6809 of file patch_kernel.cpp.

◆ testInterfaceAlterationFlags()

bool bitpit::PatchKernel::testInterfaceAlterationFlags ( long id,
AlterationFlags flags ) const
protected

Test the specified alteration flags for the given interface.

Parameters
idis the id of the interface
flagsare the flags that will be tested
Returns
Return true if the flags are set, false otherwise.

Definition at line 6888 of file patch_kernel.cpp.

◆ translate() [1/2]

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

Translates the patch.

Parameters
[in]translationis the translation vector

Reimplemented in bitpit::VolCartesian, and bitpit::VolOctree.

Definition at line 7421 of file patch_kernel.cpp.

◆ translate() [2/2]

void bitpit::PatchKernel::translate ( double sx,
double sy,
double sz )

Translates the patch.

Parameters
[in]sxtranslation along x direction
[in]sytranslation along y direction
[in]sztranslation along z direction

Definition at line 7442 of file patch_kernel.cpp.

◆ unsetCellAlterationFlags() [1/2]

void bitpit::PatchKernel::unsetCellAlterationFlags ( AlterationFlags flags)
protected

Unset the specified alteration flags for all the altered cells.

Parameters
flagsare the flags that will be unset

Definition at line 6865 of file patch_kernel.cpp.

◆ unsetCellAlterationFlags() [2/2]

void bitpit::PatchKernel::unsetCellAlterationFlags ( long id,
AlterationFlags flags )
protected

Unset the specified alteration flags for the given cell.

Parameters
idis the id of the cell
flagsare the flags that will be unset

Definition at line 6876 of file patch_kernel.cpp.

◆ unsetInterfaceAlterationFlags() [1/2]

void bitpit::PatchKernel::unsetInterfaceAlterationFlags ( AlterationFlags flags)
protected

Unset the specified alteration flags for all the altered interfaces.

Parameters
flagsare the flags that will be unset

Definition at line 6944 of file patch_kernel.cpp.

◆ unsetInterfaceAlterationFlags() [2/2]

void bitpit::PatchKernel::unsetInterfaceAlterationFlags ( long id,
AlterationFlags flags )
protected

Unset the specified alteration flags for the given interface.

Parameters
idis the id of the interface
flagsare the flags that will be unset

Definition at line 6955 of file patch_kernel.cpp.

◆ update()

std::vector< adaption::Info > bitpit::PatchKernel::update ( bool trackAdaption = true,
bool squeezeStorage = false )

Commit all pending changes.

Parameters
trackAdaptionif set to true the changes to the patch will be tracked
squeezeStorageif set to true patch data structures will be squeezed after the update
Returns
Returns a vector of adaption::Info that can be used to track the changes done during the update.
Examples
volcartesian_example_00001.cpp.

Definition at line 620 of file patch_kernel.cpp.

◆ updateAdjacencies()

void bitpit::PatchKernel::updateAdjacencies ( bool forcedUpdated = false)

Update the adjacencies of the patch.

Parameters
forcedUpdatedif set to true, bounding box information will be updated also if they are not marked as dirty

Definition at line 5910 of file patch_kernel.cpp.

◆ updateBoundingBox()

void bitpit::PatchKernel::updateBoundingBox ( bool forcedUpdated = false)

Updates the stored patch bounding box.

Parameters
forcedUpdatedif set to true, bounding box information will be updated also if they are not marked as dirty

Definition at line 7222 of file patch_kernel.cpp.

◆ updateFirstGhostCellId()

void bitpit::PatchKernel::updateFirstGhostCellId ( )
protected

Updates the id of the first ghost cell.

Definition at line 1290 of file patch_kernel_parallel.cpp.

◆ updateFirstGhostVertexId()

void bitpit::PatchKernel::updateFirstGhostVertexId ( )
protected

Updates the id of the first ghost vertex.

Definition at line 598 of file patch_kernel_parallel.cpp.

◆ updateInterfaces()

void bitpit::PatchKernel::updateInterfaces ( bool forcedUpdated = false)

Update the interfaces of the patch.

Parameters
forcedUpdatedif set to true, bounding box information will be updated also if they are not marked as dirty

Definition at line 6411 of file patch_kernel.cpp.

◆ updateLastInternalCellId()

void bitpit::PatchKernel::updateLastInternalCellId ( )
protected

Updates the id of the last internal cell.

Definition at line 3364 of file patch_kernel.cpp.

◆ updateLastInternalVertexId()

void bitpit::PatchKernel::updateLastInternalVertexId ( )
protected

Updates the id of the last internal vertex.

Definition at line 2403 of file patch_kernel.cpp.

◆ vertexBegin()

PatchKernel::VertexIterator bitpit::PatchKernel::vertexBegin ( )

Returns iterator pointing to the first vertex.

Returns
An iterator to the first vertex.

Definition at line 1743 of file patch_kernel.cpp.

◆ vertexConstBegin()

PatchKernel::VertexConstIterator bitpit::PatchKernel::vertexConstBegin ( ) const

Returns a constant iterator pointing to the first vertex.

Returns
A constant iterator to the first vertex.

Definition at line 1797 of file patch_kernel.cpp.

◆ vertexConstEnd()

PatchKernel::VertexConstIterator bitpit::PatchKernel::vertexConstEnd ( ) const

Returns a constant iterator pointing to last vertex.

Returns
A constant iterator to the last vertex.

Definition at line 1807 of file patch_kernel.cpp.

◆ vertexEnd()

PatchKernel::VertexIterator bitpit::PatchKernel::vertexEnd ( )

Returns iterator pointing to last vertex.

Returns
An iterator to the last vertex.

Definition at line 1753 of file patch_kernel.cpp.

◆ write() [1/4]

void bitpit::PatchKernel::write ( const std::string & filename,
VTKWriteMode mode,
double time )

Writes the patch to filename specified in input.

Parameters
filenamethe filename where the patch will be written to
modeis the VTK file mode that will be used for writing the patch
timeis the current time

Definition at line 1182 of file patch_kernel.cpp.

◆ write() [2/4]

void bitpit::PatchKernel::write ( const std::string & filename,
VTKWriteMode mode = VTKWriteMode::DEFAULT )

Writes the patch to filename specified in input.

Parameters
filenamethe filename where the patch will be written to
modeis the VTK file mode that will be used for writing the patch

Definition at line 1166 of file patch_kernel.cpp.

◆ write() [3/4]

void bitpit::PatchKernel::write ( VTKWriteMode mode,
double time )

Writes the patch a filename with the same name of the patch.

Parameters
modeis the VTK file mode that will be used for writing the patch
timeis the current time

Definition at line 1211 of file patch_kernel.cpp.

◆ write() [4/4]

void bitpit::PatchKernel::write ( VTKWriteMode mode = VTKWriteMode::DEFAULT)

Writes the patch to filename specified in input.

Parameters
modeis the VTK file mode that will be used for writing the patch
Examples
volcartesian_example_00001.cpp.

Definition at line 1196 of file patch_kernel.cpp.

Friends And Related Symbol Documentation

◆ PatchGlobalInfo

friend class PatchGlobalInfo
friend

Definition at line 59 of file patch_kernel.hpp.

◆ PatchInfo

friend class PatchInfo
friend

Definition at line 56 of file patch_kernel.hpp.

◆ PatchManager

friend class PatchManager
friend

Definition at line 61 of file patch_kernel.hpp.

◆ PatchNumberingInfo

friend class PatchNumberingInfo
friend

Definition at line 57 of file patch_kernel.hpp.

Member Data Documentation

◆ DEFAULT_PARTITIONING_WEIGTH

const double bitpit::PatchKernel::DEFAULT_PARTITIONING_WEIGTH = 1.
staticprotected

Default cell weight used for patch partitioning

Definition at line 786 of file patch_kernel.hpp.

◆ FLAG_ADJACENCIES_DIRTY

const AlterationFlags bitpit::PatchKernel::FLAG_ADJACENCIES_DIRTY = (1u << 1)
staticprotected

Definition at line 791 of file patch_kernel.hpp.

◆ FLAG_DANGLING

const AlterationFlags bitpit::PatchKernel::FLAG_DANGLING = (1u << 3)
staticprotected

Definition at line 793 of file patch_kernel.hpp.

◆ FLAG_DELETED

const AlterationFlags bitpit::PatchKernel::FLAG_DELETED = (1u << 0)
staticprotected

Definition at line 790 of file patch_kernel.hpp.

◆ FLAG_INTERFACES_DIRTY

const AlterationFlags bitpit::PatchKernel::FLAG_INTERFACES_DIRTY = (1u << 2)
staticprotected

Definition at line 792 of file patch_kernel.hpp.

◆ FLAG_NONE

const AlterationFlags bitpit::PatchKernel::FLAG_NONE = 0x0
staticprotected

Definition at line 789 of file patch_kernel.hpp.

◆ m_alteredCells

AlterationFlagsStorage bitpit::PatchKernel::m_alteredCells
protected

Definition at line 799 of file patch_kernel.hpp.

◆ m_alteredInterfaces

AlterationFlagsStorage bitpit::PatchKernel::m_alteredInterfaces
protected

Definition at line 800 of file patch_kernel.hpp.

◆ m_cells

PiercedVector<Cell> bitpit::PatchKernel::m_cells
protected

Definition at line 796 of file patch_kernel.hpp.

◆ m_interfaces

PiercedVector<Interface> bitpit::PatchKernel::m_interfaces
protected

Definition at line 797 of file patch_kernel.hpp.

◆ m_vertices

PiercedVector<Vertex> bitpit::PatchKernel::m_vertices
protected

Definition at line 795 of file patch_kernel.hpp.


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