Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MEDCoupling::DisjointDEC Class Referenceabstract
Inheritance diagram for MEDCoupling::DisjointDEC:
Collaboration diagram for MEDCoupling::DisjointDEC:

Public Member Functions

void attachLocalField (MEDCouplingFieldDouble *field)
 
void attachLocalField (const ParaFIELD *field, bool ownPt=false)
 
void attachLocalField (const ICoCo::MEDField *field)
 
virtual void computeProcGroup ()
 
 DisjointDEC ()
 
 DisjointDEC (ProcessorGroup &source_group, ProcessorGroup &target_group)
 
 DisjointDEC (const DisjointDEC &)
 
 DisjointDEC (const std::set< int > &src_ids, const std::set< int > &trg_ids, const MPI_Comm &world_comm=MPI_COMM_WORLD)
 
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 throw (INTERP_KERNEL::Exception)
 
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 instanciation:

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

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

References copyInstance().

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

References cleanInstance().

Member Function Documentation

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

References cleanInstance(), and copyInstance().

void MEDCoupling::DisjointDEC::setNature ( NatureOfField  nature)
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(), and isInUnion().

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

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

void MEDCoupling::DisjointDEC::attachLocalField ( const ICoCo::MEDField *  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 :

  • a ICoCo::MEDField, that is created from a MEDCoupling structure

References attachLocalField(), and isInUnion().

virtual void MEDCoupling::DisjointDEC::prepareSourceDE ( )
pure virtual
virtual void MEDCoupling::DisjointDEC::prepareTargetDE ( )
pure virtual
virtual void MEDCoupling::DisjointDEC::recvData ( )
pure virtual
virtual void MEDCoupling::DisjointDEC::sendData ( )
pure virtual
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().

virtual void MEDCoupling::DisjointDEC::computeProcGroup ( )
virtual
ProcessorGroup* MEDCoupling::DisjointDEC::getSourceGrp ( ) const

References _source_group.

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

References _target_group.

bool MEDCoupling::DisjointDEC::isInSourceSide ( ) const
bool MEDCoupling::DisjointDEC::isInTargetSide ( ) const
bool MEDCoupling::DisjointDEC::isInUnion ( ) const
void MEDCoupling::DisjointDEC::cleanInstance ( )
protected
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 completly for the DECs to work.

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

Referenced by DisjointDEC().

Member Data Documentation

ProcessorGroup* MEDCoupling::DisjointDEC::_union_group
protected
bool MEDCoupling::DisjointDEC::_owns_field
protected

Referenced by attachLocalField(), and cleanInstance().

bool MEDCoupling::DisjointDEC::_owns_groups
protected

Referenced by cleanInstance(), and copyInstance().

MPI_Comm MEDCoupling::DisjointDEC::_union_comm
protected