The VolOctreeMapper is the class to map two meshes of class VolOctree. More...
Public Member Functions | |
VolOctreeMapper (const VolOctree *referencePatch, const VolOctree *mappedPatch, MPI_Comm communicator) | |
void | adaptionAlter (const std::vector< adaption::Info > &adaptionInfo, bool reference=true, bool inverseFilled=false) override |
void | adaptionCleanup () override |
void | adaptionPrepare (const std::vector< adaption::Info > &adaptionInfo, bool reference=true) override |
bool | checkPartition () override |
void | clearPartitionMapping () |
std::unordered_map< int, std::vector< long > > | getReceivedMappedIds () const override |
std::unordered_map< int, std::vector< long > > | getReceivedReferenceIds () const override |
std::unordered_map< int, std::vector< long > > | getSentMappedIds () const override |
std::unordered_map< int, std::vector< long > > | getSentReferenceIds () const override |
Public Member Functions inherited from bitpit::VolumeMapper | |
void | clear () |
void | clearInverseMapping () |
void | clearMapping () |
const bitpit::PiercedStorage< mapping::Info > & | getInverseMapping () const |
const VolumeKernel * | getMappedPatch () const |
const bitpit::PiercedStorage< mapping::Info > & | getMapping () const |
const VolumeKernel * | getReferencePatch () const |
void | initialize (bool fillInv=false) |
Additional Inherited Members | |
Protected Member Functions inherited from bitpit::VolumeMapper | |
VolumeMapper (const VolumeKernel *referencePatch, const VolumeKernel *mappedPatch, MPI_Comm communicator) | |
void | freeCommunicator () |
MPI_Comm | getCommunicator () const |
void | initializeCommunicator (MPI_Comm communicator) |
bool | isCommunicatorSet () const |
Protected Attributes inherited from bitpit::VolumeMapper | |
MPI_Comm | m_communicator |
PiercedStorage< mapping::Info > | m_inverseMapping |
const VolumeKernel * | m_mappedPatch |
PiercedStorage< mapping::Info > | m_mapping |
int | m_nProcs |
std::unordered_map< long, mapping::Info > | m_previousMapping |
int | m_rank |
const VolumeKernel * | m_referencePatch |
The VolOctreeMapper is the class to map two meshes of class VolOctree.
The VolOctreeMapper allows to map meshes of class VolOctree. The meshes are defined as a reference mesh and a mapped mesh.
The object can provide a direct mapper and a inverse mapper between only the Cells of the meshes.
The information given by a mapper object is analogous to an adaptation info to adapt the mapped mesh to the reference one (or vice versa in case of inverse mapper).
The two meshes have to be imperatively linked at declaration of the mapper object.
To compute the mapper the first time call initialize method. Then, if the reference mesh OR the mapped mesh (one at a time) is adapted, the mapper can be adapted together by passing the adaptation information to the prepare and alter methods. A load-balancing procedure is not allowed, i.e. the mapper has to be entirely recomputed after a load-balance of a mesh.
Note. The domain of the two meshes has to be the same, i.e. the meshes must have same origin and length.
Definition at line 41 of file voloctree_mapper.hpp.
bitpit::VolOctreeMapper::VolOctreeMapper | ( | const VolOctree * | referencePatch, |
const VolOctree * | mappedPatch, | ||
MPI_Comm | communicator ) |
Constructor.
[in] | referencePatch | is the reference mesh |
[in] | mappedPatch | is the mapped mesh |
[in] | communicator | is the MPI communicator |
Definition at line 68 of file voloctree_mapper.cpp.
|
overridevirtual |
Update the mapper after an adaption of the reference OR the mapped mesh.
The adaptationPrepare method of the mapper has to called before the adaptation of the mesh.
[in] | adaptionInfo | are the adaptation info that describe the changes of the patch |
[in] | reference | if set to true the reference mesh will be adapted, is set to false the mapped one will be adapted |
[in] | inverseFilled | if set to true the inverse mapped was filled during the mesh mapper computing. If the adapted mesh is the mapped one, the inverse mapper has to be necessarily filled during the first computation in initialization) |
Implements bitpit::VolumeMapper.
Definition at line 151 of file voloctree_mapper.cpp.
|
overridevirtual |
Clear the mapper updating internal structures.
Implements bitpit::VolumeMapper.
Definition at line 163 of file voloctree_mapper.cpp.
|
overridevirtual |
Prepare the mapper for an adaption of the reference OR the mapped mesh.
The adaptation of only one mesh at time is allowed. Calling this method is mandatory to perform an update of the mapper after an adaptation.
[in] | adaptionInfo | are the adaptation info that describe the changes of the patch |
[in] | reference | if set to true the reference mesh will be adapted, is set to false the mapped one will be adapted |
Implements bitpit::VolumeMapper.
Definition at line 106 of file voloctree_mapper.cpp.
|
overridevirtual |
Check if the reference and the mapped meshes have the same geometric partitioning.
Implements bitpit::VolumeMapper.
Definition at line 1127 of file voloctree_mapper.cpp.
void bitpit::VolOctreeMapper::clearPartitionMapping | ( | ) |
Clear partition mapping members
Definition at line 81 of file voloctree_mapper.cpp.
|
overridevirtual |
Get the list of the octants of the partitions of the mapped mesh, different from the local rank, overlapped to the local partition of the reference mesh.
Implements bitpit::VolumeMapper.
Definition at line 752 of file voloctree_mapper.cpp.
|
overridevirtual |
Get the list of the octants of the partitions of the reference mesh, different from the local rank, overlapped to the local partition of the mapped mesh.
Implements bitpit::VolumeMapper.
Definition at line 807 of file voloctree_mapper.cpp.
|
overridevirtual |
Get the list of the octants of the local partition of the mapped mesh overlapped to a different partition of the reference mesh.
Implements bitpit::VolumeMapper.
Definition at line 844 of file voloctree_mapper.cpp.
|
overridevirtual |
Get the list of the octants of the local partition of the reference mesh overlapped to a different partition of the mapped mesh.
Implements bitpit::VolumeMapper.
Definition at line 775 of file voloctree_mapper.cpp.