Version: 9.16.0
MEDCoupling::DisjointDEC Class Referenceabstract

#include <DisjointDEC.hxx>

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

Protected Member Functions

void cleanInstance ()
 
void compareFieldAndMethod () const
 

Protected Attributes

const ParaFIELD_local_field
 
bool _owns_field
 

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)

◆ 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

Member Function Documentation

◆ operator=()

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

References cleanInstance().

◆ 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 attachLocalField(), MEDCoupling::MEDCouplingField::getMesh(), MEDCoupling::MEDCouplingMesh::getName(), 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 _local_field, _owns_field, compareFieldAndMethod(), MEDCoupling::ProcessorGroup::getCommInterface(), MEDCoupling::Topology::getProcGroup(), and MEDCoupling::ParaFIELD::getTopology().

◆ 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(), and ICoCo::MEDDoubleField::getMCField().

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

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

References recvData(), and sendData().

◆ synchronize()

◆ computeProcGroup()

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

◆ renormalizeTargetField()

void MEDCoupling::DisjointDEC::renormalizeTargetField ( bool  isWAbs)

◆ cleanInstance()

void MEDCoupling::DisjointDEC::cleanInstance ( )
protected

◆ compareFieldAndMethod()

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

Member Data Documentation

◆ _local_field

◆ _owns_field

bool MEDCoupling::DisjointDEC::_owns_field
protected

Referenced by attachLocalField(), and cleanInstance().