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 | 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) |
Public Member Functions inherited from bitpit::VTKBaseStreamer | |
virtual void | absorbData (std::fstream &, const std::string &, VTKFormat, uint64_t, uint8_t, VTKDataType) |
template<typename T > | |
void | flushValue (std::fstream &, VTKFormat, const T &value) const |
template<typename T > | |
void | flushValue (std::fstream &, VTKFormat, const T *values, int nValues) const |
Static Public Member Functions | |
template<typename patch_t > | |
static std::unique_ptr< patch_t > | clone (const patch_t *original) |
Protected Types | |
typedef uint16_t | AlterationFlags |
typedef std::unordered_map< long, AlterationFlags > | AlterationFlagsStorage |
Protected Member Functions | |
PatchKernel (const PatchKernel &other) | |
PatchKernel (int dimension, MPI_Comm communicator, std::size_t haloSize, 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 |
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.
|
protected |
Definition at line 792 of file patch_kernel.hpp.
|
protected |
Definition at line 793 of file patch_kernel.hpp.
typedef PiercedVector<Cell>::const_iterator bitpit::PatchKernel::CellConstIterator |
Definition at line 69 of file patch_kernel.hpp.
typedef PiercedVector<Cell>::const_range bitpit::PatchKernel::CellConstRange |
Definition at line 77 of file patch_kernel.hpp.
typedef PiercedVector<Cell>::iterator bitpit::PatchKernel::CellIterator |
Definition at line 65 of file patch_kernel.hpp.
typedef PiercedVector<Cell>::range bitpit::PatchKernel::CellRange |
Definition at line 73 of file patch_kernel.hpp.
typedef PiercedVector<Interface>::const_iterator bitpit::PatchKernel::InterfaceConstIterator |
Definition at line 70 of file patch_kernel.hpp.
typedef PiercedVector<Interface>::const_range bitpit::PatchKernel::InterfaceConstRange |
Definition at line 78 of file patch_kernel.hpp.
typedef PiercedVector<Interface>::iterator bitpit::PatchKernel::InterfaceIterator |
Definition at line 66 of file patch_kernel.hpp.
typedef PiercedVector<Interface>::range bitpit::PatchKernel::InterfaceRange |
Definition at line 74 of file patch_kernel.hpp.
typedef PiercedVector<Vertex>::const_iterator bitpit::PatchKernel::VertexConstIterator |
Definition at line 68 of file patch_kernel.hpp.
typedef PiercedVector<Vertex>::const_range bitpit::PatchKernel::VertexConstRange |
Definition at line 76 of file patch_kernel.hpp.
typedef PiercedVector<Vertex>::iterator bitpit::PatchKernel::VertexIterator |
Definition at line 64 of file patch_kernel.hpp.
typedef PiercedVector<Vertex>::range bitpit::PatchKernel::VertexRange |
Definition at line 72 of file patch_kernel.hpp.
Adaption mode
Definition at line 335 of file patch_kernel.hpp.
Adaption status
Definition at line 348 of file patch_kernel.hpp.
Adjacencies build strategy
Definition at line 319 of file patch_kernel.hpp.
Interfaces build strategy
Definition at line 327 of file patch_kernel.hpp.
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.
Partitioning status
Definition at line 366 of file patch_kernel.hpp.
enum bitpit::PatchKernel::WriteTarget |
Definition at line 80 of file patch_kernel.hpp.
bitpit::PatchKernel::PatchKernel | ( | PatchKernel && | other | ) |
Move constructor.
other | is another patch whose content is moved into this |
Definition at line 295 of file patch_kernel.cpp.
|
virtual |
Destroys the patch.
Definition at line 601 of file patch_kernel.cpp.
|
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.
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.
|
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.
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.
|
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.
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.
|
protected |
Copy constructor.
other | is another patch whose content is copied into this |
Definition at line 212 of file patch_kernel.cpp.
|
protectedvirtual |
Alter the patch performing the adaption.
Default implementation is a no-op function.
trackAdaption | if set to true the function will return the changes done to the patch during the adaption |
Reimplemented in bitpit::VolOctree.
Definition at line 5213 of file patch_kernel.cpp.
|
protectedvirtual |
Cleanup patch data structured after the adaption.
Default implementation is a no-op function.
Reimplemented in bitpit::VolOctree.
Definition at line 5227 of file patch_kernel.cpp.
|
protectedvirtual |
Prepares the patch for performing the adaption.
Default implementation is a no-op function.
trackAdaption | if set to true the function will return the changes that will be performed in the alter step |
Reimplemented in bitpit::VolOctree.
Definition at line 5195 of file patch_kernel.cpp.
|
protectedpure virtual |
|
protectedvirtual |
Enables cell balancing.
Default implementation is a no-op function.
id | is the id of the cell |
enabled | defines if enable the balancing for the specified cell |
Reimplemented in bitpit::VolOctree.
Definition at line 5300 of file patch_kernel.cpp.
|
protectedvirtual |
Extracts the neighbours of the specified cell for the given edge.
This function can be only used with three-dimensional cells.
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 3723 of file patch_kernel.cpp.
|
protectedvirtual |
Extracts the neighbours of the specified cell for the given face.
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 3595 of file patch_kernel.cpp.
|
protectedvirtual |
Extracts all the neighbours of the specified cell
This implementation can NOT handle hanging nodes.
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 3502 of file patch_kernel.cpp.
|
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.
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 3888 of file patch_kernel.cpp.
|
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.
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.
|
protectedvirtual |
Returns the adaption marker of the specified cell.
Default implementation always return an undefined marker.
id | is the id of the cell |
Reimplemented in bitpit::VolOctree.
Definition at line 5284 of file patch_kernel.cpp.
|
protectedvirtual |
Get the native index of a cell.
id | is the id of the cell |
Reimplemented in bitpit::VolOctree.
Definition at line 3384 of file patch_kernel.cpp.
|
protectedpure virtual |
|
protectedvirtual |
Gets 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.
|
protectedvirtual |
Marks a cell for coarsening.
Default implementation is a no-op function.
id | the cell to be refined |
Reimplemented in bitpit::VolOctree.
Definition at line 5254 of file patch_kernel.cpp.
|
protectedvirtual |
Marks a cell for refinement.
Default implementation is a no-op function.
id | the cell to be refined |
Reimplemented in bitpit::VolOctree.
Definition at line 5239 of file patch_kernel.cpp.
|
protectedvirtual |
Alter the patch performing the partitioning.
trackPartitioning | if set to true the function will return the changes done to the patch during the partitioning |
Reimplemented in bitpit::VolOctree.
Definition at line 2105 of file patch_kernel_parallel.cpp.
|
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.
|
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.
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 |
Reimplemented in bitpit::VolOctree.
Definition at line 1863 of file patch_kernel_parallel.cpp.
|
protectedvirtual |
Partitions the patch among the processes. Each cell will be assigned to a specific process according to the specified input.
cellRanks | are the ranks of the cells after the partitioning |
trackPartitioning | if set to true, the changes to the patch will be tracked |
Definition at line 1980 of file patch_kernel_parallel.cpp.
|
protectedvirtual |
Internal function to reset the adjacencies.
This function doesn't change the alteration flags.
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 5966 of file patch_kernel.cpp.
|
protectedvirtual |
Resets the adaption marker of the specified cell.
Default implementation is a no-op function.
id | the cell to be refined |
Reimplemented in bitpit::VolOctree.
Definition at line 5269 of file patch_kernel.cpp.
|
protectedvirtual |
Internal function to reset the interfaces of the patch.
This function doesn't change the alteration flags.
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 relased |
Definition at line 1059 of file patch_kernel.cpp.
|
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 7620 of file patch_kernel.cpp.
|
protectedpure virtual |
|
protectedvirtual |
Internal function to set the size, expressed in number of layers, of the ghost cells halo.
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.
|
protectedvirtual |
Internal function to set the tolerance for the geometrical checks.
tolerance | is the tolerance that will be used for the geometrical checks |
Reimplemented in bitpit::VolOctree.
Definition at line 7586 of file patch_kernel.cpp.
|
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 6024 of file patch_kernel.cpp.
|
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 6516 of file patch_kernel.cpp.
|
protectedvirtual |
Internal function to be called after writing the patch.
Definition at line 1280 of file patch_kernel.cpp.
|
protectedvirtual |
Internal function to be called before writing the patch.
Definition at line 1206 of file patch_kernel.cpp.
std::vector< adaption::Info > bitpit::PatchKernel::adaption | ( | bool | trackAdaption = true, |
bool | squeezeStorage = false ) |
Execute patch adaption.
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 |
Definition at line 679 of file patch_kernel.cpp.
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.
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 |
Definition at line 760 of file patch_kernel.cpp.
void bitpit::PatchKernel::adaptionCleanup | ( | ) |
Cleanup patch data structured after the adaption.
The patch will only clean-up the data structures needed for adaption.
Definition at line 794 of file patch_kernel.cpp.
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.
trackAdaption | if set to true the function will return the changes that will be performed in the alter step |
Definition at line 719 of file patch_kernel.cpp.
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.
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 |
Definition at line 908 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 792 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 2806 of file patch_kernel.cpp.
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.
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 |
Definition at line 883 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 772 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 2784 of file patch_kernel.cpp.
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.
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 |
Definition at line 980 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 835 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 2877 of file patch_kernel.cpp.
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.
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 |
Definition at line 948 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 813 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 2848 of file patch_kernel.cpp.
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.
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 |
Definition at line 1010 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 859 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 2904 of file patch_kernel.cpp.
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.
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 |
Definition at line 4399 of file patch_kernel.cpp.
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.
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 |
Definition at line 4489 of file patch_kernel.cpp.
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.
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 |
Definition at line 4466 of file patch_kernel.cpp.
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.
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 |
Definition at line 4516 of file patch_kernel.cpp.
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.
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 |
Definition at line 4422 of file patch_kernel.cpp.
|
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.
point | is the a new point that will be added to the bounding box |
Definition at line 7228 of file patch_kernel.cpp.
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.
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 |
Definition at line 1921 of file patch_kernel.cpp.
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.
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 |
Definition at line 1847 of file patch_kernel.cpp.
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.
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 |
Definition at line 1872 of file patch_kernel.cpp.
bool bitpit::PatchKernel::areAdjacenciesDirty | ( | bool | global = false | ) | const |
Checks if the adjacencies are dirty.
global | if set to true, the dirty status will be evaluated globally across all the partitions |
Definition at line 5807 of file patch_kernel.cpp.
bool bitpit::PatchKernel::areInterfacesDirty | ( | bool | global = false | ) | const |
Checks if the interfaces are dirty.
global | if set to true, the dirty status will be evaluated globally across all the partitions |
Definition at line 6298 of file patch_kernel.cpp.
bool bitpit::PatchKernel::arePartitioningInfoDirty | ( | bool | global = true | ) | const |
Checks if the partitioning information are dirty.
global | if set to true, the dirty status will be evaluated globally across all the partitions |
Definition at line 4294 of file patch_kernel_parallel.cpp.
|
protected |
Group specified vertices on regular bins.
[in] | vertices | are the vertices to be sorted |
[in] | nBins | is the number of bins (on each space direction) |
Definition at line 7365 of file patch_kernel.cpp.
|
protected |
Group vertices on regular bins.
[in] | nBins | is the number of bins (on each space direction) |
Definition at line 7353 of file patch_kernel.cpp.
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 5840 of file patch_kernel.cpp.
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 6333 of file patch_kernel.cpp.
PatchKernel::CellIterator bitpit::PatchKernel::cellBegin | ( | ) |
Returns iterator pointing to the first cell.
Definition at line 2634 of file patch_kernel.cpp.
PatchKernel::CellConstIterator bitpit::PatchKernel::cellConstBegin | ( | ) | const |
Returns a constant iterator pointing to the first cell.
Definition at line 2708 of file patch_kernel.cpp.
PatchKernel::CellConstIterator bitpit::PatchKernel::cellConstEnd | ( | ) | const |
Returns a constant iterator pointing to last cell.
Definition at line 2718 of file patch_kernel.cpp.
PatchKernel::CellIterator bitpit::PatchKernel::cellEnd | ( | ) |
Returns iterator pointing to last cell.
Definition at line 2644 of file patch_kernel.cpp.
|
protected |
Clears the bounding box.
The box will be cleared also if it declared frozen.
Definition at line 7070 of file patch_kernel.cpp.
|
pure virtual |
|
static |
Creates a clone of the specified pach.
original | is the patch that will be cloned |
Definition at line 39 of file patch_kernel.tpp.
std::vector< long > bitpit::PatchKernel::collapseCoincidentVertices | ( | ) |
Find and collapse coincident vertices. Cell connectivity is automatically updated.
Definition at line 2230 of file patch_kernel.cpp.
|
protected |
Renumber the ids of the items in the specified container.
container | is the container |
offset | is the offset that will be used |
Definition at line 199 of file patch_kernel.tpp.
void bitpit::PatchKernel::consecutiveRenumber | ( | long | vertexOffset, |
long | cellOffset, | ||
long | interfaceOffset ) |
Renumbering vertices, cells and interfaces consecutively, starting from given offsets.
[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 8175 of file patch_kernel.cpp.
void bitpit::PatchKernel::consecutiveRenumberCells | ( | long | offset = 0 | ) |
Renumbers cells consecutively, starting from a given offset.
[in] | offset | is the starting id |
Definition at line 8089 of file patch_kernel.cpp.
void bitpit::PatchKernel::consecutiveRenumberInterfaces | ( | long | offset = 0 | ) |
Renumbers interfaces consecutively, starting from a given offset.
[in] | offset | is the starting id |
Definition at line 8146 of file patch_kernel.cpp.
void bitpit::PatchKernel::consecutiveRenumberVertices | ( | long | offset = 0 | ) |
Renumbers vertices consecutively, starting from a given offset.
[in] | offset | is the starting id |
Definition at line 8063 of file patch_kernel.cpp.
long bitpit::PatchKernel::countBorderCells | ( | ) | const |
Counts border cells within the patch.
A cell is border if contains at least one border face.
Definition at line 3206 of file patch_kernel.cpp.
long bitpit::PatchKernel::countBorderFaces | ( | ) | const |
Counts border faces within the patch.
A face is border if a cell has no adjacent along that faces.
Definition at line 4864 of file patch_kernel.cpp.
long bitpit::PatchKernel::countBorderInterfaces | ( | ) | const |
Counts border interfaces within the patch.
An interface is border if belongs to just one cell.
Definition at line 4722 of file patch_kernel.cpp.
long bitpit::PatchKernel::countBorderVertices | ( | ) | const |
Counts border vertices within the patch.
A border vertex is a vertex on a border face.
Definition at line 2118 of file patch_kernel.cpp.
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.
Definition at line 3286 of file patch_kernel.cpp.
long bitpit::PatchKernel::countFaces | ( | ) | const |
Count faces within the patch.
Definition at line 4828 of file patch_kernel.cpp.
long bitpit::PatchKernel::countFreeCells | ( | ) | const |
Counts free cells within the patch.
A cell is free if contains at least one free face.
Definition at line 3194 of file patch_kernel.cpp.
long bitpit::PatchKernel::countFreeFaces | ( | ) | const |
Counts free faces within the patch.
A face is free if a cell has no adjacent along that faces.
Definition at line 4852 of file patch_kernel.cpp.
long bitpit::PatchKernel::countFreeInterfaces | ( | ) | const |
Counts free interfaces within the patch.
An interface is free if belongs to just one cell.
Definition at line 4710 of file patch_kernel.cpp.
long bitpit::PatchKernel::countFreeVertices | ( | ) | const |
Counts free vertices within the patch.
A free vertex is a vertex on a free face.
Definition at line 2106 of file patch_kernel.cpp.
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)
Definition at line 3230 of file patch_kernel.cpp.
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.
Definition at line 4742 of file patch_kernel.cpp.
long bitpit::PatchKernel::countOrphanVertices | ( | ) | const |
Count orphan vertices in the patch.
An orphan vertex is a vertex not linked by any cells.
Definition at line 2146 of file patch_kernel.cpp.
bool bitpit::PatchKernel::deleteCell | ( | long | id | ) |
Deletes a cell.
id | is the id of the cell |
Definition at line 3099 of file patch_kernel.cpp.
bool bitpit::PatchKernel::deleteCells | ( | const IdStorage & | ids | ) |
Deletes a list of cells.
ids | are the ids of the cells to be deleted |
Definition at line 54 of file patch_kernel.tpp.
bool bitpit::PatchKernel::deleteCoincidentVertices | ( | ) |
Remove coincident vertices from the patch.
Definition at line 2320 of file patch_kernel.cpp.
bool bitpit::PatchKernel::deleteInterface | ( | long | id | ) |
Deletes an interface.
id | is the id of the interface |
Definition at line 4661 of file patch_kernel.cpp.
bool bitpit::PatchKernel::deleteInterfaces | ( | const IdStorage & | ids | ) |
Deletes a list of interfaces.
ids | are the ids of the interfaces to be deleted |
Definition at line 156 of file patch_kernel.tpp.
bool bitpit::PatchKernel::deleteOrphanInterfaces | ( | ) |
Remove orphan interfaces
Definition at line 4781 of file patch_kernel.cpp.
bool bitpit::PatchKernel::deleteOrphanVertices | ( | ) |
Remove orphan vertices
Definition at line 2211 of file patch_kernel.cpp.
|
protected |
Deletes a vertex.
id | is the id of the vertex |
Definition at line 2053 of file patch_kernel.cpp.
|
protected |
Deletes a list of vertices.
ids | are the ids of the vertices to be deleted |
Definition at line 105 of file patch_kernel.tpp.
void bitpit::PatchKernel::destroyAdjacencies | ( | ) |
Destroy the adjacencies.
After deleting the adjacencies, this function changes the build strategy to "None".
Definition at line 5920 of file patch_kernel.cpp.
void bitpit::PatchKernel::destroyInterfaces | ( | ) |
Destroy the interfaces.
After deleting the interfaces, this function changes the build strategy to "None".
Definition at line 6433 of file patch_kernel.cpp.
void bitpit::PatchKernel::displayCells | ( | std::ostream & | out, |
unsigned int | padding = 0 ) const |
Display all the cells currently stored within the patch.
[in,out] | out | output stream |
[in] | padding | (default = 0) number of leading spaces for formatted output |
Definition at line 7754 of file patch_kernel.cpp.
void bitpit::PatchKernel::displayInterfaces | ( | std::ostream & | out, |
unsigned int | padding = 0 ) const |
Display all the interfaces currently stored within the patch.
[in,out] | out | output stream |
[in] | padding | (default = 0) number of leading spaces for formatted output |
Definition at line 7770 of file patch_kernel.cpp.
void bitpit::PatchKernel::displayTopologyStats | ( | std::ostream & | out, |
unsigned int | padding = 0 ) const |
Display patch statistics.
[in,out] | out | output stream |
[in] | padding | (default = 0) number of leading spaces for formatted output |
Definition at line 7701 of file patch_kernel.cpp.
void bitpit::PatchKernel::displayVertices | ( | std::ostream & | out, |
unsigned int | padding = 0 ) const |
Display all the vertices currently stored within the patch.
[in,out] | out | output stream |
[in] | padding | (default = 0) number of leading spaces for formatted output |
Definition at line 7738 of file patch_kernel.cpp.
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.
stream | is the stream to write to |
Definition at line 8203 of file patch_kernel.cpp.
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.
stream | is the stream to write to |
Definition at line 8224 of file patch_kernel.cpp.
|
protected |
Write the cells to the specified stream.
stream | is the stream to write to |
Definition at line 4975 of file patch_kernel.cpp.
|
protected |
Write the interfaces to the specified stream.
stream | is the stream to write to |
Definition at line 5096 of file patch_kernel.cpp.
|
protected |
Write the vertices to the specified stream.
stream | is the stream to write to |
Definition at line 4884 of file patch_kernel.cpp.
bool bitpit::PatchKernel::empty | ( | bool | global = true | ) | const |
Return true if the patch is empty.
global | if set to true, the empty status will be evaluated globally across all the partitions |
Definition at line 2379 of file patch_kernel.cpp.
void bitpit::PatchKernel::enableCellBalancing | ( | long | id, |
bool | enabled ) |
Enables cell balancing.
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.
|
virtual |
Evaluates the bounding box of the specified cell.
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 5509 of file patch_kernel.cpp.
|
virtual |
Evaluates the centroid of the specified cell.
id | is the id of the cell |
Reimplemented in bitpit::VolCartesian, and bitpit::VolOctree.
Definition at line 5495 of file patch_kernel.cpp.
|
pure virtual |
Implemented in bitpit::LineKernel, bitpit::PointKernel, bitpit::SurfaceKernel, bitpit::VolCartesian, bitpit::VolOctree, and bitpit::VolUnstructured.
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.
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 5667 of file patch_kernel.cpp.
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.
element | is the element |
Definition at line 5650 of file patch_kernel.cpp.
|
virtual |
Evaluates the bounding box of the specified interface.
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 5585 of file patch_kernel.cpp.
|
virtual |
Evaluates the centroid of the specified interface.
id | is the id of the interface |
Definition at line 5571 of file patch_kernel.cpp.
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.
Definition at line 1774 of file patch_kernel_parallel.cpp.
double bitpit::PatchKernel::evalPartitioningUnbalance | ( | const std::unordered_map< long, double > & | cellWeights | ) | const |
Evaluate partitioning load unbalance index.
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. |
Definition at line 1789 of file patch_kernel_parallel.cpp.
|
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.
[in,out] | envelope | is the patch to which the external envelope will be appended |
Definition at line 7646 of file patch_kernel.cpp.
|
protectedvirtual |
Finds the face of the supposed neighbour that adjoins the target face.
cell | is the cell |
cellFace | is the target face of the cell |
neigh | is the supposed neighbour of the cell |
Reimplemented in bitpit::VolOctree.
Definition at line 6734 of file patch_kernel.cpp.
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.
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 3642 of file patch_kernel.cpp.
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.
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 |
Definition at line 3620 of file patch_kernel.cpp.
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.
id | is the id of the cell |
edge | is an edge of the cell |
Definition at line 3683 of file patch_kernel.cpp.
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.
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 3703 of file patch_kernel.cpp.
std::vector< long > bitpit::PatchKernel::findCellFaceNeighs | ( | long | id | ) | const |
Extracts the neighbours of all the faces of the specified cell.
id | is the id of the cell |
Definition at line 3480 of file patch_kernel.cpp.
std::vector< long > bitpit::PatchKernel::findCellFaceNeighs | ( | long | id, |
int | face ) const |
Extracts the neighbours of the specified cell for the given face.
id | is the id of the cell |
face | is a face of the cell |
Definition at line 3559 of file patch_kernel.cpp.
void bitpit::PatchKernel::findCellFaceNeighs | ( | long | id, |
int | face, | ||
std::vector< long > * | neighs ) const |
Extracts the neighbours of the specified cell for the given face.
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 3577 of file patch_kernel.cpp.
void bitpit::PatchKernel::findCellFaceNeighs | ( | long | id, |
std::vector< long > * | neighs ) const |
Extracts the neighbours of all the faces of the specified cell.
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 3531 of file patch_kernel.cpp.
std::vector< long > bitpit::PatchKernel::findCellNeighs | ( | long | id | ) | const |
Extracts all the neighbours of the specified cell
id | is the id of the cell |
Definition at line 3395 of file patch_kernel.cpp.
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.
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 3461 of file patch_kernel.cpp.
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.
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. |
Definition at line 3433 of file patch_kernel.cpp.
void bitpit::PatchKernel::findCellNeighs | ( | long | id, |
std::vector< long > * | neighs ) const |
Extracts all the neighbours of the specified cell
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 3411 of file patch_kernel.cpp.
void bitpit::PatchKernel::findCellVertexNeighs | ( | long | id, |
bool | complete, | ||
std::vector< long > * | neighs ) const |
Extracts the neighbours of all the vertices of the specified cell.
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 3798 of file patch_kernel.cpp.
std::vector< long > bitpit::PatchKernel::findCellVertexNeighs | ( | long | id, |
bool | complete = true ) const |
Extracts the neighbours of all the vertices of the specified cell.
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 |
Definition at line 3778 of file patch_kernel.cpp.
std::vector< long > bitpit::PatchKernel::findCellVertexNeighs | ( | long | id, |
int | vertex ) const |
Extracts the neighbours of the specified cell for the given local vertex.
id | is the id of the cell |
vertex | is a vertex of the cell |
Definition at line 3836 of file patch_kernel.cpp.
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.
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 3854 of file patch_kernel.cpp.
std::vector< long > bitpit::PatchKernel::findCellVertexOneRing | ( | long | id, |
int | vertex ) const |
Finds the one-ring of the specified vertex of the cell.
id | is the id of the cell |
vertex | is a vertex of the cell |
Definition at line 4007 of file patch_kernel.cpp.
void bitpit::PatchKernel::findCellVertexOneRing | ( | long | id, |
int | vertex, | ||
std::vector< long > * | ring ) const |
Finds the one-ring of the specified vertex of the cell.
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 4025 of file patch_kernel.cpp.
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.
Definition at line 3299 of file patch_kernel.cpp.
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.
[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 |
Definition at line 4047 of file patch_kernel.cpp.
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)
Definition at line 3243 of file patch_kernel.cpp.
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.
Definition at line 4764 of file patch_kernel.cpp.
std::vector< long > bitpit::PatchKernel::findOrphanVertices | ( | ) |
Find orphan vertices in the patch.
An orphan vertex is a vertex not linked by any cells.
Definition at line 2167 of file patch_kernel.cpp.
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.
vertexId | is the index of the vertex |
Definition at line 4116 of file patch_kernel.cpp.
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.
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 4134 of file patch_kernel.cpp.
|
overridevirtual |
Interface for writing data to stream.
[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 7900 of file patch_kernel.cpp.
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:
Definition at line 1312 of file patch_kernel.cpp.
PatchKernel::AdaptionStatus bitpit::PatchKernel::getAdaptionStatus | ( | bool | global = false | ) | const |
Returns the current adaption status.
Adaption mode tells which stage of the adaption process
global | if set to true, the adaption status will be evaluated globally across all the partitions |
Definition at line 1338 of file patch_kernel.cpp.
PatchKernel::AdjacenciesBuildStrategy bitpit::PatchKernel::getAdjacenciesBuildStrategy | ( | ) | const |
Returns the current adjacencies build strategy.
Definition at line 5785 of file patch_kernel.cpp.
void bitpit::PatchKernel::getBoundingBox | ( | bool | global, |
std::array< double, 3 > & | minPoint, | ||
std::array< double, 3 > & | maxPoint ) const |
Gets the previously stored patch bounding box.
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 7118 of file patch_kernel.cpp.
void bitpit::PatchKernel::getBoundingBox | ( | std::array< double, 3 > & | minPoint, |
std::array< double, 3 > & | maxPoint ) const |
Gets the previously stored patch bounding box.
[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 7105 of file patch_kernel.cpp.
Cell & bitpit::PatchKernel::getCell | ( | long | id | ) |
Gets a reference to the cell with the specified id.
id | is the id of the requested cell |
Definition at line 2572 of file patch_kernel.cpp.
const Cell & bitpit::PatchKernel::getCell | ( | long | id | ) | const |
Gets a constant reference to the cell with the specified id.
id | is the id of the requested cell |
Definition at line 2583 of file patch_kernel.cpp.
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).
id | is the id of the cell |
Definition at line 938 of file patch_kernel.cpp.
|
protected |
Get the alteration flags of the specified cell.
id | is the id of the cell |
Definition at line 6795 of file patch_kernel.cpp.
PatchKernel::CellConstIterator bitpit::PatchKernel::getCellConstIterator | ( | long | id | ) | const |
Returns a constant iterator pointing to the specified cell.
Definition at line 2698 of file patch_kernel.cpp.
|
virtual |
Gets the number of cells in the patch.
Reimplemented in bitpit::VolCartesian.
Definition at line 2521 of file patch_kernel.cpp.
int bitpit::PatchKernel::getCellHaloLayer | ( | long | id | ) | const |
Gets the halo layer of the specified cell.
id | is the id of the requested cell |
Definition at line 3815 of file patch_kernel_parallel.cpp.
PatchKernel::CellIterator bitpit::PatchKernel::getCellIterator | ( | long | id | ) |
Returns an iterator pointing to the specified cell.
Definition at line 2624 of file patch_kernel.cpp.
int bitpit::PatchKernel::getCellOwner | ( | long | id | ) | const |
Gets the rank of the process that owns the specified cell.
id | is the id of the requested cell |
Definition at line 3799 of file patch_kernel_parallel.cpp.
int bitpit::PatchKernel::getCellRank | ( | long | id | ) | const |
Gets the rank of the process that owns the specified cell.
id | is the id of the requested cell |
Definition at line 3783 of file patch_kernel_parallel.cpp.
PiercedVector< Cell > & bitpit::PatchKernel::getCells | ( | ) |
Gets the cells owned by the patch.
Definition at line 2551 of file patch_kernel.cpp.
const PiercedVector< Cell > & bitpit::PatchKernel::getCells | ( | ) | const |
Gets a constant reference of the cells owned by the patch.
Definition at line 2561 of file patch_kernel.cpp.
|
virtual |
Gets the element type for the cell with the specified id.
id | is the id of the requested cell |
Reimplemented in bitpit::VolCartesian, and bitpit::VolCartesian.
Definition at line 2594 of file patch_kernel.cpp.
ConstProxyVector< std::array< double, 3 > > bitpit::PatchKernel::getCellVertexCoordinates | ( | long | id | ) | const |
Get vertex coordinates of the specified cell.
id | is the id of the cell |
Definition at line 5522 of file patch_kernel.cpp.
void bitpit::PatchKernel::getCellVertexCoordinates | ( | long | id, |
std::array< double, 3 > * | coordinates ) const |
Get vertex coordinates of the specified cell.
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 5558 of file patch_kernel.cpp.
void bitpit::PatchKernel::getCellVertexCoordinates | ( | long | id, |
std::unique_ptr< std::array< double, 3 >[]> * | coordinates ) const |
Get vertex coordinates of the specified cell.
id | is the id of the cell | |
[out] | coordinates | on output will contain the vertex coordinates |
Definition at line 5543 of file patch_kernel.cpp.
const MPI_Comm & bitpit::PatchKernel::getCommunicator | ( | ) | const |
Gets the MPI communicator associated with the patch
Definition at line 128 of file patch_kernel_parallel.cpp.
int bitpit::PatchKernel::getDimension | ( | ) | const |
Gets the dimension of the patch.
Definition at line 1525 of file patch_kernel.cpp.
int bitpit::PatchKernel::getDumpVersion | ( | ) | const |
Get the version associated to the binary dumps.
Definition at line 8187 of file patch_kernel.cpp.
ConstProxyVector< std::array< double, 3 > > bitpit::PatchKernel::getElementVertexCoordinates | ( | const Element & | element | ) | const |
Get the coordinates of the specified element
element | is the element |
Definition at line 7307 of file patch_kernel.cpp.
void bitpit::PatchKernel::getElementVertexCoordinates | ( | const Element & | element, |
std::array< double, 3 > * | coordinates ) const |
Get vertex coordinates of the specified element
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 7341 of file patch_kernel.cpp.
void bitpit::PatchKernel::getElementVertexCoordinates | ( | const Element & | element, |
std::unique_ptr< std::array< double, 3 >[]> * | coordinates ) const |
Get vertex coordinates of the specified element
element | is the element | |
[out] | coordinates | on output will contain the vertex coordinates |
Definition at line 7327 of file patch_kernel.cpp.
Cell & bitpit::PatchKernel::getFirstGhost | ( | ) |
Gets a reference to the first ghost cell.
Definition at line 731 of file patch_kernel_parallel.cpp.
const Cell & bitpit::PatchKernel::getFirstGhost | ( | ) | const |
Gets a constant reference to the first ghost cell.
Definition at line 751 of file patch_kernel_parallel.cpp.
Cell & bitpit::PatchKernel::getFirstGhostCell | ( | ) |
Gets a reference to the first ghost cell.
Definition at line 721 of file patch_kernel_parallel.cpp.
const Cell & bitpit::PatchKernel::getFirstGhostCell | ( | ) | const |
Gets a constant reference to the first ghost cell.
Definition at line 741 of file patch_kernel_parallel.cpp.
Vertex & bitpit::PatchKernel::getFirstGhostVertex | ( | ) |
Gets a reference to the first ghost vertex.
Definition at line 444 of file patch_kernel_parallel.cpp.
const Vertex & bitpit::PatchKernel::getFirstGhostVertex | ( | ) | const |
Gets a constant reference to the first ghost vertex.
Definition at line 454 of file patch_kernel_parallel.cpp.
long bitpit::PatchKernel::getGhostCellCount | ( | ) | const |
Gets the number of ghost cells in the patch.
Definition at line 701 of file patch_kernel_parallel.cpp.
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.
Definition at line 4070 of file patch_kernel_parallel.cpp.
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.
rank | is the rank to which data will be send |
Definition at line 4112 of file patch_kernel_parallel.cpp.
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.
Definition at line 3986 of file patch_kernel_parallel.cpp.
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.
rank | is the rank data will be received from |
Definition at line 4028 of file patch_kernel_parallel.cpp.
long bitpit::PatchKernel::getGhostCount | ( | ) | const |
Gets the number of ghost cells in the patch.
Definition at line 711 of file patch_kernel_parallel.cpp.
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.
Definition at line 4091 of file patch_kernel_parallel.cpp.
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.
rank | is the rank to which data will be send |
Definition at line 4133 of file patch_kernel_parallel.cpp.
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.
Definition at line 4007 of file patch_kernel_parallel.cpp.
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.
rank | is the rank data will be received from |
Definition at line 4049 of file patch_kernel_parallel.cpp.
long bitpit::PatchKernel::getGhostVertexCount | ( | ) | const |
Gets the number of ghost vertices in the patch.
Definition at line 434 of file patch_kernel_parallel.cpp.
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.
Definition at line 3943 of file patch_kernel_parallel.cpp.
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.
rank | is the rank to which data will be send |
Definition at line 3965 of file patch_kernel_parallel.cpp.
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.
Definition at line 3900 of file patch_kernel_parallel.cpp.
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.
rank | is the rank data will be received from |
Definition at line 3921 of file patch_kernel_parallel.cpp.
std::size_t bitpit::PatchKernel::getHaloSize | ( | ) | const |
Gets the size, expressed in number of layers, of the ghost cells halo.
Definition at line 315 of file patch_kernel_parallel.cpp.
int bitpit::PatchKernel::getId | ( | ) | const |
Gets the id associated with the patch.
Definition at line 1495 of file patch_kernel.cpp.
Interface & bitpit::PatchKernel::getInterface | ( | long | id | ) |
Gets a reference to the interface with the specified id.
id | is the id of the requested interface |
Definition at line 4297 of file patch_kernel.cpp.
const Interface & bitpit::PatchKernel::getInterface | ( | long | id | ) | const |
Gets a constant reference to the interface with the specified id.
id | is the id of the requested interface |
Definition at line 4308 of file patch_kernel.cpp.
|
protected |
Get the alteration flags of the specified interface.
id | is the id of the interface |
Definition at line 6874 of file patch_kernel.cpp.
PatchKernel::InterfaceConstIterator bitpit::PatchKernel::getInterfaceConstIterator | ( | long | id | ) | const |
Returns a constant iterator pointing to the specified interface.
Definition at line 4359 of file patch_kernel.cpp.
|
virtual |
Gets the number of interfaces in the patch.
Reimplemented in bitpit::VolCartesian.
Definition at line 4266 of file patch_kernel.cpp.
PatchKernel::InterfaceIterator bitpit::PatchKernel::getInterfaceIterator | ( | long | id | ) |
Returns an iterator pointing to the specified interface.
Definition at line 4329 of file patch_kernel.cpp.
PiercedVector< Interface > & bitpit::PatchKernel::getInterfaces | ( | ) |
Gets the interfaces owned by the patch.
Definition at line 4276 of file patch_kernel.cpp.
const PiercedVector< Interface > & bitpit::PatchKernel::getInterfaces | ( | ) | const |
Gets a constant reference to the interfaces owned by the patch.
Definition at line 4286 of file patch_kernel.cpp.
PatchKernel::InterfacesBuildStrategy bitpit::PatchKernel::getInterfacesBuildStrategy | ( | ) | const |
Returns the current interfaces build strategy.
Definition at line 6270 of file patch_kernel.cpp.
|
virtual |
Gets the element type for the interface with the specified id.
id | is the id of the requested interface |
Reimplemented in bitpit::VolCartesian, and bitpit::VolCartesian.
Definition at line 4319 of file patch_kernel.cpp.
ConstProxyVector< std::array< double, 3 > > bitpit::PatchKernel::getInterfaceVertexCoordinates | ( | long | id | ) | const |
Get vertex coordinates of the specified interface.
id | is the id of the interface |
Definition at line 5598 of file patch_kernel.cpp.
void bitpit::PatchKernel::getInterfaceVertexCoordinates | ( | long | id, |
std::array< double, 3 > * | coordinates ) const |
Get vertex coordinates of the specified interface.
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 5634 of file patch_kernel.cpp.
void bitpit::PatchKernel::getInterfaceVertexCoordinates | ( | long | id, |
std::unique_ptr< std::array< double, 3 >[]> * | coordinates ) const |
Get vertex coordinates of the specified interface.
id | is the id of the interface | |
[out] | coordinates | on output will contain the vertex coordinates |
Definition at line 5619 of file patch_kernel.cpp.
long bitpit::PatchKernel::getInternalCellCount | ( | ) | const |
Gets the number of internal cells in the patch.
Definition at line 2531 of file patch_kernel.cpp.
std::set< int > bitpit::PatchKernel::getInternalCellPIDs | ( | ) |
Get the PIDs of the internal cells.
Definition at line 4078 of file patch_kernel.cpp.
std::vector< long > bitpit::PatchKernel::getInternalCellsByPID | ( | int | pid | ) |
Get all the internal cells which belongs to the specified PID.
pid | is the PID |
Definition at line 4095 of file patch_kernel.cpp.
long bitpit::PatchKernel::getInternalCount | ( | ) | const |
Gets the number of internal cells in the patch.
Definition at line 2541 of file patch_kernel.cpp.
long bitpit::PatchKernel::getInternalVertexCount | ( | ) | const |
Gets the number of internal vertices in the patch.
Definition at line 1654 of file patch_kernel.cpp.
Cell & bitpit::PatchKernel::getLastInternalCell | ( | ) |
Gets a reference to the last internal cell.
Definition at line 2604 of file patch_kernel.cpp.
const Cell & bitpit::PatchKernel::getLastInternalCell | ( | ) | const |
Gets a constant reference to the last internal cell.
Definition at line 2614 of file patch_kernel.cpp.
Vertex & bitpit::PatchKernel::getLastInternalVertex | ( | ) |
Gets a reference to the last internal vertex.
Definition at line 1706 of file patch_kernel.cpp.
const Vertex & bitpit::PatchKernel::getLastInternalVertex | ( | ) | const |
Gets a constant reference to the last internal vertex.
Definition at line 1716 of file patch_kernel.cpp.
|
pure virtual |
Implemented in bitpit::LineKernel, bitpit::PointKernel, bitpit::SurfaceKernel, and bitpit::VolumeKernel.
std::vector< int > bitpit::PatchKernel::getNeighbourRanks | ( | ) |
Get a list of neighbour ranks.
Definition at line 3873 of file patch_kernel_parallel.cpp.
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).
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) |
Definition at line 211 of file patch_kernel_parallel.cpp.
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:
Definition at line 1712 of file patch_kernel_parallel.cpp.
PatchKernel::PartitioningStatus bitpit::PatchKernel::getPartitioningStatus | ( | bool | global = false | ) | const |
Returns the current partitioning status.
global | if set to true the partitioning status will be |
Definition at line 1736 of file patch_kernel_parallel.cpp.
|
pure virtual |
Implemented in bitpit::LineKernel, bitpit::PointKernel, bitpit::SurfaceKernel, and bitpit::VolumeKernel.
int bitpit::PatchKernel::getProcessorCount | ( | ) | const |
Count the MPI processes in the communicator associated with the patch.
Definition at line 167 of file patch_kernel_parallel.cpp.
int bitpit::PatchKernel::getRank | ( | ) | const |
Gets the MPI rank associated with the patch.
Definition at line 156 of file patch_kernel_parallel.cpp.
|
pure virtual |
Implemented in bitpit::LineKernel, bitpit::PointKernel, bitpit::SurfaceKernel, and bitpit::VolumeKernel.
double bitpit::PatchKernel::getTol | ( | ) | const |
Gets the tolerance for geometrical checks.
Definition at line 7596 of file patch_kernel.cpp.
Vertex & bitpit::PatchKernel::getVertex | ( | long | id | ) |
Gets a reference to the vertex with the specified id.
id | is the id of the requested vertex |
Definition at line 1685 of file patch_kernel.cpp.
const Vertex & bitpit::PatchKernel::getVertex | ( | long | id | ) | const |
Gets a constant reference to the vertex with the specified id.
id | is the id of the requested vertex |
Definition at line 1696 of file patch_kernel.cpp.
PatchKernel::VertexConstIterator bitpit::PatchKernel::getVertexConstIterator | ( | long | id | ) | const |
Returns a constant iterator pointing to the specified vertex.
Definition at line 1780 of file patch_kernel.cpp.
const std::array< double, 3 > & bitpit::PatchKernel::getVertexCoords | ( | long | id | ) | const |
Gets the coordinates of the specified vertex.
id | is the id of the vertex |
Definition at line 2338 of file patch_kernel.cpp.
void bitpit::PatchKernel::getVertexCoords | ( | std::size_t | nVertices, |
const long * | ids, | ||
std::array< double, 3 > * | coordinates ) const |
Gets the coordinates of the specified vertices.
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 2365 of file patch_kernel.cpp.
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.
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 2350 of file patch_kernel.cpp.
|
virtual |
Gets the number of vertices in the patch.
Reimplemented in bitpit::VolCartesian.
Definition at line 1644 of file patch_kernel.cpp.
PatchKernel::VertexIterator bitpit::PatchKernel::getVertexIterator | ( | long | id | ) |
Returns an iterator pointing to the specified vertex.
Definition at line 1726 of file patch_kernel.cpp.
int bitpit::PatchKernel::getVertexOwner | ( | long | id | ) | const |
Gets the rank of the process that owns the specified vertex.
id | is the id of the requested vertex |
Definition at line 3847 of file patch_kernel_parallel.cpp.
int bitpit::PatchKernel::getVertexRank | ( | long | id | ) | const |
Gets the rank of the process that owns the specified vertex.
id | is the id of the requested vertex |
Definition at line 3831 of file patch_kernel_parallel.cpp.
PiercedVector< Vertex > & bitpit::PatchKernel::getVertices | ( | ) |
Gets the nodes owned by the patch.
Definition at line 1664 of file patch_kernel.cpp.
const PiercedVector< Vertex > & bitpit::PatchKernel::getVertices | ( | ) | const |
Gets a constant reference to the vertices owned by the patch.
Definition at line 1674 of file patch_kernel.cpp.
|
pure virtual |
Implemented in bitpit::LineKernel, bitpit::PointKernel, bitpit::SurfaceKernel, and bitpit::VolumeKernel.
VTKUnstructuredGrid & bitpit::PatchKernel::getVTK | ( | ) |
Get the VTK object.
Definition at line 7784 of file patch_kernel.cpp.
const VTKUnstructuredGrid & bitpit::PatchKernel::getVTK | ( | ) | const |
const PatchKernel::CellConstRange bitpit::PatchKernel::getVTKCellWriteRange | ( | ) | const |
Get the VTK cell write range.
Definition at line 7824 of file patch_kernel.cpp.
PatchKernel::WriteTarget bitpit::PatchKernel::getVTKWriteTarget | ( | ) | const |
Get the VTK write target.
Definition at line 7804 of file patch_kernel.cpp.
PatchKernel::CellIterator bitpit::PatchKernel::ghostBegin | ( | ) |
Returns iterator to the first ghost cells within the cell list.
Definition at line 1218 of file patch_kernel_parallel.cpp.
PatchKernel::CellIterator bitpit::PatchKernel::ghostCell2InternalCell | ( | long | id | ) |
Converts a ghost cell to an internal cell.
[in] | id | is the index of the cell |
Definition at line 658 of file patch_kernel_parallel.cpp.
PatchKernel::CellIterator bitpit::PatchKernel::ghostCellBegin | ( | ) |
Returns iterator to the first ghost cells within the cell list.
Definition at line 1204 of file patch_kernel_parallel.cpp.
PatchKernel::CellConstIterator bitpit::PatchKernel::ghostCellConstBegin | ( | ) | const |
Returns a constant iterator to the first ghost cells within the cell list.
Definition at line 1248 of file patch_kernel_parallel.cpp.
PatchKernel::CellConstIterator bitpit::PatchKernel::ghostCellConstEnd | ( | ) | const |
Returns a constant iterator to the end of the list of ghost cells.
Definition at line 1272 of file patch_kernel_parallel.cpp.
PatchKernel::CellIterator bitpit::PatchKernel::ghostCellEnd | ( | ) |
Returns iterator to the end of the list of ghost cells.
Definition at line 1228 of file patch_kernel_parallel.cpp.
PatchKernel::CellConstIterator bitpit::PatchKernel::ghostConstBegin | ( | ) | const |
Returns a constant iterator to the first ghost cells within the cell list.
Definition at line 1262 of file patch_kernel_parallel.cpp.
PatchKernel::CellConstIterator bitpit::PatchKernel::ghostConstEnd | ( | ) | const |
Returns a constant iterator to the end of the list of ghost cells.
Definition at line 1282 of file patch_kernel_parallel.cpp.
PatchKernel::CellIterator bitpit::PatchKernel::ghostEnd | ( | ) |
Returns iterator to the end of the list of ghost cells.
Definition at line 1238 of file patch_kernel_parallel.cpp.
|
protected |
Converts a ghost vertex to an internal vertex.
[in] | id | is the index of the vertex |
Definition at line 391 of file patch_kernel_parallel.cpp.
PatchKernel::VertexIterator bitpit::PatchKernel::ghostVertexBegin | ( | ) |
Returns iterator to the first ghost vertex within the vertex list.
Definition at line 551 of file patch_kernel_parallel.cpp.
PatchKernel::VertexConstIterator bitpit::PatchKernel::ghostVertexConstBegin | ( | ) | const |
Returns a constant iterator to the first ghost vertices within the vertex list.
Definition at line 576 of file patch_kernel_parallel.cpp.
PatchKernel::VertexConstIterator bitpit::PatchKernel::ghostVertexConstEnd | ( | ) | const |
Returns a constant iterator to the end of the list of ghost vertices.
Definition at line 590 of file patch_kernel_parallel.cpp.
PatchKernel::VertexIterator bitpit::PatchKernel::ghostVertexEnd | ( | ) |
Returns iterator to the end of the list of ghost vertices.
Definition at line 565 of file patch_kernel_parallel.cpp.
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.
strategy | is the build strategy that will be used |
Definition at line 5853 of file patch_kernel.cpp.
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.
strategy | is the build strategy that will be used |
Definition at line 6349 of file patch_kernel.cpp.
PatchKernel::InterfaceIterator bitpit::PatchKernel::interfaceBegin | ( | ) |
Returns iterator pointing to the first interface.
Definition at line 4339 of file patch_kernel.cpp.
PatchKernel::InterfaceConstIterator bitpit::PatchKernel::interfaceConstBegin | ( | ) | const |
Returnsa a constant iterator pointing to the first interface.
Definition at line 4369 of file patch_kernel.cpp.
PatchKernel::InterfaceConstIterator bitpit::PatchKernel::interfaceConstEnd | ( | ) | const |
Returns a constant iterator pointing to last interface.
Definition at line 4379 of file patch_kernel.cpp.
PatchKernel::InterfaceIterator bitpit::PatchKernel::interfaceEnd | ( | ) |
Returns iterator pointing to last interface.
Definition at line 4349 of file patch_kernel.cpp.
PatchKernel::CellIterator bitpit::PatchKernel::internalBegin | ( | ) |
Returns iterator pointing to the first internal cell.
Definition at line 2664 of file patch_kernel.cpp.
PatchKernel::CellIterator bitpit::PatchKernel::internalCell2GhostCell | ( | long | id, |
int | owner, | ||
int | haloLayer ) |
Converts an internal cell to a ghost cell.
[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.
PatchKernel::CellIterator bitpit::PatchKernel::internalCellBegin | ( | ) |
Returns iterator pointing to the first internal cell.
Definition at line 2654 of file patch_kernel.cpp.
PatchKernel::CellConstIterator bitpit::PatchKernel::internalCellConstBegin | ( | ) | const |
Returns a constant iterator pointing to the first internal cell.
Definition at line 2728 of file patch_kernel.cpp.
PatchKernel::CellConstIterator bitpit::PatchKernel::internalCellConstEnd | ( | ) | const |
Returns a constant iterator pointing to the end of the list of internal cells.
Definition at line 2749 of file patch_kernel.cpp.
PatchKernel::CellIterator bitpit::PatchKernel::internalCellEnd | ( | ) |
Returns iterator pointing to the end of the list of internal cells.
Definition at line 2674 of file patch_kernel.cpp.
PatchKernel::CellConstIterator bitpit::PatchKernel::internalConstBegin | ( | ) | const |
Returns a constant iterator pointing to the first internal cell.
Definition at line 2738 of file patch_kernel.cpp.
PatchKernel::CellConstIterator bitpit::PatchKernel::internalConstEnd | ( | ) | const |
Returns a constant iterator pointing to the end of the list of internal cells.
Definition at line 2764 of file patch_kernel.cpp.
PatchKernel::CellIterator bitpit::PatchKernel::internalEnd | ( | ) |
Returns iterator pointing to the end of the list of internal cells.
Definition at line 2688 of file patch_kernel.cpp.
|
protected |
Converts an internal vertex to a ghost vertex.
[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.
PatchKernel::VertexIterator bitpit::PatchKernel::internalVertexBegin | ( | ) |
Returns iterator pointing to the first internal vertex.
Definition at line 1756 of file patch_kernel.cpp.
PatchKernel::VertexConstIterator bitpit::PatchKernel::internalVertexConstBegin | ( | ) | const |
Returns a constant iterator pointing to the first internal vertex.
Definition at line 1810 of file patch_kernel.cpp.
PatchKernel::VertexConstIterator bitpit::PatchKernel::internalVertexConstEnd | ( | ) | const |
Returns a constant iterator pointing to last internal vertex.
Definition at line 1820 of file patch_kernel.cpp.
PatchKernel::VertexIterator bitpit::PatchKernel::internalVertexEnd | ( | ) |
Returns iterator pointing to the end of the list of internal vertices.
Definition at line 1766 of file patch_kernel.cpp.
bool bitpit::PatchKernel::isAdaptionSupported | ( | ) | const |
Checks if the patch supports adaption.
Definition at line 1290 of file patch_kernel.cpp.
bool bitpit::PatchKernel::isBoundingBoxDirty | ( | bool | global = false | ) | const |
Checks if the bounding box is dirty.
global | if set to true, the dirty status will be evaluated globally across all the partitions |
Definition at line 7166 of file patch_kernel.cpp.
|
protected |
Checks if the bounding box is frozen.
Definition at line 7139 of file patch_kernel.cpp.
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.
Definition at line 2425 of file patch_kernel.cpp.
|
protected |
Checks if the communicator to be used for parallel communications has already been set.
Definition at line 118 of file patch_kernel_parallel.cpp.
bool bitpit::PatchKernel::isDirty | ( | bool | global = false | ) | const |
Returns true if the the patch needs to update its data structures.
global | if set to true, the dirty status will be evaluated globally across all the partitions |
Definition at line 1372 of file patch_kernel.cpp.
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).
Definition at line 187 of file patch_kernel_parallel.cpp.
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, ...).
Definition at line 1460 of file patch_kernel.cpp.
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.
Definition at line 4163 of file patch_kernel.cpp.
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.
Definition at line 4801 of file patch_kernel.cpp.
bool bitpit::PatchKernel::isPartitioned | ( | ) | const |
Checks if the patch is partitioned.
A patch is considered partitioned if its MPI communicator spans multiple processes.
Definition at line 1686 of file patch_kernel_parallel.cpp.
bool bitpit::PatchKernel::isPartitioningSupported | ( | ) | const |
Checks if the patch supports partitioning.
Definition at line 1696 of file patch_kernel_parallel.cpp.
bool bitpit::PatchKernel::isRankNeighbour | ( | int | rank | ) |
Check if the processes associated with the specified rank is a neighbour.
rank | is the rank associated with the process |
Definition at line 3863 of file patch_kernel_parallel.cpp.
|
protectedvirtual |
Check whether the face "face_A" on cell "cell_A" is the same as the face "face_B" on cell "cell_B".
[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 |
Reimplemented in bitpit::VolOctree.
Definition at line 5759 of file patch_kernel.cpp.
bool bitpit::PatchKernel::isThreeDimensional | ( | ) | const |
Returns true if the patch is a three-dimensional patch.
Definition at line 1535 of file patch_kernel.cpp.
bool bitpit::PatchKernel::isTolCustomized | ( | ) | const |
Checks if the tolerance for the geometrical checks has been customized by the user.
Definition at line 7633 of file patch_kernel.cpp.
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.
Definition at line 1548 of file patch_kernel.cpp.
|
pure virtual |
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.
[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 |
Definition at line 5744 of file patch_kernel.cpp.
|
protected |
Renumber the ids of the items in the specified container.
container | is the container |
renumberMap | is the map that will be used for the renumer |
Definition at line 225 of file patch_kernel.tpp.
void bitpit::PatchKernel::markCellForCoarsening | ( | long | id | ) |
Marks a cell for coarsening.
id | is the id of the cell that needs to be coarsened |
Definition at line 904 of file patch_kernel.cpp.
void bitpit::PatchKernel::markCellForRefinement | ( | long | id | ) |
Marks a cell for refinement.
id | is the id of the cell that needs to be refined |
Definition at line 890 of file patch_kernel.cpp.
PatchKernel & bitpit::PatchKernel::operator= | ( | PatchKernel && | other | ) |
Move assignment operator.
other | is another patch whose content is copied into this |
Definition at line 383 of file patch_kernel.cpp.
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.
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 |
Definition at line 1385 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 1438 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 1338 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 1363 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 1415 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 1317 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 1619 of file patch_kernel_parallel.cpp.
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.
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.
trackPartitioning | if set to true, the changes to the patch will be tracked |
Definition at line 1539 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 1582 of file patch_kernel_parallel.cpp.
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.
cellRanks | are the ranks of the cells after the partitioning |
trackPartitioning | if set to true, the changes to the patch will be tracked |
Definition at line 1481 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 1519 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 1561 of file patch_kernel_parallel.cpp.
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.
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 |
Definition at line 1462 of file patch_kernel_parallel.cpp.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
|
protected |
Prune stale adjacencies.
The list of cells to process and the list of stale adjacencies are filled during cell deletion.
Definition at line 5979 of file patch_kernel.cpp.
|
protected |
Prune stale interfaces.
The list of cells to process and the list of stale interfaces are filled during cell deletion.
Definition at line 6459 of file patch_kernel.cpp.
|
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.
point | is the point that will be removed from to the bounding box |
Definition at line 7263 of file patch_kernel.cpp.
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.
[in] | nCells | is size of memory reserve (in terms of number of cells). |
Definition at line 1107 of file patch_kernel.cpp.
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.
[in] | nInterfaces | is size of memory reserve (in terms of number of interfaces). |
Definition at line 1132 of file patch_kernel.cpp.
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.
[in] | nVertices | size of memory reserve (in terms of number of vertices). |
Definition at line 1084 of file patch_kernel.cpp.
|
virtual |
Reset the patch.
Reimplemented in bitpit::VolCartesian, and bitpit::VolOctree.
Definition at line 961 of file patch_kernel.cpp.
|
protected |
Reset the adjacencies.
This function doesn't change the build strategy, it only resets the existing adjacencies.
Definition at line 5943 of file patch_kernel.cpp.
void bitpit::PatchKernel::resetCellAdaptionMarker | ( | long | id | ) |
Resets the adaption marker of the specified cell.
id | is the id of the cell |
Definition at line 918 of file patch_kernel.cpp.
|
protected |
Reset the alteration flags of the given cell.
id | is the id of the cell |
flags | are the flags that will be set |
Definition at line 6806 of file patch_kernel.cpp.
|
virtual |
Reset the cells of the patch.
Definition at line 994 of file patch_kernel.cpp.
|
protected |
Reset the alteration flags of the given interface.
id | is the id of the interface |
flags | are the flags that will be set |
Definition at line 6885 of file patch_kernel.cpp.
|
virtual |
Reset the interfaces of the patch.
This function doesn't change the build strategy, it only resets the existing interface.
Reimplemented in bitpit::VolCartesian.
Definition at line 1030 of file patch_kernel.cpp.
void bitpit::PatchKernel::resetTol | ( | ) |
Resets the tolerance for geometrical checks.
Definition at line 7604 of file patch_kernel.cpp.
|
virtual |
Reset the vertices of the patch.
Definition at line 971 of file patch_kernel.cpp.
void bitpit::PatchKernel::restore | ( | std::istream & | stream, |
bool | reregister = false ) |
Restore the patch from the specified stream.
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 |
Definition at line 8307 of file patch_kernel.cpp.
|
protected |
Restore the cell with the specified id.
The kernel should already contain the cell, only the contents of the cell will be updated.
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 |
Definition at line 1109 of file patch_kernel_parallel.cpp.
|
protected |
Restore the cells from the specified stream.
stream | is the stream to read from |
Definition at line 5021 of file patch_kernel.cpp.
|
protected |
Resore the interface with the specified id.
The kernel should already contain the interface, only the contents of the interface will be updated.
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 |
Definition at line 4598 of file patch_kernel.cpp.
|
protected |
Restore the interfaces from the specified stream.
stream | is the stream to read from |
Definition at line 5128 of file patch_kernel.cpp.
|
protected |
Restore the vertex with the specified id.
The kernel should already contain the vertex, only the contents of the vertex will be updated.
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 |
Definition at line 470 of file patch_kernel_parallel.cpp.
|
protected |
Restore the vertices from the specified stream.
stream | is the stream to read from |
Definition at line 4920 of file patch_kernel.cpp.
|
virtual |
Rotates the patch.
[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 7430 of file patch_kernel.cpp.
void bitpit::PatchKernel::rotate | ( | double | n0x, |
double | n0y, | ||
double | n0z, | ||
double | n1x, | ||
double | n1y, | ||
double | n1z, | ||
double | angle ) |
Rotates the patch.
[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 7477 of file patch_kernel.cpp.
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.
[in] | scaling | is the scaling factor vector |
Definition at line 7490 of file patch_kernel.cpp.
|
virtual |
Scales the patch.
[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 7501 of file patch_kernel.cpp.
void bitpit::PatchKernel::scale | ( | double | scaling | ) |
Scales the patch.
The patch is scaled about the lower-left point of the bounding box.
[in] | scaling | is the scaling factor |
Definition at line 7524 of file patch_kernel.cpp.
void bitpit::PatchKernel::scale | ( | double | scaling, |
const std::array< double, 3 > & | center ) |
Scales the patch.
[in] | scaling | is the scaling factor |
[in] | center | is the center of the scaling |
Definition at line 7535 of file patch_kernel.cpp.
void bitpit::PatchKernel::scale | ( | double | sx, |
double | sy, | ||
double | sz ) |
Scales the patch.
[in] | sx | scaling factor along x direction |
[in] | sy | scaling factor along y direction |
[in] | sz | scaling factor along z direction |
Definition at line 7547 of file patch_kernel.cpp.
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.
[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 7562 of file patch_kernel.cpp.
|
protected |
Set the adaption mode.
See PatchKernel::getAdaptionMode() for a list of supported adaption modes.
mode | is the adaption mode that will be set |
Definition at line 1324 of file patch_kernel.cpp.
|
protected |
Set the current adaption status.
status | is the adaption status that will be set |
Definition at line 1359 of file patch_kernel.cpp.
|
protected |
Set the current adjacencies build strategy.
status | is the adjacencies build strategy that will be set |
Definition at line 5795 of file patch_kernel.cpp.
|
protected |
Sets the bounding box.
The box will be set also if it declared frozen.
minPoint | the minimum point of the patch |
maxPoint | the maximum point of the patch |
Definition at line 7091 of file patch_kernel.cpp.
|
protected |
Sets if the bounding box is dirty.
dirty | controls if the bounding box will be set as dirty |
Definition at line 7186 of file patch_kernel.cpp.
|
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.
frozen | controls if the bounding box will be set as frozen |
Definition at line 7154 of file patch_kernel.cpp.
|
protected |
Set the specified alteration flags for all the cells.
flags | are the flags that will be set |
Definition at line 6816 of file patch_kernel.cpp.
|
protected |
Set the specified alteration flags for the given cell.
id | is the id of the cell |
flags | are the flags that will be set |
Definition at line 6830 of file patch_kernel.cpp.
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.
enabled | if set to true the auto-indexing will be enabled |
Definition at line 2438 of file patch_kernel.cpp.
|
protectedvirtual |
Sets the MPI communicator to be used for parallel communications.
communicator | is the communicator to be used for parallel communications. |
Reimplemented in bitpit::VolOctree.
Definition at line 96 of file patch_kernel_parallel.cpp.
|
virtual |
Sets the dimension of the patch.
dimension | the dimension of the patch |
Reimplemented in bitpit::VolOctree.
Definition at line 1505 of file patch_kernel.cpp.
|
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, ...).
expert | if true, the expert mode will be enabled |
Definition at line 1439 of file patch_kernel.cpp.
void bitpit::PatchKernel::setHaloSize | ( | std::size_t | haloSize | ) |
Sets the size, expressed in number of layers, of the ghost cells halo.
haloSize | is the size, expressed in number of layers, of the ghost cells halo |
Definition at line 285 of file patch_kernel_parallel.cpp.
void bitpit::PatchKernel::setId | ( | int | id | ) |
Sets the id of the patch.
id | the id of the patch |
Definition at line 1470 of file patch_kernel.cpp.
|
protected |
Set the specified alteration flags for all the interfaces.
flags | are the flags that will be set |
Definition at line 6895 of file patch_kernel.cpp.
|
protected |
Set the specified alteration flags for the given interface.
id | is the id of the interface |
flags | are the flags that will be set |
Definition at line 6909 of file patch_kernel.cpp.
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".
enabled | if set to true the auto-indexing will be enabled |
Definition at line 4179 of file patch_kernel.cpp.
|
protected |
Set the current interfaces build strategy.
status | is the interfaces build strategy that will be set |
Definition at line 6280 of file patch_kernel.cpp.
|
protected |
Set the current partitioning mode.
See PatchKernel::getPartitioningMode() for a list of supported partitioning modes.
mode | is the partitioning mode that will be set |
Definition at line 1725 of file patch_kernel_parallel.cpp.
|
protected |
Set the current partitioning status.
status | is the partitioning status that will be set |
Definition at line 1753 of file patch_kernel_parallel.cpp.
|
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.
void bitpit::PatchKernel::setTol | ( | double | tolerance | ) |
Sets the tolerance for the geometrical checks.
tolerance | is the tolerance that will be used for the geometrical checks |
Definition at line 7573 of file patch_kernel.cpp.
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.
enabled | if set to true the auto-indexing will be enabled |
Definition at line 1561 of file patch_kernel.cpp.
void bitpit::PatchKernel::setVTKWriteTarget | ( | WriteTarget | writeTarget | ) |
Set the VTK write target.
writeTarget | is the VTK write target. |
Definition at line 7814 of file patch_kernel.cpp.
|
virtual |
Simulate the adaption of the specified cell.
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.
bool bitpit::PatchKernel::sort | ( | ) |
Sorts internal storage for cells, vertices and interfaces in ascending id order.
Definition at line 5388 of file patch_kernel.cpp.
bool bitpit::PatchKernel::sortCells | ( | ) |
Sorts cell storage in ascending id order.
Internal cells and ghost cells are sordered separately.
Definition at line 5342 of file patch_kernel.cpp.
bool bitpit::PatchKernel::sortInterfaces | ( | ) |
Sorts internal interface storage in ascending id order.
Definition at line 5371 of file patch_kernel.cpp.
bool bitpit::PatchKernel::sortVertices | ( | ) |
Sorts internal vertex storage in ascending id order.
Definition at line 5311 of file patch_kernel.cpp.
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 5464 of file patch_kernel.cpp.
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 5424 of file patch_kernel.cpp.
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 5444 of file patch_kernel.cpp.
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 5404 of file patch_kernel.cpp.
|
protected |
Test if the requested alteration flags are among the available flags.
availableFlags | are the available flags |
requestedFlags | are the requested flags |
Definition at line 6960 of file patch_kernel.cpp.
|
protected |
Test the specified alteration flags for the given cell.
id | is the id of the cell |
flags | are the flags that will be tested |
Definition at line 6784 of file patch_kernel.cpp.
|
protected |
Test the specified alteration flags for the given interface.
id | is the id of the interface |
flags | are the flags that will be tested |
Definition at line 6863 of file patch_kernel.cpp.
|
virtual |
Translates the patch.
[in] | translation | is the translation vector |
Reimplemented in bitpit::VolCartesian, and bitpit::VolOctree.
Definition at line 7396 of file patch_kernel.cpp.
void bitpit::PatchKernel::translate | ( | double | sx, |
double | sy, | ||
double | sz ) |
Translates the patch.
[in] | sx | translation along x direction |
[in] | sy | translation along y direction |
[in] | sz | translation along z direction |
Definition at line 7417 of file patch_kernel.cpp.
|
protected |
Unset the specified alteration flags for all the altered cells.
flags | are the flags that will be unset |
Definition at line 6840 of file patch_kernel.cpp.
|
protected |
Unset the specified alteration flags for the given cell.
id | is the id of the cell |
flags | are the flags that will be unset |
Definition at line 6851 of file patch_kernel.cpp.
|
protected |
Unset the specified alteration flags for all the altered interfaces.
flags | are the flags that will be unset |
Definition at line 6919 of file patch_kernel.cpp.
|
protected |
Unset the specified alteration flags for the given interface.
id | is the id of the interface |
flags | are the flags that will be unset |
Definition at line 6930 of file patch_kernel.cpp.
std::vector< adaption::Info > bitpit::PatchKernel::update | ( | bool | trackAdaption = true, |
bool | squeezeStorage = false ) |
Commit all pending changes.
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 |
Definition at line 625 of file patch_kernel.cpp.
void bitpit::PatchKernel::updateAdjacencies | ( | bool | forcedUpdated = false | ) |
Update the adjacencies of the patch.
forcedUpdated | if set to true, bounding box information will be updated also if they are not marked as dirty |
Definition at line 5885 of file patch_kernel.cpp.
void bitpit::PatchKernel::updateBoundingBox | ( | bool | forcedUpdated = false | ) |
Updates the stored patch bounding box.
forcedUpdated | if set to true, bounding box information will be updated also if they are not marked as dirty |
Definition at line 7197 of file patch_kernel.cpp.
|
protected |
Updates the id of the first ghost cell.
Definition at line 1290 of file patch_kernel_parallel.cpp.
|
protected |
Updates the id of the first ghost vertex.
Definition at line 598 of file patch_kernel_parallel.cpp.
void bitpit::PatchKernel::updateInterfaces | ( | bool | forcedUpdated = false | ) |
Update the interfaces of the patch.
forcedUpdated | if set to true, bounding box information will be updated also if they are not marked as dirty |
Definition at line 6386 of file patch_kernel.cpp.
|
protected |
Updates the id of the last internal cell.
Definition at line 3357 of file patch_kernel.cpp.
|
protected |
Updates the id of the last internal vertex.
Definition at line 2396 of file patch_kernel.cpp.
PatchKernel::VertexIterator bitpit::PatchKernel::vertexBegin | ( | ) |
Returns iterator pointing to the first vertex.
Definition at line 1736 of file patch_kernel.cpp.
PatchKernel::VertexConstIterator bitpit::PatchKernel::vertexConstBegin | ( | ) | const |
Returns a constant iterator pointing to the first vertex.
Definition at line 1790 of file patch_kernel.cpp.
PatchKernel::VertexConstIterator bitpit::PatchKernel::vertexConstEnd | ( | ) | const |
Returns a constant iterator pointing to last vertex.
Definition at line 1800 of file patch_kernel.cpp.
PatchKernel::VertexIterator bitpit::PatchKernel::vertexEnd | ( | ) |
Returns iterator pointing to last vertex.
Definition at line 1746 of file patch_kernel.cpp.
void bitpit::PatchKernel::write | ( | const std::string & | filename, |
VTKWriteMode | mode, | ||
double | time ) |
Writes the patch to filename specified in input.
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 1165 of file patch_kernel.cpp.
void bitpit::PatchKernel::write | ( | const std::string & | filename, |
VTKWriteMode | mode = VTKWriteMode::DEFAULT ) |
Writes the patch to filename specified in input.
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 1149 of file patch_kernel.cpp.
void bitpit::PatchKernel::write | ( | VTKWriteMode | mode, |
double | time ) |
Writes the patch a filename with the same name of the patch.
mode | is the VTK file mode that will be used for writing the patch |
time | is the current time |
Definition at line 1194 of file patch_kernel.cpp.
void bitpit::PatchKernel::write | ( | VTKWriteMode | mode = VTKWriteMode::DEFAULT | ) |
Writes the patch to filename specified in input.
mode | is the VTK file mode that will be used for writing the patch |
Definition at line 1179 of file patch_kernel.cpp.
|
friend |
Definition at line 59 of file patch_kernel.hpp.
|
friend |
Definition at line 56 of file patch_kernel.hpp.
|
friend |
Definition at line 61 of file patch_kernel.hpp.
|
friend |
Definition at line 57 of file patch_kernel.hpp.
|
staticprotected |
Default cell weight used for patch partitioning
Definition at line 796 of file patch_kernel.hpp.
|
staticprotected |
Definition at line 801 of file patch_kernel.hpp.
|
staticprotected |
Definition at line 803 of file patch_kernel.hpp.
|
staticprotected |
Definition at line 800 of file patch_kernel.hpp.
|
staticprotected |
Definition at line 802 of file patch_kernel.hpp.
|
staticprotected |
Definition at line 799 of file patch_kernel.hpp.
|
protected |
Definition at line 809 of file patch_kernel.hpp.
|
protected |
Definition at line 810 of file patch_kernel.hpp.
|
protected |
Definition at line 806 of file patch_kernel.hpp.
|
protected |
Definition at line 807 of file patch_kernel.hpp.
|
protected |
Definition at line 805 of file patch_kernel.hpp.