Version: 9.16.0
MEDCoupling::ExplicitCoincidentDEC Class Reference

#include <ExplicitCoincidentDEC.hxx>

Inheritance diagram for MEDCoupling::ExplicitCoincidentDEC:
Collaboration diagram for MEDCoupling::ExplicitCoincidentDEC:

Public Member Functions

void broadcastTopology (BlockTopology *&, int tag)
 
void broadcastTopology (const ExplicitTopology *toposend, ExplicitTopology *toporecv, int tag)
 
 ExplicitCoincidentDEC ()
 
void prepareSourceDE ()
 
void prepareTargetDE ()
 
void recvData ()
 
void sendData ()
 
void synchronize ()
 
void transferMappingToSource ()
 
virtual ~ExplicitCoincidentDEC ()
 
- Public Member Functions inherited from MEDCoupling::DisjointDEC
void attachLocalField (const ICoCo::MEDDoubleField *field)
 
void attachLocalField (const ParaFIELD *field, bool ownPt=false)
 
void attachLocalField (MEDCouplingFieldDouble *field)
 
virtual void computeProcGroup ()
 
 DisjointDEC ()
 
 DisjointDEC (const DisjointDEC &)
 
 DisjointDEC (const std::set< int > &src_ids, const std::set< int > &trg_ids, const MPI_Comm &world_comm=MPI_COMM_WORLD)
 
 DisjointDEC (ProcessorGroup &source_group, ProcessorGroup &target_group)
 
DisjointDECoperator= (const DisjointDEC &s)
 
virtual void prepareSourceDE ()=0
 
virtual void prepareTargetDE ()=0
 
virtual void recvData ()=0
 
void renormalizeTargetField (bool isWAbs)
 
virtual void sendData ()=0
 
void sendRecvData (bool way=true)
 
void setNature (NatureOfField nature)
 
virtual void synchronize ()=0
 
virtual ~DisjointDEC ()
 

Additional Inherited Members

- Protected Member Functions inherited from MEDCoupling::DisjointDEC
void cleanInstance ()
 
void compareFieldAndMethod () const
 
- Protected Attributes inherited from MEDCoupling::DisjointDEC
const ParaFIELD_local_field
 
bool _owns_field
 

Detailed Description

This class aims at remapping fields that have identical supports (=the same underlying mesh) but different parallel topologies (=different sub-domains in the mesh). It can be used to couple together multi-physics codes that operate on the same domain with different partitioning.

It is very similar to what the StructuredCoincidentDEC does, except that it works with an arbitrary user-defined topology.

The remapping between the two supports is based on identity of global ids, instead of geometrical considerations (as it is the case for InterpKernelDEC). Therefore, beware that this DEC can not be used for coincident meshes if they do not have the exact same numbering.

With this DEC no projection, and no interpolation of the field data is done, contrary to what happens in InterpKernelDEC. It is just a matter of allocating the values from one side to the other, using directly the cell identifiers.

As all the other DECs, its usage requires two phases :

  • a setup phase during which the topologies are exchanged so that the target side knows from which processors it should expect the data.
  • a send/recv phase during which the field data is actually transferred.

This example illustrates the sending of a field with the ExplicitCoincidentDEC :

...
ExplicitCoincidentDEC dec(groupA, groupB);
dec.attachLocalField(field);
dec.synchronize();
if (groupA.containsMyRank())
dec.recvData();
else if (groupB.containsMyRank())
dec.sendData();
...

Creating a ParaFIELD to be attached to the DEC is done in exactly the same way as for the other DECs, if only the partitioning of the support mesh differs. In the case where the fields have also different component topologies, creating the ParaFIELD requires some more effort. See the parallelism section for more details.

Constructor & Destructor Documentation

◆ ExplicitCoincidentDEC()

MEDCoupling::ExplicitCoincidentDEC::ExplicitCoincidentDEC ( )

Constructor

◆ ~ExplicitCoincidentDEC()

MEDCoupling::ExplicitCoincidentDEC::~ExplicitCoincidentDEC ( )
virtual

Member Function Documentation

◆ synchronize()

◆ broadcastTopology() [1/2]

void MEDCoupling::ExplicitCoincidentDEC::broadcastTopology ( BlockTopology *&  ,
int  tag 
)

Referenced by synchronize().

◆ broadcastTopology() [2/2]

void MEDCoupling::ExplicitCoincidentDEC::broadcastTopology ( const ExplicitTopology toposend,
ExplicitTopology toporecv,
int  tag 
)

◆ transferMappingToSource()

◆ prepareSourceDE()

◆ prepareTargetDE()

◆ recvData()

◆ sendData()

void MEDCoupling::ExplicitCoincidentDEC::sendData ( )
virtual