The PODKernel class provides an interface to manage the mesh dependent members and functions of a POD object. More...
Public Member Functions | |
PODKernel (MPI_Comm comm=MPI_COMM_WORLD) | |
PODKernel (PODKernel &&other)=default | |
virtual | ~PODKernel () |
void | adaptionAlter (const std::vector< adaption::Info > &info, bool fillInv=true) |
void | adaptionCleanUp (const std::vector< adaption::Info > &info) |
void | adaptionPrepare (const std::vector< adaption::Info > &info) |
void | computeMapper (const VolumeKernel *mesh, bool fillInv=true) |
void | evalCellsVolume () |
double | getCellVolume (long id) |
MPI_Comm | getCommunicator () const |
VolumeMapper * | getMapper () |
VolumeKernel * | getMesh () |
double | getRawCellVolume (long rawIndex) |
bool | isCommunicatorSet () const |
bool | isMapperDirty () |
Public Member Functions inherited from bitpit::VTKBaseStreamer | |
virtual void | absorbData (std::fstream &, const std::string &, VTKFormat, uint64_t, uint8_t, VTKDataType) |
virtual void | flushData (std::fstream &, const std::string &, VTKFormat) |
template<typename T > | |
void | flushValue (std::fstream &, VTKFormat, const T &value) const |
template<typename T > | |
void | flushValue (std::fstream &, VTKFormat, const T *values, int nValues) const |
Protected Member Functions | |
virtual std::unique_ptr< VolumeMapper > | _computeMapper (const VolumeKernel *mesh, bool fillInv)=0 |
virtual void | adaptMeshToMesh (const VolumeKernel *meshToAdapt, const VolumeKernel *meshReference)=0 |
void | clear () |
void | clearMapper () |
virtual std::unique_ptr< VolumeKernel > | createMesh ()=0 |
void | freeCommunicator () |
void | initializeCommunicator (MPI_Comm communicator) |
virtual PiercedStorage< bool > | mapBoolFieldToPOD (const PiercedStorage< bool > &field, const VolumeKernel *mesh, const std::unordered_set< long > *targetCells)=0 |
virtual void | mapBoolFieldToPOD (const PiercedStorage< bool > &field, const VolumeKernel *mesh, const std::unordered_set< long > *targetCells, PiercedStorage< bool > &mappedField)=0 |
virtual std::unordered_set< long > | mapCellsToPOD (const std::unordered_set< long > *cells)=0 |
virtual void | mapFieldsFromPOD (PiercedStorage< double > &fields, const VolumeKernel *mesh, const std::unordered_set< long > *targetCells, const PiercedStorage< double > &mappedFields, const std::vector< std::size_t > &scalarIds, const std::vector< std::array< std::size_t, 3 > > &vectorIds)=0 |
virtual PiercedStorage< double > | mapFieldsToPOD (const PiercedStorage< double > &fields, const VolumeKernel *mesh, const std::unordered_set< long > *targetCells, const std::vector< std::size_t > &scalarIds, const std::vector< std::array< std::size_t, 3 > > &vectorIds)=0 |
virtual void | mapPODFieldFromPOD (pod::PODField &field, const std::unordered_set< long > *targetCells, const pod::PODField &mappedField)=0 |
virtual pod::PODField | mapPODFieldToPOD (const pod::PODField &field, const std::unordered_set< long > *targetCells)=0 |
std::unique_ptr< VolumeKernel > | readMesh (const pod::SnapshotFile &snap) |
void | restoreMesh (const pod::SnapshotFile &snap) |
void | setMapperDirty (bool dirty=true) |
void | setMesh (std::unique_ptr< VolumeKernel > &&mesh) |
Protected Attributes | |
PiercedStorage< double > | m_cellsVolume |
MPI_Comm | m_communicator |
bool | m_dirtymap |
std::unique_ptr< VolumeMapper > | m_meshmap |
std::unique_ptr< VolumeKernel > | m_meshPOD |
int | m_nProcs |
int | m_rank |
Friends | |
class | POD |
The PODKernel class provides an interface to manage the mesh dependent members and functions of a POD object.
PODKernel is the base class to manage the mesh dependent members and functions of a POD object.
Definition at line 41 of file pod_kernel.hpp.
bitpit::PODKernel::PODKernel | ( | MPI_Comm | comm = MPI_COMM_WORLD | ) |
Creates a new PODKernel object.
[in] | comm | The MPI communicator used by the pod object. MPI_COMM_WORLD is the default value. |
Definition at line 58 of file pod_kernel.cpp.
|
virtual |
Destructor of PODKernel
Definition at line 88 of file pod_kernel.cpp.
|
default |
Default copy constructor.
[in] | other | Input PODKernel object |
void bitpit::PODKernel::adaptionAlter | ( | const std::vector< adaption::Info > & | info, |
bool | fillInv = true ) |
Update the mapping pre-computed of an input mesh to the POD mesh by the info given after an adaptation of the input mesh (internal method).
[in] | info | Info vector result of adaptation of the input mesh |
[in] | fillInv | If true even the inverse mapping is computed. |
Definition at line 226 of file pod_kernel.cpp.
void bitpit::PODKernel::adaptionCleanUp | ( | const std::vector< adaption::Info > & | info | ) |
Clean up the mapping internal structures.
[in] | info | Info vector result of adaptation of the input mesh |
Definition at line 236 of file pod_kernel.cpp.
void bitpit::PODKernel::adaptionPrepare | ( | const std::vector< adaption::Info > & | info | ) |
Prepare the pre-computed mapping of an input mesh to the POD mesh by the info given before an adaptation of the input mesh (internal method).
[in] | info | Info vector result of adaptation prepare of the input mesh |
Definition at line 214 of file pod_kernel.cpp.
|
protected |
Cleaning PODKernel
Definition at line 96 of file pod_kernel.cpp.
|
protected |
Clear the mapping info.
Definition at line 255 of file pod_kernel.cpp.
void bitpit::PODKernel::computeMapper | ( | const VolumeKernel * | mesh, |
bool | fillInv = true ) |
Compute the mapping of an input mesh on the pod mesh.
[in] | mesh | Pointer to input mesh. |
[in] | fillInv | If true even the inverse mapping is computed. |
Definition at line 194 of file pod_kernel.cpp.
void bitpit::PODKernel::evalCellsVolume | ( | ) |
Compute the volume of the cells of the mesh and store them in a member.
Definition at line 159 of file pod_kernel.cpp.
|
protected |
Frees the MPI communicator associated to the patch
Definition at line 327 of file pod_kernel.cpp.
double bitpit::PODKernel::getCellVolume | ( | long | id | ) |
Get the volume of a cell of the mesh.
[in] | id | Cell id |
Definition at line 174 of file pod_kernel.cpp.
MPI_Comm bitpit::PODKernel::getCommunicator | ( | ) | const |
Returns the MPI communicator stored within LevelSetKernel.
Definition at line 307 of file pod_kernel.cpp.
VolumeMapper * bitpit::PODKernel::getMapper | ( | ) |
Get the stored pre-computed mapping.
Definition at line 246 of file pod_kernel.cpp.
bitpit::VolumeKernel * bitpit::PODKernel::getMesh | ( | ) |
Get a pointer to the POD mesh.
Definition at line 120 of file pod_kernel.cpp.
double bitpit::PODKernel::getRawCellVolume | ( | long | rawIndex | ) |
Get the volume of a cell of the mesh.
[in] | rawIndex | Cell raw index |
Definition at line 184 of file pod_kernel.cpp.
|
protected |
Initializes the MPI communicator to be used for parallel communications.
communicator | is the communicator. |
Definition at line 285 of file pod_kernel.cpp.
bool bitpit::PODKernel::isCommunicatorSet | ( | ) | const |
Checks if the communicator to be used for parallel communications has already been set.
Definition at line 318 of file pod_kernel.cpp.
bool bitpit::PODKernel::isMapperDirty | ( | ) |
Get if the mapper has to be recomputed. return Is the mapping dirty?
Definition at line 274 of file pod_kernel.cpp.
|
protected |
Read the mesh from file.
[in] | snap | Snapshot filename. |
Definition at line 130 of file pod_kernel.cpp.
|
protected |
Restore the mesh from file.
[in] | snap | Snapshot filename. |
Definition at line 150 of file pod_kernel.cpp.
|
protected |
Set if the mapper has to be recomputed. param[in] Dirty mapping flag
Definition at line 265 of file pod_kernel.cpp.
|
protected |
Set the pointer to the POD mesh.
param[in] The pointer to the POD mesh.
Definition at line 110 of file pod_kernel.cpp.
|
friend |
Definition at line 43 of file pod_kernel.hpp.
|
protected |
Cells volume of POD mesh
Definition at line 80 of file pod_kernel.hpp.
|
protected |
MPI communicator
Definition at line 83 of file pod_kernel.hpp.
|
protected |
True if mapping has to be recomputed/updated [to be set by set method].
Definition at line 90 of file pod_kernel.hpp.
|
protected |
Mapping object TO pod mesh.
Definition at line 88 of file pod_kernel.hpp.
|
protected |
POD mesh
Definition at line 79 of file pod_kernel.hpp.
|
protected |
Number of processes.
Definition at line 86 of file pod_kernel.hpp.
|
protected |
Local rank of process.
Definition at line 85 of file pod_kernel.hpp.