Version: 9.14.0
MEDCoupling::DisjointDEC Class Referenceabstract
Inheritance diagram for MEDCoupling::DisjointDEC:
Collaboration diagram for MEDCoupling::DisjointDEC:

Public Member Functions

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)
 
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 ()
 
- 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)
 

Protected Member Functions

void checkPartitionGroup () const
 
void cleanInstance ()
 
void compareFieldAndMethod () const
 
void copyInstance (const DisjointDEC &other)
 

Protected Attributes

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

Overview

Abstract interface class representing a link between two processor groups for exchanging mesh or field data. The two processor groups must have a void intersection (OverlapDEC is to be considered otherwise). The DEC is initialized by attaching a field on the receiving or on the sending side.

The data is sent or received through calls to the (abstract) methods recvData() and sendData().

One can attach either a MEDCoupling::ParaFIELD, or a ICoCo::Field, or directly a MEDCoupling::MEDCouplingFieldDouble instance. See the various signatures of the method DisjointDEC::attachLocalField()

The derivations of this class should be considered for practical instantiation:

DisjointDEC options

The options supported by DisjointDEC objects are the same that the ones supported for all DECs in general and are all inherited from the class DECOptions

Constructor & Destructor Documentation

◆ DisjointDEC() [1/4]

MEDCoupling::DisjointDEC::DisjointDEC ( )

◆ DisjointDEC() [2/4]

MEDCoupling::DisjointDEC::DisjointDEC ( ProcessorGroup source_group,
ProcessorGroup target_group 
)

◆ DisjointDEC() [3/4]

MEDCoupling::DisjointDEC::DisjointDEC ( const DisjointDEC s)

References copyInstance().

◆ DisjointDEC() [4/4]

MEDCoupling::DisjointDEC::DisjointDEC ( const std::set< int > &  src_ids,
const std::set< int > &  trg_ids,
const MPI_Comm &  world_comm = MPI_COMM_WORLD 
)

◆ ~DisjointDEC()

MEDCoupling::DisjointDEC::~DisjointDEC ( )
virtual

References cleanInstance().

Member Function Documentation

◆ operator=()

DisjointDEC & MEDCoupling::DisjointDEC::operator= ( const DisjointDEC s)

References cleanInstance(), and copyInstance().

◆ setNature()

void MEDCoupling::DisjointDEC::setNature ( NatureOfField  nature)

◆ attachLocalField() [1/3]

void MEDCoupling::DisjointDEC::attachLocalField ( MEDCouplingFieldDouble field)

Attaches a local field to a DEC. The method will test whether the processor is on the source or the target side and will associate the mesh underlying the field to the local side.

If the processor is on the receiving end of the DEC, the field will be updated by a recvData() call. Reversely, if the processor is on the sending end, the field will be read, possibly transformed, and sent appropriately to the other side.

References _source_group, _target_group, MEDCoupling::ProcessorGroup::containsMyRank(), MEDCoupling::MEDCouplingField::getMesh(), MEDCoupling::MEDCouplingMesh::getName(), isInUnion(), and MEDCoupling::ParaFIELD::setOwnSupport().

Referenced by attachLocalField(), MEDCoupling::ParaFIELD::synchronizeSource(), and MEDCoupling::ParaFIELD::synchronizeTarget().

◆ attachLocalField() [2/3]

void MEDCoupling::DisjointDEC::attachLocalField ( const ParaFIELD field,
bool  ownPt = false 
)

Attaches a local field to a DEC. If the processor is on the receiving end of the DEC, the field will be updated by a recvData() call. Reversely, if the processor is on the sending end, the field will be read, possibly transformed, and sent appropriately to the other side.

References _comm_interface, _local_field, _owns_field, compareFieldAndMethod(), MEDCoupling::ProcessorGroup::getCommInterface(), MEDCoupling::Topology::getProcGroup(), MEDCoupling::ParaFIELD::getTopology(), and isInUnion().

◆ attachLocalField() [3/3]

void MEDCoupling::DisjointDEC::attachLocalField ( const ICoCo::MEDDoubleField field)

Attaches a local field to a DEC. If the processor is on the receiving end of the DEC, the field will be updated by a recvData() call. Reversely, if the processor is on the sending end, the field will be read, possibly transformed, and sent appropriately to the other side. The field type is a generic ICoCo Field, so that the DEC can couple a number of different fields :

References attachLocalField(), ICoCo::MEDDoubleField::getMCField(), and isInUnion().

◆ prepareSourceDE()

virtual void MEDCoupling::DisjointDEC::prepareSourceDE ( )
pure virtual

◆ prepareTargetDE()

virtual void MEDCoupling::DisjointDEC::prepareTargetDE ( )
pure virtual

◆ recvData()

virtual void MEDCoupling::DisjointDEC::recvData ( )
pure virtual

◆ sendData()

virtual void MEDCoupling::DisjointDEC::sendData ( )
pure virtual

◆ sendRecvData()

void MEDCoupling::DisjointDEC::sendRecvData ( bool  way = true)
virtual

If way==true, source procs call sendData() and target procs call recvData(). if way==false, it's the other way round.

Implements MEDCoupling::DEC.

References isInSourceSide(), isInTargetSide(), isInUnion(), recvData(), and sendData().

◆ synchronize()

◆ computeProcGroup()

virtual void MEDCoupling::DisjointDEC::computeProcGroup ( )
virtual

◆ renormalizeTargetField()

◆ getSourceGrp()

ProcessorGroup* MEDCoupling::DisjointDEC::getSourceGrp ( ) const

References _source_group.

◆ getTargetGrp()

ProcessorGroup* MEDCoupling::DisjointDEC::getTargetGrp ( ) const

References _target_group.

◆ isInSourceSide()

bool MEDCoupling::DisjointDEC::isInSourceSide ( ) const

◆ isInTargetSide()

bool MEDCoupling::DisjointDEC::isInTargetSide ( ) const

◆ isInUnion()

bool MEDCoupling::DisjointDEC::isInUnion ( ) const

◆ compareFieldAndMethod()

◆ cleanInstance()

◆ copyInstance()

◆ checkPartitionGroup()

void MEDCoupling::DisjointDEC::checkPartitionGroup ( ) const
protected

Check that the sources and targets procs form a partition of the world communicator referenced in the groups. This world communicator is not necessarily MPI_WORLD_COMM, but it has to be covered completely for the DECs to work.

References _source_group, _target_group, MEDCoupling::ProcessorGroup::getProcIDs(), and MEDCoupling::MPIProcessorGroup::getWorldComm().

Referenced by DisjointDEC().

Member Data Documentation

◆ _local_field

◆ _union_group

ProcessorGroup* MEDCoupling::DisjointDEC::_union_group
protected

◆ _source_group

◆ _target_group

◆ _comm_interface

◆ _owns_field

bool MEDCoupling::DisjointDEC::_owns_field
protected

Referenced by attachLocalField(), and cleanInstance().

◆ _owns_groups

bool MEDCoupling::DisjointDEC::_owns_groups
protected

Referenced by cleanInstance(), and copyInstance().

◆ _union_comm

MPI_Comm MEDCoupling::DisjointDEC::_union_comm
protected