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


Classes | |
struct | CellFuzzyPositionGreater |
struct | CellFuzzyPositionLess |
struct | CellPositionGreater |
struct | CellPositionLess |
struct | PointPositionLess |
struct | VertexPositionGreater |
struct | VertexPositionLess |
Public Types | |
enum | AdaptionMode { ADAPTION_DISABLED = -1 , ADAPTION_AUTOMATIC , ADAPTION_MANUAL } |
enum | AdaptionStatus { ADAPTION_CLEAN , ADAPTION_DIRTY , ADAPTION_PREPARED , ADAPTION_ALTERED } |
enum | AdjacenciesBuildStrategy { ADJACENCIES_NONE = -1 , ADJACENCIES_AUTOMATIC } |
typedef PiercedVector< Cell >::const_iterator | CellConstIterator |
typedef PiercedVector< Cell >::const_range | CellConstRange |
typedef PiercedVector< Cell >::iterator | CellIterator |
typedef PiercedVector< Cell >::range | CellRange |
typedef PiercedVector< Interface >::const_iterator | InterfaceConstIterator |
typedef PiercedVector< Interface >::const_range | InterfaceConstRange |
typedef PiercedVector< Interface >::iterator | InterfaceIterator |
typedef PiercedVector< Interface >::range | InterfaceRange |
enum | InterfacesBuildStrategy { INTERFACES_NONE = -1 , INTERFACES_AUTOMATIC } |
enum | PartitioningMode { PARTITIONING_DISABLED = -1 , PARTITIONING_ENABLED } |
enum | PartitioningStatus { PARTITIONING_CLEAN , PARTITIONING_PREPARED , PARTITIONING_ALTERED } |
typedef PiercedVector< Vertex >::const_iterator | VertexConstIterator |
typedef PiercedVector< Vertex >::const_range | VertexConstRange |
typedef PiercedVector< Vertex >::iterator | VertexIterator |
typedef PiercedVector< Vertex >::range | VertexRange |
enum | WriteTarget { WRITE_TARGET_CELLS_ALL , WRITE_TARGET_CELLS_INTERNAL } |
Public Member Functions | |
PatchKernel (PatchKernel &&other) | |
virtual | ~PatchKernel () |
std::vector< adaption::Info > | adaption (bool trackAdaption=true, bool squeezeStorage=false) |
std::vector< adaption::Info > | adaptionAlter (bool trackAdaption=true, bool squeezeStorage=false) |
void | adaptionCleanup () |
std::vector< adaption::Info > | adaptionPrepare (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< PatchKernel > | clone () 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 |
AdaptionMode | getAdaptionMode () const |
AdaptionStatus | getAdaptionStatus (bool global=false) const |
AdjacenciesBuildStrategy | getAdjacenciesBuildStrategy () const |
void | getBoundingBox (bool global, std::array< double, 3 > &minPoint, std::array< double, 3 > &maxPoint) const |
void | getBoundingBox (std::array< double, 3 > &minPoint, std::array< double, 3 > &maxPoint) const |
Cell & | getCell (long id) |
const Cell & | getCell (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 |
Cell & | getFirstGhost () |
const Cell & | getFirstGhost () const |
Cell & | getFirstGhostCell () |
const Cell & | getFirstGhostCell () const |
Vertex & | getFirstGhostVertex () |
const Vertex & | getFirstGhostVertex () 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 |
Interface & | getInterface (long id) |
const Interface & | getInterface (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 |
Cell & | getLastInternalCell () |
const Cell & | getLastInternalCell () const |
Vertex & | getLastInternalVertex () |
const Vertex & | getLastInternalVertex () const |
virtual int | getLineCodimension () const =0 |
std::vector< int > | getNeighbourRanks () |
int | getOwner (bool allowDirty=false) const |
PartitioningMode | getPartitioningMode () const |
PartitioningStatus | getPartitioningStatus (bool global=false) const |
virtual int | getPointCodimension () const =0 |
int | getProcessorCount () const |
int | getRank () const |
virtual int | getSurfaceCodimension () const =0 |
double | getTol () const |
Vertex & | getVertex (long id) |
const Vertex & | getVertex (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 |
VTKUnstructuredGrid & | getVTK () |
const VTKUnstructuredGrid & | getVTK () const |
const CellConstRange | getVTKCellWriteRange () const |
WriteTarget | getVTKWriteTarget () const |
CellIterator | ghostBegin () |
CellIterator | ghostCell2InternalCell (long id) |
CellIterator | ghostCellBegin () |
CellConstIterator | ghostCellConstBegin () const |
CellConstIterator | ghostCellConstEnd () const |
CellIterator | ghostCellEnd () |
CellConstIterator | ghostConstBegin () const |
CellConstIterator | ghostConstEnd () const |
CellIterator | ghostEnd () |
VertexIterator | ghostVertexBegin () |
VertexConstIterator | ghostVertexConstBegin () const |
VertexConstIterator | ghostVertexConstEnd () const |
VertexIterator | ghostVertexEnd () |
void | initializeAdjacencies (AdjacenciesBuildStrategy strategy=ADJACENCIES_AUTOMATIC) |
void | initializeInterfaces (InterfacesBuildStrategy strategy=INTERFACES_AUTOMATIC) |
InterfaceIterator | interfaceBegin () |
InterfaceConstIterator | interfaceConstBegin () const |
InterfaceConstIterator | interfaceConstEnd () const |
InterfaceIterator | interfaceEnd () |
CellIterator | internalBegin () |
CellIterator | internalCell2GhostCell (long id, int owner, int haloLayer) |
CellIterator | internalCellBegin () |
CellConstIterator | internalCellConstBegin () const |
CellConstIterator | internalCellConstEnd () const |
CellIterator | internalCellEnd () |
CellConstIterator | internalConstBegin () const |
CellConstIterator | internalConstEnd () const |
CellIterator | internalEnd () |
VertexIterator | internalVertexBegin () |
VertexConstIterator | internalVertexConstBegin () const |
VertexConstIterator | internalVertexConstEnd () const |
VertexIterator | internalVertexEnd () |
bool | intersectInterfacePlane (long id, std::array< double, 3 > P, std::array< double, 3 > nP, std::array< std::array< double, 3 >, 2 > *intersection, std::vector< std::array< double, 3 > > *polygon) const |
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) |
PatchKernel & | operator= (PatchKernel &&other) |
std::vector< adaption::Info > | partition (bool trackPartitioning, bool squeezeStorage=false) |
std::vector< adaption::Info > | partition (const std::unordered_map< long, double > &cellWeights, bool trackPartitioning, bool squeezeStorage=false) |
std::vector< adaption::Info > | partition (const std::unordered_map< long, int > &cellRanks, bool trackPartitioning, bool squeezeStorage=false) |
std::vector< adaption::Info > | partition (MPI_Comm communicator, bool trackPartitioning, bool squeezeStorage=false, std::size_t haloSize=1) |
std::vector< adaption::Info > | partition (MPI_Comm communicator, const std::unordered_map< long, double > &cellWeights, bool trackPartitioning, bool squeezeStorage=false, std::size_t haloSize=1) |
std::vector< adaption::Info > | partition (MPI_Comm communicator, const std::unordered_map< long, int > &cellRanks, bool trackPartitioning, bool squeezeStorage=false, std::size_t haloSize=1) |
std::vector< adaption::Info > | partitioningAlter (bool trackPartitioning=true, bool squeezeStorage=false) |
void | partitioningCleanup () |
std::vector< adaption::Info > | partitioningPrepare (bool trackPartitioning) |
std::vector< adaption::Info > | partitioningPrepare (const std::unordered_map< long, double > &cellWeights, bool trackPartitioning) |
std::vector< adaption::Info > | partitioningPrepare (const std::unordered_map< long, int > &cellRanks, bool trackPartitioning) |
std::vector< adaption::Info > | partitioningPrepare (MPI_Comm communicator, bool trackPartitioning, std::size_t haloSize=1) |
std::vector< adaption::Info > | partitioningPrepare (MPI_Comm communicator, const std::unordered_map< long, double > &cellWeights, bool trackPartitioning, std::size_t haloSize=1) |
std::vector< adaption::Info > | partitioningPrepare (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 () |
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::Info > | update (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) |
![]() | |
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, AdaptionMode adaptionMode, PartitioningMode partitioningMode) | |
PatchKernel (int id, int dimension, MPI_Comm communicator, std::size_t haloSize, AdaptionMode adaptionMode, PartitioningMode partitioningMode) | |
PatchKernel (MPI_Comm communicator, std::size_t haloSize, AdaptionMode adaptionMode, PartitioningMode partitioningMode) | |
virtual 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 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) |
PatchKernel & | operator= (const PatchKernel &other)=delete |
void | pruneStaleAdjacencies () |
void | pruneStaleInterfaces () |
void | removePointFromBoundingBox (const std::array< double, 3 > &point) |
void | resetAdjacencies () |
void | resetCellAlterationFlags (long id, AlterationFlags flags=FLAG_NONE) |
void | resetInterfaceAlterationFlags (long id, AlterationFlags flags=FLAG_NONE) |
CellIterator | restoreCell (ElementType type, std::unique_ptr< long[]> &&connectStorage, int owner, int haloLayer, long id) |
void | restoreCells (std::istream &stream) |
InterfaceIterator | restoreInterface (ElementType type, std::unique_ptr< long[]> &&connectStorage, long id) |
void | restoreInterfaces (std::istream &stream) |
VertexIterator | restoreVertex (const std::array< double, 3 > &coords, int owner, long id) |
void | restoreVertices (std::istream &stream) |
void | setAdaptionMode (AdaptionMode mode) |
void | setAdaptionStatus (AdaptionStatus status) |
void | setAdjacenciesBuildStrategy (AdjacenciesBuildStrategy status) |
void | setBoundingBox (const std::array< double, 3 > &minPoint, const std::array< double, 3 > &maxPoint) |
void | setBoundingBoxDirty (bool dirty) |
void | setBoundingBoxFrozen (bool frozen) |
void | setCellAlterationFlags (AlterationFlags flags) |
void | setCellAlterationFlags (long id, AlterationFlags flags) |
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 | setPartitioningMode (PartitioningMode mode) |
void | setPartitioningStatus (PartitioningStatus status) |
bool | testAlterationFlags (AlterationFlags availableFlags, AlterationFlags requestedFlags) const |
bool | testCellAlterationFlags (long id, AlterationFlags flags) const |
bool | testInterfaceAlterationFlags (long id, AlterationFlags flags) const |
void | unsetCellAlterationFlags (AlterationFlags flags) |
void | unsetCellAlterationFlags (long id, AlterationFlags flags) |
void | unsetInterfaceAlterationFlags (AlterationFlags flags) |
void | unsetInterfaceAlterationFlags (long id, AlterationFlags flags) |
void | updateFirstGhostCellId () |
void | updateFirstGhostVertexId () |
void | updateLastInternalCellId () |
void | updateLastInternalVertexId () |
Protected Attributes | |
AlterationFlagsStorage | m_alteredCells |
AlterationFlagsStorage | m_alteredInterfaces |
PiercedVector< Cell > | m_cells |
PiercedVector< Interface > | m_interfaces |
PiercedVector< Vertex > | m_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.
Definition at line 54 of file patch_kernel.hpp.
Member Typedef Documentation
◆ AlterationFlags
|
protected |
Definition at line 793 of file patch_kernel.hpp.
◆ AlterationFlagsStorage
|
protected |
Definition at line 794 of file patch_kernel.hpp.
◆ CellConstIterator
typedef PiercedVector<Cell>::const_iterator bitpit::PatchKernel::CellConstIterator |
Definition at line 69 of file patch_kernel.hpp.
◆ CellConstRange
typedef PiercedVector<Cell>::const_range bitpit::PatchKernel::CellConstRange |
Definition at line 77 of file patch_kernel.hpp.
◆ CellIterator
typedef PiercedVector<Cell>::iterator bitpit::PatchKernel::CellIterator |
Definition at line 65 of file patch_kernel.hpp.
◆ CellRange
typedef PiercedVector<Cell>::range bitpit::PatchKernel::CellRange |
Definition at line 73 of file patch_kernel.hpp.
◆ InterfaceConstIterator
typedef PiercedVector<Interface>::const_iterator bitpit::PatchKernel::InterfaceConstIterator |
Definition at line 70 of file patch_kernel.hpp.
◆ InterfaceConstRange
typedef PiercedVector<Interface>::const_range bitpit::PatchKernel::InterfaceConstRange |
Definition at line 78 of file patch_kernel.hpp.
◆ InterfaceIterator
typedef PiercedVector<Interface>::iterator bitpit::PatchKernel::InterfaceIterator |
Definition at line 66 of file patch_kernel.hpp.
◆ InterfaceRange
typedef PiercedVector<Interface>::range bitpit::PatchKernel::InterfaceRange |
Definition at line 74 of file patch_kernel.hpp.
◆ VertexConstIterator
typedef PiercedVector<Vertex>::const_iterator bitpit::PatchKernel::VertexConstIterator |
Definition at line 68 of file patch_kernel.hpp.
◆ VertexConstRange
typedef PiercedVector<Vertex>::const_range bitpit::PatchKernel::VertexConstRange |
Definition at line 76 of file patch_kernel.hpp.
◆ VertexIterator
typedef PiercedVector<Vertex>::iterator bitpit::PatchKernel::VertexIterator |
Definition at line 64 of file patch_kernel.hpp.
◆ VertexRange
typedef PiercedVector<Vertex>::range bitpit::PatchKernel::VertexRange |
Definition at line 72 of file patch_kernel.hpp.
Member Enumeration Documentation
◆ AdaptionMode
Adaption mode
Definition at line 335 of file patch_kernel.hpp.
◆ AdaptionStatus
Adaption status
Definition at line 348 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.
◆ PartitioningMode
Partitioning mode
Enumerator | |
---|---|
PARTITIONING_ENABLED | No partitioning can be performed. The patch can be partitioned across the processes |
Definition at line 358 of file patch_kernel.hpp.
◆ PartitioningStatus
Partitioning status
Definition at line 366 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
-
other is another patch whose content is moved into this
Definition at line 295 of file patch_kernel.cpp.
◆ ~PatchKernel()
|
virtual |
Destroys the patch.
Definition at line 601 of file patch_kernel.cpp.
◆ PatchKernel() [2/5]
|
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
-
communicator is the communicator to be used for exchanging data among the processes. If a null comunicator is provided, a serial patch will be created haloSize is the size, expressed in number of layers, of the ghost cells halo adaptionMode is the adaption mode that will be used for the patch partitioningMode is the partitioning mode that will be used for the patch
Definition at line 72 of file patch_kernel.cpp.
◆ PatchKernel() [3/5]
|
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
-
dimension is the dimension of the patch communicator is the communicator to be used for exchanging data among the processes. If a null comunicator is provided, a serial patch will be created haloSize is the size, expressed in number of layers, of the ghost cells halo adaptionMode is the adaption mode that will be used for the patch partitioningMode is the partitioning mode that will be used for the patch
Definition at line 120 of file patch_kernel.cpp.
◆ PatchKernel() [4/5]
|
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
-
id is the id that will be assigned to the patch dimension is the dimension of the patch communicator is the communicator to be used for exchanging data among the processes. If a null comunicator is provided, a serial patch will be created haloSize is the size, expressed in number of layers, of the ghost cells halo adaptionMode is the adaption mode that will be used for the patch partitioningMode is the partitioning mode that will be used for the patch
Definition at line 173 of file patch_kernel.cpp.
◆ PatchKernel() [5/5]
|
protected |
Copy constructor.
- Parameters
-
other is another patch whose content is copied into this
Definition at line 212 of file patch_kernel.cpp.
Member Function Documentation
◆ _adaptionAlter()
|
protectedvirtual |
Alter the patch performing the adaption.
Default implementation is a no-op function.
- Parameters
-
trackAdaption if 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 5210 of file patch_kernel.cpp.
◆ _adaptionCleanup()
|
protectedvirtual |
Cleanup patch data structured after the adaption.
Default implementation is a no-op function.
Reimplemented in bitpit::VolOctree.
Definition at line 5224 of file patch_kernel.cpp.
◆ _adaptionPrepare()
|
protectedvirtual |
Prepares the patch for performing the adaption.
Default implementation is a no-op function.
- Parameters
-
trackAdaption if 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 5192 of file patch_kernel.cpp.
◆ _dump()
|
protectedpure virtual |
◆ _enableCellBalancing()
|
protectedvirtual |
Enables cell balancing.
Default implementation is a no-op function.
- Parameters
-
id is the id of the cell enabled defines 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 5297 of file patch_kernel.cpp.
◆ _findCellEdgeNeighs()
|
protectedvirtual |
Extracts the neighbours of the specified cell for the given edge.
This function can be only used with three-dimensional cells.
- Parameters
-
id is the id of the cell edge is an edge of the cell blackList is 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] neighs is 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 3720 of file patch_kernel.cpp.
◆ _findCellFaceNeighs()
|
protectedvirtual |
Extracts the neighbours of the specified cell for the given face.
- Parameters
-
id is the id of the cell face is a face of the cell blackList is 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] neighs is 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 3592 of file patch_kernel.cpp.
◆ _findCellNeighs()
|
protectedvirtual |
Extracts all the neighbours of the specified cell
This implementation can NOT handle hanging nodes.
- Parameters
-
id is the id of the cell blackList is 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] neighs is 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 3499 of file patch_kernel.cpp.
◆ _findCellVertexNeighs()
|
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
-
id is the id of the cell vertex is a local vertex of the cell blackList is 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] neighs is 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 3885 of file patch_kernel.cpp.
◆ _findGhostCellExchangeSources()
|
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
-
rank is the rank for which the information will be built
Reimplemented in bitpit::VolOctree.
Definition at line 4793 of file patch_kernel_parallel.cpp.
◆ _getCellAdaptionMarker()
|
protectedvirtual |
Returns the adaption marker of the specified cell.
Default implementation always return an undefined marker.
- Parameters
-
id is the id of the cell
- Returns
- The adaption marker of the cell.
Reimplemented in bitpit::VolOctree.
Definition at line 5281 of file patch_kernel.cpp.
◆ _getCellNativeIndex()
|
protectedvirtual |
Get the native index of a cell.
- Parameters
-
id is the id of the cell
- Returns
- The native index of a cell.
Reimplemented in bitpit::VolOctree.
Definition at line 3381 of file patch_kernel.cpp.
◆ _getDumpVersion()
|
protectedpure virtual |
◆ _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()
|
protectedvirtual |
Marks a cell for coarsening.
Default implementation is a no-op function.
- Parameters
-
id the cell to be refined
- Returns
- Returns true if the marker was properly set, false otherwise.
Reimplemented in bitpit::VolOctree.
Definition at line 5251 of file patch_kernel.cpp.
◆ _markCellForRefinement()
|
protectedvirtual |
Marks a cell for refinement.
Default implementation is a no-op function.
- Parameters
-
id the cell to be refined
- Returns
- Returns true if the marker was properly set, false otherwise.
Reimplemented in bitpit::VolOctree.
Definition at line 5236 of file patch_kernel.cpp.
◆ _partitioningAlter()
|
protectedvirtual |
Alter the patch performing the partitioning.
- Parameters
-
trackPartitioning if 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 2105 of file patch_kernel_parallel.cpp.
◆ _partitioningCleanup()
|
protectedvirtual |
Cleanup patch data structured after the partitioning.
Default implementation is a no-op function.
Reimplemented in bitpit::VolOctree.
Definition at line 3773 of file patch_kernel_parallel.cpp.
◆ _partitioningPrepare() [1/2]
|
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
-
cellWeights are 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 defaultWeight is the default weight that will assigned to the cells for which an explicit weight has not been defined trackPartitioning if 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 1863 of file patch_kernel_parallel.cpp.
◆ _partitioningPrepare() [2/2]
|
protectedvirtual |
Partitions the patch among the processes. Each cell will be assigned to a specific process according to the specified input.
- Parameters
-
cellRanks are the ranks of the cells after the partitioning trackPartitioning if 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 1980 of file patch_kernel_parallel.cpp.
◆ _resetAdjacencies()
|
protectedvirtual |
Internal function to reset the adjacencies.
This function doesn't change the alteration flags.
- Parameters
-
release if 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 6072 of file patch_kernel.cpp.
◆ _resetCellAdaptionMarker()
|
protectedvirtual |
Resets the adaption marker of the specified cell.
Default implementation is a no-op function.
- Parameters
-
id the cell to be refined
- Returns
- Returns true if the marker was properly reset, false otherwise.
Reimplemented in bitpit::VolOctree.
Definition at line 5266 of file patch_kernel.cpp.
◆ _resetInterfaces()
|
protectedvirtual |
Internal function to reset the interfaces of the patch.
This function doesn't change the alteration flags.
- Parameters
-
release if it's true the memory hold by the interfaces will be released, otherwise the interfaces will be reset but their memory will not be released
Definition at line 1056 of file patch_kernel.cpp.
◆ _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 7725 of file patch_kernel.cpp.
◆ _restore()
|
protectedpure virtual |
◆ _setHaloSize()
|
protectedvirtual |
Internal function to set the size, expressed in number of layers, of the ghost cells halo.
- Parameters
-
haloSize is 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()
|
protectedvirtual |
Internal function to set the tolerance for the geometrical checks.
- Parameters
-
tolerance is the tolerance that will be used for the geometrical checks
Reimplemented in bitpit::VolOctree.
Definition at line 7691 of file patch_kernel.cpp.
◆ _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 6130 of file patch_kernel.cpp.
◆ _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 6622 of file patch_kernel.cpp.
◆ _writeFinalize()
|
protectedvirtual |
Internal function to be called after writing the patch.
Definition at line 1277 of file patch_kernel.cpp.
◆ _writePrepare()
|
protectedvirtual |
Internal function to be called before writing the patch.
Definition at line 1203 of file patch_kernel.cpp.
◆ adaption()
std::vector< adaption::Info > bitpit::PatchKernel::adaption | ( | bool | trackAdaption = true, |
bool | squeezeStorage = false ) |
Execute patch adaption.
- Parameters
-
trackAdaption if set to true the changes to the patch will be tracked squeezeStorage if 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 679 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
-
trackAdaption if set to true the function will return the changes done to the patch during the adaption squeezeStorage if 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 760 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 794 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
-
trackAdaption if 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 719 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
-
source is the cell that will be added owner is the rank that owns the cell that will be added haloLayer is the halo layer the cell belongs to, this argument is only relevant if the cell is a ghost id is 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
-
source is the cell that will be added owner is the rank that owns the cell that will be added id is 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
-
source is the cell that will be added id is 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 2803 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
-
source is the cell that will be added owner is the rank that owns the cell that will be added haloLayer is the halo layer the cell belongs to, this argument is only relevant if the cell is a ghost id is 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
-
source is the cell that will be added owner is the rank that owns the cell that will be added id is 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
-
source is the cell that will be added id is 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 2781 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
-
type is the type of the cell connectivity is the connectivity of the cell owner is the rank that owns the cell that will be added haloLayer is the halo layer the cell belongs to, this argument is only relevant if the cell is a ghost id is 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
-
type is the type of the cell connectivity is the connectivity of the cell owner is the rank that owns the cell that will be added id is 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
-
type is the type of the cell connectivity is the connectivity of the cell id is 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 2874 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
-
type is the type of the cell owner is the rank that owns the cell that will be added haloLayer is the halo layer the cell belongs to, this argument is only relevant if the cell is a ghost id is 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
-
type is the type of the cell owner is the rank that owns the cell that will be added id is 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
-
type is the type of the cell id is 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 2845 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
-
type is the type of the cell connectStorage is the storage the contains or will contain the connectivity of the element owner is the rank that owns the cell that will be added haloLayer is the halo layer the cell belongs to, this argument is only relevant if the cell is a ghost id is 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
-
type is the type of the cell connectStorage is the storage the contains or will contain the connectivity of the element owner is the rank that owns the cell that will be added id is 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
-
type is the type of the cell connectStorage is the storage the contains or will contain the connectivity of the element id is 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 2901 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
-
source is the interface that will be added id is 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 4396 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
-
type is the type of the interface connectivity is the connectivity of the interface id is 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 4486 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
-
type is the type of the interface id is 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 4463 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
-
type is the type of the interface connectStorage is the storage the contains or will contain the connectivity of the element id is 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 4513 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
-
source is the interface that will be added id is 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 4419 of file patch_kernel.cpp.
◆ addPointToBoundingBox()
|
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
-
point is the a new point that will be added to the bounding box
Definition at line 7333 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
-
coords are the coordinates of the vertex id is 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 1918 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
-
source is the vertex that will be added id is 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 1844 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
-
source is the vertex that will be added id is 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 1869 of file patch_kernel.cpp.
◆ areAdjacenciesDirty()
bool bitpit::PatchKernel::areAdjacenciesDirty | ( | bool | global = false | ) | const |
Checks if the adjacencies are dirty.
- Parameters
-
global if 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 5913 of file patch_kernel.cpp.
◆ areInterfacesDirty()
bool bitpit::PatchKernel::areInterfacesDirty | ( | bool | global = false | ) | const |
Checks if the interfaces are dirty.
- Parameters
-
global if 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 6404 of file patch_kernel.cpp.
◆ arePartitioningInfoDirty()
bool bitpit::PatchKernel::arePartitioningInfoDirty | ( | bool | global = true | ) | const |
Checks if the partitioning information are dirty.
- Parameters
-
global if 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 4294 of file patch_kernel_parallel.cpp.
◆ binGroupVertices() [1/2]
|
protected |
Group specified vertices on regular bins.
- Parameters
-
[in] vertices are the vertices to be sorted [in] nBins is the number of bins (on each space direction)
- Returns
- Returns the vertices grouped into bins.
Definition at line 7470 of file patch_kernel.cpp.
◆ binGroupVertices() [2/2]
|
protected |
Group vertices on regular bins.
- Parameters
-
[in] nBins is the number of bins (on each space direction)
- Returns
- Returns the vertices grouped into bins.
Definition at line 7458 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 5946 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 6439 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 2631 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 2705 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 2715 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 2641 of file patch_kernel.cpp.
◆ clearBoundingBox()
|
protected |
Clears the bounding box.
The box will be cleared also if it declared frozen.
Definition at line 7175 of file patch_kernel.cpp.
◆ clone() [1/2]
|
pure virtual |
◆ clone() [2/2]
|
static |
Creates a clone of the specified pach.
- Parameters
-
original is 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 2227 of file patch_kernel.cpp.
◆ consecutiveItemRenumbering()
|
protected |
Renumber the ids of the items in the specified container.
- Parameters
-
container is the container offset is 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] vertexOffset is the starting id of the vertices [in] cellOffset is the starting id of the cells [in] interfaceOffset is the starting id of the interfaces
Definition at line 8280 of file patch_kernel.cpp.
◆ consecutiveRenumberCells()
void bitpit::PatchKernel::consecutiveRenumberCells | ( | long | offset = 0 | ) |
Renumbers cells consecutively, starting from a given offset.
- Parameters
-
[in] offset is the starting id
Definition at line 8194 of file patch_kernel.cpp.
◆ consecutiveRenumberInterfaces()
void bitpit::PatchKernel::consecutiveRenumberInterfaces | ( | long | offset = 0 | ) |
Renumbers interfaces consecutively, starting from a given offset.
- Parameters
-
[in] offset is the starting id
Definition at line 8251 of file patch_kernel.cpp.
◆ consecutiveRenumberVertices()
void bitpit::PatchKernel::consecutiveRenumberVertices | ( | long | offset = 0 | ) |
Renumbers vertices consecutively, starting from a given offset.
- Parameters
-
[in] offset is the starting id
Definition at line 8168 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 3203 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 4861 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 4719 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 2115 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 3283 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 4825 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 3191 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 4849 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 4707 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 2103 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 3227 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 4739 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 2143 of file patch_kernel.cpp.
◆ deleteCell()
bool bitpit::PatchKernel::deleteCell | ( | long | id | ) |
Deletes a cell.
- Parameters
-
id is the id of the cell
Definition at line 3096 of file patch_kernel.cpp.
◆ deleteCells()
bool bitpit::PatchKernel::deleteCells | ( | const IdStorage & | ids | ) |
Deletes a list of cells.
- Parameters
-
ids are 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 2317 of file patch_kernel.cpp.
◆ deleteInterface()
bool bitpit::PatchKernel::deleteInterface | ( | long | id | ) |
Deletes an interface.
- Parameters
-
id is the id of the interface
Definition at line 4658 of file patch_kernel.cpp.
◆ deleteInterfaces()
bool bitpit::PatchKernel::deleteInterfaces | ( | const IdStorage & | ids | ) |
Deletes a list of interfaces.
- Parameters
-
ids are 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 4778 of file patch_kernel.cpp.
◆ deleteOrphanVertices()
bool bitpit::PatchKernel::deleteOrphanVertices | ( | ) |
Remove orphan vertices
Definition at line 2208 of file patch_kernel.cpp.
◆ deleteVertex()
|
protected |
Deletes a vertex.
- Parameters
-
id is the id of the vertex
Definition at line 2050 of file patch_kernel.cpp.
◆ deleteVertices()
|
protected |
Deletes a list of vertices.
- Parameters
-
ids are 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 6026 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 6539 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] out output stream [in] padding (default = 0) number of leading spaces for formatted output
Definition at line 7859 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] out output stream [in] padding (default = 0) number of leading spaces for formatted output
Definition at line 7875 of file patch_kernel.cpp.
◆ displayTopologyStats()
void bitpit::PatchKernel::displayTopologyStats | ( | std::ostream & | out, |
unsigned int | padding = 0 ) const |
Display patch statistics.
- Parameters
-
[in,out] out output stream [in] padding (default = 0) number of leading spaces for formatted output
Definition at line 7806 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] out output stream [in] padding (default = 0) number of leading spaces for formatted output
Definition at line 7843 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
-
stream is the stream to write to
- Returns
- Return true if the patch was successfully dumped, false otherwise.
Definition at line 8308 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
-
stream is the stream to write to
- Returns
- Return true if the patch was successfully dumped, false otherwise.
Definition at line 8329 of file patch_kernel.cpp.
◆ dumpCells()
|
protected |
Write the cells to the specified stream.
- Parameters
-
stream is the stream to write to
Definition at line 4972 of file patch_kernel.cpp.
◆ dumpInterfaces()
|
protected |
Write the interfaces to the specified stream.
- Parameters
-
stream is the stream to write to
Definition at line 5093 of file patch_kernel.cpp.
◆ dumpVertices()
|
protected |
Write the vertices to the specified stream.
- Parameters
-
stream is the stream to write to
Definition at line 4881 of file patch_kernel.cpp.
◆ empty()
bool bitpit::PatchKernel::empty | ( | bool | global = true | ) | const |
Return true if the patch is empty.
- Parameters
-
global if 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 2376 of file patch_kernel.cpp.
◆ enableCellBalancing()
void bitpit::PatchKernel::enableCellBalancing | ( | long | id, |
bool | enabled ) |
Enables cell balancing.
- Parameters
-
id is the id of the cell enabled defines if enable the balancing for the specified cell
Definition at line 949 of file patch_kernel.cpp.
◆ evalCellBoundingBox()
|
virtual |
Evaluates the bounding box of the specified cell.
- Parameters
-
id is the id of the cell [out] minPoint is the minimum point of the bounding box [out] maxPoint is the maximum point of the bounding box
Reimplemented in bitpit::VolCartesian.
Definition at line 5506 of file patch_kernel.cpp.
◆ evalCellCentroid()
|
virtual |
Evaluates the centroid of the specified cell.
- Parameters
-
id is the id of the cell
- Returns
- The centroid of the specified cell.
Reimplemented in bitpit::VolCartesian, and bitpit::VolOctree.
Definition at line 5492 of file patch_kernel.cpp.
◆ evalCellSize()
|
pure virtual |
Implemented in bitpit::LineKernel, bitpit::PointKernel, bitpit::SurfaceKernel, bitpit::VolCartesian, bitpit::VolOctree, and bitpit::VolUnstructured.
◆ 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
-
element is the element [out] minPoint is the minimum point of the bounding box [out] maxPoint is the maximum point of the bounding box
Definition at line 5773 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
-
element is the element
- Returns
- The centroid of the specified element.
Definition at line 5756 of file patch_kernel.cpp.
◆ evalInterfaceBoundingBox()
|
virtual |
Evaluates the bounding box of the specified interface.
- Parameters
-
id is the id of the interface [out] minPoint is the minimum point of the bounding box [out] maxPoint is the maximum point of the bounding box
Definition at line 5582 of file patch_kernel.cpp.
◆ evalInterfaceCentroid()
|
virtual |
Evaluates the centroid of the specified interface.
- Parameters
-
id is the id of the interface
- Returns
- The centroid of the specified interface.
Definition at line 5568 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 1774 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
-
cellWeights are 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 1789 of file patch_kernel_parallel.cpp.
◆ extractEnvelope()
|
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] envelope is the patch to which the external envelope will be appended
Definition at line 7751 of file patch_kernel.cpp.
◆ findAdjoinNeighFace()
|
protectedvirtual |
Finds the face of the supposed neighbour that adjoins the target face.
- Parameters
-
cell is the cell cellFace is the target face of the cell neigh is 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 6839 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
-
id is the id of the cell complete controls 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] neighs is 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 3639 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
-
id is the id of the cell complete controls 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 3617 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
-
id is the id of the cell edge is an edge of the cell
- Returns
- The neighbours of the specified cell for the given edge.
Definition at line 3680 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
-
id is the id of the cell edge is an edge of the cell [in,out] neighs is 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 3700 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
-
id is the id of the cell
- Returns
- The neighbours of all the faces of the specified cell.
Definition at line 3477 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
-
id is the id of the cell face is a face of the cell
- Returns
- The neighbours of the specified cell for the given face.
Definition at line 3556 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
-
id is the id of the cell face is a face of the cell [in,out] neighs is 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 3574 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
-
id is the id of the cell [in,out] neighs is 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 3528 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
-
id is the id of the cell
- Returns
- All the neighbours of the specified cell.
- Examples
- POD_example_00002.cpp.
Definition at line 3392 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
-
id is the id of the cell codimension the 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. complete controls 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] neighs is 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 3458 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
-
id is the id of the cell codimension the 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. complete controls 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 3430 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
-
id is the id of the cell [in,out] neighs is 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 3408 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
-
id is the id of the cell complete controls 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] neighs is 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 3795 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
-
id is the id of the cell complete controls 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 3775 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
-
id is the id of the cell vertex is a vertex of the cell
- Returns
- The neighbours of the specified cell for the given vertex.
Definition at line 3833 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
-
id is the id of the cell vertex is a vertex of the cell [in,out] neighs is 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 3851 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
-
id is the id of the cell vertex is a vertex of the cell
- Returns
- The one-ring of the specified vertex of the cell.
Definition at line 4004 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
-
id is the id of the cell vertex is a vertex of the cell [in,out] ring is 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 4022 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 3296 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] cellId is the id of the cell [in] neighId is the id of the neighbour [out] cellFace is 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] cellAdjacencyId is 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 4044 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 3240 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 4761 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 2164 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
-
vertexId is the index of the vertex
- Returns
- The cells that share the vertex.
Definition at line 4113 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
-
vertexId is the index of the vertex [in,out] ring is 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 4131 of file patch_kernel.cpp.
◆ flushData()
|
overridevirtual |
Interface for writing data to stream.
- Parameters
-
[in] stream is the stream to write to [in] name is the name of the data to be written. Either user data or patch data [in] format is 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 8005 of file patch_kernel.cpp.
◆ getAdaptionMode()
PatchKernel::AdaptionMode bitpit::PatchKernel::getAdaptionMode | ( | ) | const |
Returns the adaption mode.
Adaption mode tells if the patch can be adapted and which strategies can be used to adapt the patch.
The following adaption modes are supported:
- disabled, no adaption can be performed;
- automatic, adaption is performed specifying which cells should be refiend/coarsen and then the patch will perform all the alterations needed to fulfill the adaption requests;
- manual, this modes allows to use low level function to add and delete individual cells and vertices. It's up to the user to guarantee the consistency of the patch.
- Returns
- The adaption mode.
Definition at line 1309 of file patch_kernel.cpp.
◆ getAdaptionStatus()
PatchKernel::AdaptionStatus bitpit::PatchKernel::getAdaptionStatus | ( | bool | global = false | ) | const |
Returns the current adaption status.
Adaption mode tells which stage of the adaption process
- Parameters
-
global if set to true, the adaption status will be evaluated globally across all the partitions
- Returns
- The current adaption status.
Definition at line 1335 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 5891 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
-
global if set to true, the bounding box will be evaluated globally across all the partitions [out] minPoint on output stores the minimum point of the patch [out] maxPoint on output stores the maximum point of the patch
Definition at line 7223 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] minPoint on output stores the minimum point of the patch [out] maxPoint on output stores the maximum point of the patch
Definition at line 7210 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
-
id is the id of the requested cell
- Returns
- A reference to the cell with the specified id.
Definition at line 2569 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
-
id is the id of the requested cell
- Returns
- A constant reference to the cell with the specified id.
Definition at line 2580 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
-
id is the id of the cell
- Returns
- The adaption marker of the cell.
Definition at line 938 of file patch_kernel.cpp.
◆ getCellAlterationFlags()
|
protected |
Get the alteration flags of the specified cell.
- Parameters
-
id is the id of the cell
- Returns
- The alteration flags of the cell.
Definition at line 6900 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 2695 of file patch_kernel.cpp.
◆ getCellCount()
|
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 2518 of file patch_kernel.cpp.
◆ getCellHaloLayer()
int bitpit::PatchKernel::getCellHaloLayer | ( | long | id | ) | const |
Gets the halo layer of the specified cell.
- Parameters
-
id is the id of the requested cell
- Returns
- The halo layer of the specified cell.
Definition at line 3815 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 2621 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
-
id is the id of the requested cell
- Returns
- The rank that owns the specified cell.
Definition at line 3799 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
-
id is the id of the requested cell
- Returns
- The rank that owns the specified cell.
Definition at line 3783 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, and POD_example_00005.cpp.
Definition at line 2548 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 2558 of file patch_kernel.cpp.
◆ getCellType()
|
virtual |
Gets the element type for the cell with the specified id.
- Parameters
-
id is the id of the requested cell
- Returns
- The element type for the cell with the specified id.
Reimplemented in bitpit::VolCartesian.
Definition at line 2591 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
-
id is the id of the cell
- Returns
- Vertex coordinates of the cell.
Definition at line 5519 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
-
id is the id of the cell [out] coordinates on 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 5555 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
-
id is the id of the cell [out] coordinates on output will contain the vertex coordinates
Definition at line 5540 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 1522 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 8292 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
-
element is the element
- Returns
- The coordinates of the element.
Definition at line 7412 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
-
element is the element [out] coordinates on 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 7446 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
-
element is the element [out] coordinates on output will contain the vertex coordinates
Definition at line 7432 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 4070 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
-
rank is 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 4112 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 3986 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
-
rank is 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 4028 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 4091 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
-
rank is 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 4133 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 4007 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
-
rank is 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 4049 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 3943 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
-
rank is 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 3965 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 3900 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
-
rank is 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 3921 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 1492 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
-
id is the id of the requested interface
- Returns
- A reference to the interface with the specified id.
Definition at line 4294 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
-
id is the id of the requested interface
- Returns
- A constant reference to the interface with the specified id.
Definition at line 4305 of file patch_kernel.cpp.
◆ getInterfaceAlterationFlags()
|
protected |
Get the alteration flags of the specified interface.
- Parameters
-
id is the id of the interface
- Returns
- The alteration flags of the interface.
Definition at line 6979 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 4356 of file patch_kernel.cpp.
◆ getInterfaceCount()
|
virtual |
Gets the number of interfaces in the patch.
- Returns
- The number of interfaces in the patch
Reimplemented in bitpit::VolCartesian.
Definition at line 4263 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 4326 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 4273 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 4283 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 6376 of file patch_kernel.cpp.
◆ getInterfaceType()
|
virtual |
Gets the element type for the interface with the specified id.
- Parameters
-
id is the id of the requested interface
- Returns
- The element type for the interface with the specified id.
Reimplemented in bitpit::VolCartesian.
Definition at line 4316 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
-
id is the id of the interface
- Returns
- Vertex coordinates of the interface.
Definition at line 5595 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
-
id is the id of the interface [out] coordinates on 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 5631 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
-
id is the id of the interface [out] coordinates on output will contain the vertex coordinates
Definition at line 5616 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 2528 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 4075 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
-
pid is the PID
- Returns
- All the internal cells which belongs to the specified PID.
Definition at line 4092 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 2538 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 1651 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 2601 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 2611 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 1703 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 1713 of file patch_kernel.cpp.
◆ getLineCodimension()
|
pure virtual |
Implemented in bitpit::LineKernel, bitpit::PointKernel, bitpit::SurfaceKernel, and bitpit::VolumeKernel.
◆ getNeighbourRanks()
std::vector< int > bitpit::PatchKernel::getNeighbourRanks | ( | ) |
Get a list of neighbour ranks.
- Returns
- A list of neighbour ranks.
Definition at line 3873 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
-
allowDirty if 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.
◆ getPartitioningMode()
PatchKernel::PartitioningMode bitpit::PatchKernel::getPartitioningMode | ( | ) | const |
Returns the current partitioning mode.
Partitioning mode tells if the patch can be partitioned across the processes.
The following partitioning modes are supported:
- disabled, no partitioning can be performed;
- enabled, the patch can be partitioned across the processes.
- Returns
- The current partitioning mode.
Definition at line 1712 of file patch_kernel_parallel.cpp.
◆ getPartitioningStatus()
PatchKernel::PartitioningStatus bitpit::PatchKernel::getPartitioningStatus | ( | bool | global = false | ) | const |
Returns the current partitioning status.
- Parameters
-
global if set to true the partitioning status will be
- Returns
- The current partitioning status.
Definition at line 1736 of file patch_kernel_parallel.cpp.
◆ getPointCodimension()
|
pure virtual |
Implemented in bitpit::LineKernel, bitpit::PointKernel, bitpit::SurfaceKernel, and bitpit::VolumeKernel.
◆ 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.
◆ getSurfaceCodimension()
|
pure virtual |
Implemented in bitpit::LineKernel, bitpit::PointKernel, bitpit::SurfaceKernel, and bitpit::VolumeKernel.
◆ getTol()
double bitpit::PatchKernel::getTol | ( | ) | const |
Gets the tolerance for geometrical checks.
- Returns
- The tolerance for geometrical checks.
Definition at line 7701 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
-
id is the id of the requested vertex
- Returns
- A reference to the vertex with the specified id.
Definition at line 1682 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
-
id is the id of the requested vertex
- Returns
- A constant reference to the vertex with the specified id.
Definition at line 1693 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 1777 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
-
id is the id of the vertex
- Returns
- The coordinates of the specified vertex.
Definition at line 2335 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
-
nVertices is the number of vertices ids are the ids of the requested vertices [out] coordinates on 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 2362 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
-
nVertices is the number of vertices ids are the ids of the requested vertices [out] coordinates on output will contain the vertex coordinates
Definition at line 2347 of file patch_kernel.cpp.
◆ getVertexCount()
|
virtual |
Gets the number of vertices in the patch.
- Returns
- The number of vertices in the patch
Reimplemented in bitpit::VolCartesian.
Definition at line 1641 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 1723 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
-
id is the id of the requested vertex
- Returns
- The rank that owns the specified vertex.
Definition at line 3847 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
-
id is the id of the requested vertex
- Returns
- The rank that owns the specified vertex.
Definition at line 3831 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 1661 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 1671 of file patch_kernel.cpp.
◆ getVolumeCodimension()
|
pure virtual |
Implemented in bitpit::LineKernel, bitpit::PointKernel, bitpit::SurfaceKernel, and bitpit::VolumeKernel.
◆ getVTK() [1/2]
VTKUnstructuredGrid & bitpit::PatchKernel::getVTK | ( | ) |
Get the VTK object.
- Returns
- The VTK object.
- Examples
- volcartesian_example_00001.cpp.
Definition at line 7889 of file patch_kernel.cpp.
◆ getVTK() [2/2]
const VTKUnstructuredGrid & bitpit::PatchKernel::getVTK | ( | ) | const |
◆ getVTKCellWriteRange()
const PatchKernel::CellConstRange bitpit::PatchKernel::getVTKCellWriteRange | ( | ) | const |
Get the VTK cell write range.
- Returns
- The VTK cell write range.
Definition at line 7929 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 7909 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] id is 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()
|
protected |
Converts a ghost vertex to an internal vertex.
- Parameters
-
[in] id is 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
-
strategy is the build strategy that will be used
Definition at line 5959 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
-
strategy is the build strategy that will be used
Definition at line 6455 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 4336 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 4366 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 4376 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 4346 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 2661 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] id is the index of the cell [in] owner is the rank of the process that owns the ghost cell [in] haloLayer is 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 2651 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 2725 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 2746 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 2671 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 2735 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 2761 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 2685 of file patch_kernel.cpp.
◆ internalVertex2GhostVertex()
|
protected |
Converts an internal vertex to a ghost vertex.
- Parameters
-
[in] id is the index of the vertex [in] owner is 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 1753 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 1807 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 1817 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 1763 of file patch_kernel.cpp.
◆ intersectInterfacePlane()
bool bitpit::PatchKernel::intersectInterfacePlane | ( | long | id, |
std::array< double, 3 > | P, | ||
std::array< double, 3 > | nP, | ||
std::array< std::array< double, 3 >, 2 > * | intersection, | ||
std::vector< std::array< double, 3 > > * | polygon ) const |
Check if an interface is intersected by a given plane. Calculate the intersection as a segment defined by two points and the polygon corresponding to the interface belonging to the subspace opposite to the one pointed by the given normal. If the interface is not intersected, an empty polygon is returned.
Interfaces laid on the plane are not considered as intersected ones.
Interfaces having only an edge or point on the plane are not considered as intersected ones.
- Parameters
-
[in] P Point belonging to the plane [in] nP Normal to the plane [out] intersection If intersects, return the cutting segment. In case of a liner interface the intersection degenerates to a point which coincides with the begining and the ending of the segment [out] polygon is the polygon constructed by the interface intersection placed on the opposite subspace of the one pointed by the plane's normal
- Returns
- true if intersection occurs, false if not
Definition at line 5657 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 1287 of file patch_kernel.cpp.
◆ isBoundingBoxDirty()
bool bitpit::PatchKernel::isBoundingBoxDirty | ( | bool | global = false | ) | const |
Checks if the bounding box is dirty.
- Parameters
-
global if 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 7271 of file patch_kernel.cpp.
◆ isBoundingBoxFrozen()
|
protected |
Checks if the bounding box is frozen.
- Returns
- Returns true if the bounding box is frozen, false otherwise.
Definition at line 7244 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 2422 of file patch_kernel.cpp.
◆ isCommunicatorSet()
|
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
-
global if 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 1369 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 1457 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 4160 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 4798 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
-
rank is the rank associated with the process
- Returns
- True is the process is a neighbour, false otherwise.
Definition at line 3863 of file patch_kernel_parallel.cpp.
◆ isSameFace()
|
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_A is the first cell [in] face_A is the face on the first cell [in] cell_B is the the second cell [in] face_B is the face on the second cell
- Returns
- Returns true if the two faces are the same.
Reimplemented in bitpit::VolOctree.
Definition at line 5865 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 1532 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 7738 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 1545 of file patch_kernel.cpp.
◆ locatePoint() [1/2]
|
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] x is the x coordinate of the point [in] y is the y coordinate of the point [in] z is 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 5850 of file patch_kernel.cpp.
◆ mappedItemRenumbering()
|
protected |
Renumber the ids of the items in the specified container.
- Parameters
-
container is the container renumberMap is 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
-
id is the id of the cell that needs to be coarsened
- Examples
- POD_example_00002.cpp.
Definition at line 904 of file patch_kernel.cpp.
◆ markCellForRefinement()
void bitpit::PatchKernel::markCellForRefinement | ( | long | id | ) |
Marks a cell for refinement.
- Parameters
-
id is the id of the cell that needs to be refined
- Examples
- POD_example_00002.cpp.
Definition at line 890 of file patch_kernel.cpp.
◆ operator=()
PatchKernel & bitpit::PatchKernel::operator= | ( | PatchKernel && | other | ) |
Move assignment operator.
- Parameters
-
other is another patch whose content is copied into this
Definition at line 383 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
-
trackPartitioning if set to true, the changes to the patch will be tracked squeezeStorage if 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
-
cellWeights are 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 trackPartitioning if set to true, the changes to the patch will be tracked squeezeStorage if 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
-
cellRanks are the ranks of the cells after the partitioning trackPartitioning if set to true, the changes to the patch will be tracked squeezeStorage if 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
-
communicator is the communicator that will be used trackPartitioning if set to true, the changes to the patch will be tracked squeezeStorage if set to true the vector that store patch information will be squeezed after the synchronization haloSize is 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
-
communicator is the communicator that will be used cellWeights are 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 trackPartitioning if set to true, the changes to the patch will be tracked squeezeStorage if set to true the vector that store patch information will be squeezed after the synchronization haloSize is 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
-
communicator is the communicator that will be used cellRanks are the ranks of the cells after the partitioning trackPartitioning if set to true, the changes to the patch will be tracked squeezeStorage if set to true the vector that store patch information will be squeezed after the synchronization haloSize is 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
-
trackPartitioning if set to true the function will return the changes done to the patch during the partitioning squeezeStorage if 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
-
trackPartitioning if 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
-
cellWeights are 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 trackPartitioning if 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
-
cellRanks are the ranks of the cells after the partitioning trackPartitioning if 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
-
communicator is the communicator that will be used trackPartitioning if set to true, the changes to the patch will be tracked haloSize is 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
-
communicator is the communicator that will be used cellWeights are 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 trackPartitioning if set to true, the changes to the patch will be tracked haloSize is 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
-
communicator is the communicator that will be used cellRanks are the ranks of the cells after the partitioning trackPartitioning if set to true, the changes to the patch will be tracked haloSize is 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]
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
-
seedId is the seed nLayers is the number of neighbour layers that will be processed function is a functor that will be applied
Definition at line 497 of file patch_kernel.tpp.
◆ processCellFaceNeighbours() [2/2]
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
-
seedId is the seed nLayers is the number of neighbour layers that will be processed function is a functor that will be applied selector is a functor that controls if a neighbour is selected or not
Definition at line 530 of file patch_kernel.tpp.
◆ processCellNeighbours() [1/2]
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
-
seedId is the seed nLayers is the number of neighbour layers that will be processed function is a functor that will be applied
Definition at line 332 of file patch_kernel.tpp.
◆ processCellNeighbours() [2/2]
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
-
seedId is the seed nLayers is the number of neighbour layers that will be processed function is a functor that will be applied selector is a functor that controls if a neighbour is selected or not
Definition at line 366 of file patch_kernel.tpp.
◆ processCellsFaceNeighbours() [1/2]
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
-
seeds are the seeds nLayers is the number of neighbour layers that will be processed function is a functor that will be applied
Definition at line 587 of file patch_kernel.tpp.
◆ processCellsFaceNeighbours() [2/2]
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
-
seedIds are the seeds nLayers is the number of neighbour layers that will be processed function is a functor that will be applied selector is a functor that controls if a neighbour is selected or not
Definition at line 620 of file patch_kernel.tpp.
◆ processCellsNeighbours() [1/2]
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
-
seeds are the seeds nLayers is the number of neighbour layers that will be processed function is a functor that will be applied
Definition at line 408 of file patch_kernel.tpp.
◆ processCellsNeighbours() [2/2]
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
-
seeds are the seeds nLayers is the number of neighbour layers that will be processed function is a functor that will be applied selector is a functor that controls if a neighbour is selected or not
Definition at line 441 of file patch_kernel.tpp.
◆ 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 6085 of file patch_kernel.cpp.
◆ 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 6565 of file patch_kernel.cpp.
◆ removePointFromBoundingBox()
|
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
-
point is the point that will be removed from to the bounding box
Definition at line 7368 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] nCells is size of memory reserve (in terms of number of cells).
Definition at line 1104 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] nInterfaces is size of memory reserve (in terms of number of interfaces).
Definition at line 1129 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] nVertices size of memory reserve (in terms of number of vertices).
Definition at line 1081 of file patch_kernel.cpp.
◆ reset()
|
virtual |
Reset the patch.
Reimplemented in bitpit::VolCartesian, and bitpit::VolOctree.
Definition at line 961 of file patch_kernel.cpp.
◆ resetAdjacencies()
|
protected |
Reset the adjacencies.
This function doesn't change the build strategy, it only resets the existing adjacencies.
Definition at line 6049 of file patch_kernel.cpp.
◆ resetCellAdaptionMarker()
void bitpit::PatchKernel::resetCellAdaptionMarker | ( | long | id | ) |
Resets the adaption marker of the specified cell.
- Parameters
-
id is the id of the cell
Definition at line 918 of file patch_kernel.cpp.
◆ resetCellAlterationFlags()
|
protected |
Reset the alteration flags of the given cell.
- Parameters
-
id is the id of the cell flags are the flags that will be set
Definition at line 6911 of file patch_kernel.cpp.
◆ resetCells()
|
virtual |
Reset the cells of the patch.
Definition at line 994 of file patch_kernel.cpp.
◆ resetInterfaceAlterationFlags()
|
protected |
Reset the alteration flags of the given interface.
- Parameters
-
id is the id of the interface flags are the flags that will be set
Definition at line 6990 of file patch_kernel.cpp.
◆ resetInterfaces()
|
virtual |
Reset the interfaces of the patch.
This function doesn't change the build strategy, it only resets the existing interface.
Definition at line 1030 of file patch_kernel.cpp.
◆ resetTol()
void bitpit::PatchKernel::resetTol | ( | ) |
Resets the tolerance for geometrical checks.
Definition at line 7709 of file patch_kernel.cpp.
◆ resetVertices()
|
virtual |
Reset the vertices of the patch.
Definition at line 971 of file patch_kernel.cpp.
◆ restore()
void bitpit::PatchKernel::restore | ( | std::istream & | stream, |
bool | reregister = false ) |
Restore the patch from the specified stream.
- Parameters
-
stream is the stream to read from reregister is 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 8412 of file patch_kernel.cpp.
◆ restoreCell()
|
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
-
type is the type of the cell connectStorage is the storage the contains or will contain the connectivity of the element owner is the rank that owns the cell that will be restored haloLayer is the halo layer the cell belongs to, this argument is only relevant if the cell is a ghost id is 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()
|
protected |
Restore the cells from the specified stream.
- Parameters
-
stream is the stream to read from
Definition at line 5018 of file patch_kernel.cpp.
◆ restoreInterface()
|
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
-
type is the type of the interface connectStorage is the storage the contains or will contain the connectivity of the element id is the id of the interface to restore
- Returns
- An iterator pointing to the restored interface.
Definition at line 4595 of file patch_kernel.cpp.
◆ restoreInterfaces()
|
protected |
Restore the interfaces from the specified stream.
- Parameters
-
stream is the stream to read from
Definition at line 5125 of file patch_kernel.cpp.
◆ restoreVertex()
|
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
-
coords are the coordinates of the vertex owner is the rank that owns the vertex that will be restored id is 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()
|
protected |
Restore the vertices from the specified stream.
- Parameters
-
stream is the stream to read from
Definition at line 4917 of file patch_kernel.cpp.
◆ rotate() [1/2]
|
virtual |
Rotates the patch.
- Parameters
-
[in] n0 is a first point on the rotation axis [in] n1 is a second point on the rotation axis [in] angle is the rotation angle, expressed in radiants and positive for counterclockwise rotations
Reimplemented in bitpit::VolCartesian.
Definition at line 7535 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] n0x is the x-component of a first point on the rotation axis [in] n0y is the y-component of a first point on the rotation axis [in] n0z is the z-component of a first point on the rotation axis [in] n1x is the x-component of a second point on the rotation axis [in] n1y is the y-component of a second point on the rotation axis [in] n1z is the z-component of a second point on the rotation axis [in] angle is the rotation angle, expressed in radiants. Counterclockwise rotations are considered positive.
Definition at line 7582 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] scaling is the scaling factor vector
Definition at line 7595 of file patch_kernel.cpp.
◆ scale() [2/6]
|
virtual |
Scales the patch.
- Parameters
-
[in] scaling is the scaling factor vector [in] center is the center of the scaling
Reimplemented in bitpit::VolCartesian, and bitpit::VolOctree.
Definition at line 7606 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] scaling is the scaling factor
Definition at line 7629 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] scaling is the scaling factor [in] center is the center of the scaling
Definition at line 7640 of file patch_kernel.cpp.
◆ scale() [5/6]
void bitpit::PatchKernel::scale | ( | double | sx, |
double | sy, | ||
double | sz ) |
Scales the patch.
- Parameters
-
[in] sx scaling factor along x direction [in] sy scaling factor along y direction [in] sz scaling factor along z direction
Definition at line 7652 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] sx scaling factor along x direction [in] sy scaling factor along y direction [in] sz scaling factor along z direction [in] center is the center of the scaling
Definition at line 7667 of file patch_kernel.cpp.
◆ setAdaptionMode()
|
protected |
Set the adaption mode.
See PatchKernel::getAdaptionMode() for a list of supported adaption modes.
- Parameters
-
mode is the adaption mode that will be set
Definition at line 1321 of file patch_kernel.cpp.
◆ setAdaptionStatus()
|
protected |
Set the current adaption status.
- Parameters
-
status is the adaption status that will be set
Definition at line 1356 of file patch_kernel.cpp.
◆ setAdjacenciesBuildStrategy()
|
protected |
Set the current adjacencies build strategy.
- Parameters
-
status is the adjacencies build strategy that will be set
Definition at line 5901 of file patch_kernel.cpp.
◆ setBoundingBox()
|
protected |
Sets the bounding box.
The box will be set also if it declared frozen.
- Parameters
-
minPoint the minimum point of the patch maxPoint the maximum point of the patch
Definition at line 7196 of file patch_kernel.cpp.
◆ setBoundingBoxDirty()
|
protected |
Sets if the bounding box is dirty.
- Parameters
-
dirty controls if the bounding box will be set as dirty
Definition at line 7291 of file patch_kernel.cpp.
◆ setBoundingBoxFrozen()
|
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
-
frozen controls if the bounding box will be set as frozen
Definition at line 7259 of file patch_kernel.cpp.
◆ setCellAlterationFlags() [1/2]
|
protected |
Set the specified alteration flags for all the cells.
- Parameters
-
flags are the flags that will be set
Definition at line 6921 of file patch_kernel.cpp.
◆ setCellAlterationFlags() [2/2]
|
protected |
Set the specified alteration flags for the given cell.
- Parameters
-
id is the id of the cell flags are the flags that will be set
Definition at line 6935 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
-
enabled if set to true the auto-indexing will be enabled
Definition at line 2435 of file patch_kernel.cpp.
◆ setCommunicator()
|
protectedvirtual |
Sets the MPI communicator to be used for parallel communications.
- Parameters
-
communicator is the communicator to be used for parallel communications.
Reimplemented in bitpit::VolOctree.
Definition at line 96 of file patch_kernel_parallel.cpp.
◆ setDimension()
|
virtual |
Sets the dimension of the patch.
- Parameters
-
dimension the dimension of the patch
Reimplemented in bitpit::VolOctree.
Definition at line 1502 of file patch_kernel.cpp.
◆ setExpert()
|
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
-
expert if true, the expert mode will be enabled
Definition at line 1436 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
-
haloSize is 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
-
id the id of the patch
Definition at line 1467 of file patch_kernel.cpp.
◆ setInterfaceAlterationFlags() [1/2]
|
protected |
Set the specified alteration flags for all the interfaces.
- Parameters
-
flags are the flags that will be set
Definition at line 7000 of file patch_kernel.cpp.
◆ setInterfaceAlterationFlags() [2/2]
|
protected |
Set the specified alteration flags for the given interface.
- Parameters
-
id is the id of the interface flags are the flags that will be set
Definition at line 7014 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
-
enabled if set to true the auto-indexing will be enabled
Definition at line 4176 of file patch_kernel.cpp.
◆ setInterfacesBuildStrategy()
|
protected |
Set the current interfaces build strategy.
- Parameters
-
status is the interfaces build strategy that will be set
Definition at line 6386 of file patch_kernel.cpp.
◆ setPartitioningMode()
|
protected |
Set the current partitioning mode.
See PatchKernel::getPartitioningMode() for a list of supported partitioning modes.
- Parameters
-
mode is the partitioning mode that will be set
Definition at line 1725 of file patch_kernel_parallel.cpp.
◆ setPartitioningStatus()
|
protected |
Set the current partitioning status.
- Parameters
-
status is the partitioning status that will be set
Definition at line 1753 of file patch_kernel_parallel.cpp.
◆ 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 822 of file patch_kernel.cpp.
◆ setTol()
void bitpit::PatchKernel::setTol | ( | double | tolerance | ) |
Sets the tolerance for the geometrical checks.
- Parameters
-
tolerance is the tolerance that will be used for the geometrical checks
Definition at line 7678 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
-
enabled if set to true the auto-indexing will be enabled
Definition at line 1558 of file patch_kernel.cpp.
◆ setVTKWriteTarget()
void bitpit::PatchKernel::setVTKWriteTarget | ( | WriteTarget | writeTarget | ) |
Set the VTK write target.
- Parameters
-
writeTarget is the VTK write target.
Definition at line 7919 of file patch_kernel.cpp.
◆ simulateCellUpdate()
|
virtual |
Simulate the adaption of the specified cell.
- Parameters
-
id is the id of the cell marker is the adaption marker of the simulated update [out] virtualCells are the virtual cells that would be the outcome of the update [out] virtualVertices are the virtual vertices that would be the outcome of the update
Reimplemented in bitpit::VolOctree.
Definition at line 659 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 5385 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 5339 of file patch_kernel.cpp.
◆ sortInterfaces()
bool bitpit::PatchKernel::sortInterfaces | ( | ) |
Sorts internal interface storage in ascending id order.
Definition at line 5368 of file patch_kernel.cpp.
◆ sortVertices()
bool bitpit::PatchKernel::sortVertices | ( | ) |
Sorts internal vertex storage in ascending id order.
Definition at line 5308 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 5461 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 5421 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 5441 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 5401 of file patch_kernel.cpp.
◆ testAlterationFlags()
|
protected |
Test if the requested alteration flags are among the available flags.
- Parameters
-
availableFlags are the available flags requestedFlags are the requested flags
- Returns
- Return true if the flags are set, false otherwise.
Definition at line 7065 of file patch_kernel.cpp.
◆ testCellAlterationFlags()
|
protected |
Test the specified alteration flags for the given cell.
- Parameters
-
id is the id of the cell flags are the flags that will be tested
- Returns
- Return true if the flags are set, false otherwise.
Definition at line 6889 of file patch_kernel.cpp.
◆ testInterfaceAlterationFlags()
|
protected |
Test the specified alteration flags for the given interface.
- Parameters
-
id is the id of the interface flags are the flags that will be tested
- Returns
- Return true if the flags are set, false otherwise.
Definition at line 6968 of file patch_kernel.cpp.
◆ translate() [1/2]
|
virtual |
Translates the patch.
- Parameters
-
[in] translation is the translation vector
Reimplemented in bitpit::VolCartesian, and bitpit::VolOctree.
Definition at line 7501 of file patch_kernel.cpp.
◆ translate() [2/2]
void bitpit::PatchKernel::translate | ( | double | sx, |
double | sy, | ||
double | sz ) |
Translates the patch.
- Parameters
-
[in] sx translation along x direction [in] sy translation along y direction [in] sz translation along z direction
Definition at line 7522 of file patch_kernel.cpp.
◆ unsetCellAlterationFlags() [1/2]
|
protected |
Unset the specified alteration flags for all the altered cells.
- Parameters
-
flags are the flags that will be unset
Definition at line 6945 of file patch_kernel.cpp.
◆ unsetCellAlterationFlags() [2/2]
|
protected |
Unset the specified alteration flags for the given cell.
- Parameters
-
id is the id of the cell flags are the flags that will be unset
Definition at line 6956 of file patch_kernel.cpp.
◆ unsetInterfaceAlterationFlags() [1/2]
|
protected |
Unset the specified alteration flags for all the altered interfaces.
- Parameters
-
flags are the flags that will be unset
Definition at line 7024 of file patch_kernel.cpp.
◆ unsetInterfaceAlterationFlags() [2/2]
|
protected |
Unset the specified alteration flags for the given interface.
- Parameters
-
id is the id of the interface flags are the flags that will be unset
Definition at line 7035 of file patch_kernel.cpp.
◆ update()
std::vector< adaption::Info > bitpit::PatchKernel::update | ( | bool | trackAdaption = true, |
bool | squeezeStorage = false ) |
Commit all pending changes.
- Parameters
-
trackAdaption if set to true the changes to the patch will be tracked squeezeStorage if 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 625 of file patch_kernel.cpp.
◆ updateAdjacencies()
void bitpit::PatchKernel::updateAdjacencies | ( | bool | forcedUpdated = false | ) |
Update the adjacencies of the patch.
- Parameters
-
forcedUpdated if set to true, bounding box information will be updated also if they are not marked as dirty
Definition at line 5991 of file patch_kernel.cpp.
◆ updateBoundingBox()
void bitpit::PatchKernel::updateBoundingBox | ( | bool | forcedUpdated = false | ) |
Updates the stored patch bounding box.
- Parameters
-
forcedUpdated if set to true, bounding box information will be updated also if they are not marked as dirty
Definition at line 7302 of file patch_kernel.cpp.
◆ updateFirstGhostCellId()
|
protected |
Updates the id of the first ghost cell.
Definition at line 1290 of file patch_kernel_parallel.cpp.
◆ 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
-
forcedUpdated if set to true, bounding box information will be updated also if they are not marked as dirty
Definition at line 6492 of file patch_kernel.cpp.
◆ updateLastInternalCellId()
|
protected |
Updates the id of the last internal cell.
Definition at line 3354 of file patch_kernel.cpp.
◆ updateLastInternalVertexId()
|
protected |
Updates the id of the last internal vertex.
Definition at line 2393 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 1733 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 1787 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 1797 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 1743 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
-
filename the filename where the patch will be written to mode is the VTK file mode that will be used for writing the patch time is the current time
Definition at line 1162 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
-
filename the filename where the patch will be written to mode is the VTK file mode that will be used for writing the patch
Definition at line 1146 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
-
mode is the VTK file mode that will be used for writing the patch time is the current time
Definition at line 1191 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
-
mode is the VTK file mode that will be used for writing the patch
- Examples
- volcartesian_example_00001.cpp.
Definition at line 1176 of file patch_kernel.cpp.
Friends And Related Symbol Documentation
◆ PatchGlobalInfo
|
friend |
Definition at line 59 of file patch_kernel.hpp.
◆ PatchInfo
|
friend |
Definition at line 56 of file patch_kernel.hpp.
◆ PatchManager
|
friend |
Definition at line 61 of file patch_kernel.hpp.
◆ PatchNumberingInfo
|
friend |
Definition at line 57 of file patch_kernel.hpp.
Member Data Documentation
◆ DEFAULT_PARTITIONING_WEIGTH
|
staticprotected |
Default cell weight used for patch partitioning
Definition at line 797 of file patch_kernel.hpp.
◆ FLAG_ADJACENCIES_DIRTY
|
staticprotected |
Definition at line 802 of file patch_kernel.hpp.
◆ FLAG_DANGLING
|
staticprotected |
Definition at line 804 of file patch_kernel.hpp.
◆ FLAG_DELETED
|
staticprotected |
Definition at line 801 of file patch_kernel.hpp.
◆ FLAG_INTERFACES_DIRTY
|
staticprotected |
Definition at line 803 of file patch_kernel.hpp.
◆ FLAG_NONE
|
staticprotected |
Definition at line 800 of file patch_kernel.hpp.
◆ m_alteredCells
|
protected |
Definition at line 810 of file patch_kernel.hpp.
◆ m_alteredInterfaces
|
protected |
Definition at line 811 of file patch_kernel.hpp.
◆ m_cells
|
protected |
Definition at line 807 of file patch_kernel.hpp.
◆ m_interfaces
|
protected |
Definition at line 808 of file patch_kernel.hpp.
◆ m_vertices
|
protected |
Definition at line 806 of file patch_kernel.hpp.
The documentation for this class was generated from the following files:
- src/patchkernel/patch_kernel.hpp
- src/patchkernel/patch_kernel.cpp
- src/patchkernel/patch_kernel.tpp
- src/patchkernel/patch_kernel_parallel.cpp
- src/patchkernel/patch_kernel_parallel.tpp
