Version: 9.12.0
MEDCoupling::ExplicitCoincidentDEC Class Reference
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)
 
ProcessorGroupgetSourceGrp () const
 
ProcessorGroupgetTargetGrp () const
 
bool isInSourceSide () const
 
bool isInTargetSide () const
 
bool isInUnion () const
 
DisjointDECoperator= (const DisjointDEC &s)
 
void renormalizeTargetField (bool isWAbs)
 
void sendRecvData (bool way=true)
 
void setNature (NatureOfField nature)
 
virtual ~DisjointDEC ()
 
- Public Member Functions inherited from MEDCoupling::DEC
void copyFrom (const DEC &other)
 
 DEC ()
 
virtual ~DEC ()
 
- Public Member Functions inherited from MEDCoupling::DECOptions
 DECOptions ()
 
 DECOptions (const DECOptions &deco)
 
AllToAllMethod getAllToAllMethod () const
 
bool getAsynchronous () const
 
bool getForcedRenormalization () const
 
const std::string & getMethod () const
 
TimeInterpolationMethod getTimeInterpolationMethod () const
 
void setAllToAllMethod (AllToAllMethod sp)
 
void setAsynchronous (bool dr)
 
void setForcedRenormalization (bool dr)
 
void setMethod (const char *m)
 
void setTimeInterpolationMethod (TimeInterpolationMethod it)
 

Additional Inherited Members

- Protected Member Functions inherited from MEDCoupling::DisjointDEC
void checkPartitionGroup () const
 
void cleanInstance ()
 
void compareFieldAndMethod () const
 
void copyInstance (const DisjointDEC &other)
 
- Protected Attributes inherited from MEDCoupling::DisjointDEC
const CommInterface_comm_interface
 
const ParaFIELD_local_field
 
bool _owns_field
 
bool _owns_groups
 
ProcessorGroup_source_group
 
ProcessorGroup_target_group
 
MPI_Comm _union_comm
 
ProcessorGroup_union_group
 
- Protected Attributes inherited from MEDCoupling::DEC
const CommInterface_comm_interface
 
- Protected Attributes inherited from MEDCoupling::DECOptions
AllToAllMethod _allToAllMethod
 
bool _asynchronous
 
bool _forcedRenormalization
 
std::string _method
 
TimeInterpolationMethod _timeInterpolationMethod
 

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