Loading...
Searching...
No Matches
Public Member Functions | List of all members
bitpit::VolOctreeMapper Class Reference

The VolOctreeMapper is the class to map two meshes of class VolOctree. More...

Inheritance diagram for bitpit::VolOctreeMapper:
Inheritance graph
[legend]
Collaboration diagram for bitpit::VolOctreeMapper:
Collaboration graph
[legend]

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 VolumeKernelgetMappedPatch () const
 
const bitpit::PiercedStorage< mapping::Info > & getMapping () const
 
const VolumeKernelgetReferencePatch () 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::Infom_inverseMapping
 
const VolumeKernelm_mappedPatch
 
PiercedStorage< mapping::Infom_mapping
 
int m_nProcs
 
std::unordered_map< long, mapping::Infom_previousMapping
 
int m_rank
 
const VolumeKernelm_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]referencePatchis the reference mesh
[in]mappedPatchis the mapped mesh
[in]communicatoris the MPI communicator

Definition at line 68 of file voloctree_mapper.cpp.

Member Function Documentation

◆ adaptionAlter()

void bitpit::VolOctreeMapper::adaptionAlter ( const std::vector< adaption::Info > & adaptionInfo,
bool reference = true,
bool inverseFilled = false )
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]adaptionInfoare the adaptation info that describe the changes of the patch
[in]referenceif set to true the reference mesh will be adapted, is set to false the mapped one will be adapted
[in]inverseFilledif 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()

void bitpit::VolOctreeMapper::adaptionCleanup ( )
overridevirtual

Clear the mapper updating internal structures.

Implements bitpit::VolumeMapper.

Definition at line 163 of file voloctree_mapper.cpp.

◆ adaptionPrepare()

void bitpit::VolOctreeMapper::adaptionPrepare ( const std::vector< adaption::Info > & adaptionInfo,
bool reference = true )
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]adaptionInfoare the adaptation info that describe the changes of the patch
[in]referenceif 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()

bool bitpit::VolOctreeMapper::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()

std::unordered_map< int, std::vector< long > > bitpit::VolOctreeMapper::getReceivedMappedIds ( ) const
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()

std::unordered_map< int, std::vector< long > > bitpit::VolOctreeMapper::getReceivedReferenceIds ( ) const
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()

std::unordered_map< int, std::vector< long > > bitpit::VolOctreeMapper::getSentMappedIds ( ) const
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()

std::unordered_map< int, std::vector< long > > bitpit::VolOctreeMapper::getSentReferenceIds ( ) const
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:
--- layout: doxygen_footer ---