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 > &adaptionData, bool reference=true, bool inverseFilled=false) override |
void | adaptionCleanup () override |
void | adaptionPrepare (const std::vector< adaption::Info > &adaptionData, 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 |
![]() | |
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 | |
![]() | |
VolumeMapper (const VolumeKernel *referencePatch, const VolumeKernel *mappedPatch, MPI_Comm communicator) | |
void | freeCommunicator () |
MPI_Comm | getCommunicator () const |
void | initializeCommunicator (MPI_Comm communicator) |
bool | isCommunicatorSet () const |
![]() | |
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 |
Detailed Description
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.
Constructor & Destructor Documentation
◆ VolOctreeMapper()
bitpit::VolOctreeMapper::VolOctreeMapper | ( | const VolOctree * | referencePatch, |
const VolOctree * | mappedPatch, | ||
MPI_Comm | communicator ) |
Constructor.
- Parameters
-
[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.
Member Function Documentation
◆ adaptionAlter()
|
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.
- Parameters
-
[in] adaptionData 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.
◆ adaptionCleanup()
|
overridevirtual |
Clear the mapper updating internal structures.
Implements bitpit::VolumeMapper.
Definition at line 163 of file voloctree_mapper.cpp.
◆ adaptionPrepare()
|
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.
- Parameters
-
[in] adaptionData 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.
◆ checkPartition()
|
overridevirtual |
Check if the reference and the mapped meshes have the same geometric partitioning.
- Returns
- Returns true if the meshes have identical geometric partitioning, false otherwise.
Implements bitpit::VolumeMapper.
Definition at line 1127 of file voloctree_mapper.cpp.
◆ clearPartitionMapping()
void bitpit::VolOctreeMapper::clearPartitionMapping | ( | ) |
Clear partition mapping members
Definition at line 81 of file voloctree_mapper.cpp.
◆ getReceivedMappedIds()
|
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.
- Returns
- Returns the map with for each rank (key) the list of the octants (argument) of the mapped mesh overlapped with the local partition of the reference mesh.
Implements bitpit::VolumeMapper.
Definition at line 752 of file voloctree_mapper.cpp.
◆ getReceivedReferenceIds()
|
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.
- Returns
- Returns the map with for each rank (key) the list of the octants (argument) of the reference mesh overlapped with the local partition of the mapped mesh.
Implements bitpit::VolumeMapper.
Definition at line 807 of file voloctree_mapper.cpp.
◆ getSentMappedIds()
|
overridevirtual |
Get the list of the octants of the local partition of the mapped mesh overlapped to a different partition of the reference mesh.
- Returns
- Returns the map with for each rank (key) the list of the octants (argument) of the mapped mesh overlapped with the partition (rank) of the reference mesh.
Implements bitpit::VolumeMapper.
Definition at line 844 of file voloctree_mapper.cpp.
◆ getSentReferenceIds()
|
overridevirtual |
Get the list of the octants of the local partition of the reference mesh overlapped to a different partition of the mapped mesh.
- Returns
- Returns the map with for each rank (key) the list of the octants (argument) of the reference mesh overlapped with the partition (rank) of the mapped mesh.
Implements bitpit::VolumeMapper.
Definition at line 775 of file voloctree_mapper.cpp.
The documentation for this class was generated from the following files:
- src/voloctree/voloctree_mapper.hpp
- src/voloctree/voloctree_mapper.cpp
