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) | |
ProcessorGroup * | getSourceGrp () const |
ProcessorGroup * | getTargetGrp () const |
bool | isInSourceSide () const |
bool | isInTargetSide () const |
bool | isInUnion () const |
DisjointDEC & | operator= (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 |
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:
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
MEDCoupling::DisjointDEC::DisjointDEC | ( | ) |
MEDCoupling::DisjointDEC::DisjointDEC | ( | ProcessorGroup & | source_group, |
ProcessorGroup & | target_group | ||
) |
References _union_group, checkPartitionGroup(), and MEDCoupling::ProcessorGroup::fuse().
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 |
||
) |
|
virtual |
References cleanInstance().
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 :
References attachLocalField(), and isInUnion().
|
pure virtual |
Implemented in MEDCoupling::InterpKernelDEC, MEDCoupling::ExplicitCoincidentDEC, and MEDCoupling::StructuredCoincidentDEC.
Referenced by MEDCoupling::ParaFIELD::synchronizeSource().
|
pure virtual |
Implemented in MEDCoupling::InterpKernelDEC, MEDCoupling::ExplicitCoincidentDEC, and MEDCoupling::StructuredCoincidentDEC.
Referenced by MEDCoupling::ParaFIELD::synchronizeTarget().
|
pure virtual |
Implemented in MEDCoupling::ExplicitCoincidentDEC, MEDCoupling::InterpKernelDEC, and MEDCoupling::StructuredCoincidentDEC.
Referenced by sendRecvData(), and MEDCoupling::ParaFIELD::synchronizeTarget().
|
pure virtual |
Implemented in MEDCoupling::ExplicitCoincidentDEC, MEDCoupling::InterpKernelDEC, and MEDCoupling::StructuredCoincidentDEC.
Referenced by sendRecvData(), and MEDCoupling::ParaFIELD::synchronizeSource().
|
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().
|
pure virtual |
Implements MEDCoupling::DEC.
Implemented in MEDCoupling::InterpKernelDEC, MEDCoupling::ExplicitCoincidentDEC, and MEDCoupling::StructuredCoincidentDEC.
Referenced by MEDCoupling::ParaFIELD::synchronizeSource(), and MEDCoupling::ParaFIELD::synchronizeTarget().
|
virtual |
void MEDCoupling::DisjointDEC::renormalizeTargetField | ( | bool | isWAbs | ) |
Computes the field norm over its support on the source side and renormalizes the field on the target side so that the norms match.
References _comm_interface, _local_field, _source_group, _target_group, _union_group, MEDCoupling::MEDCouplingFieldDouble::applyLin(), MEDCoupling::CommInterface::broadcast(), MEDCoupling::ProcessorGroup::containsMyRank(), MEDCoupling::MEDCouplingFieldT< T >::getArray(), MEDCoupling::ParaFIELD::getField(), and MEDCoupling::ParaFIELD::getVolumeIntegral().
Referenced by MEDCoupling::InterpKernelDEC::recvData(), and MEDCoupling::InterpKernelDEC::sendData().
ProcessorGroup* MEDCoupling::DisjointDEC::getSourceGrp | ( | ) | const |
References _source_group.
ProcessorGroup* MEDCoupling::DisjointDEC::getTargetGrp | ( | ) | const |
References _target_group.
bool MEDCoupling::DisjointDEC::isInSourceSide | ( | ) | const |
References _source_group, and MEDCoupling::ProcessorGroup::containsMyRank().
Referenced by sendRecvData().
bool MEDCoupling::DisjointDEC::isInTargetSide | ( | ) | const |
References _target_group, and MEDCoupling::ProcessorGroup::containsMyRank().
Referenced by sendRecvData().
bool MEDCoupling::DisjointDEC::isInUnion | ( | ) | const |
References _union_group, and MEDCoupling::ProcessorGroup::containsMyRank().
Referenced by attachLocalField(), sendRecvData(), and MEDCoupling::InterpKernelDEC::synchronize().
|
protected |
|
protected |
References _comm_interface, _local_field, _owns_field, _owns_groups, _source_group, _target_group, _union_comm, _union_group, and MEDCoupling::CommInterface::commFree().
Referenced by operator=(), and ~DisjointDEC().
|
protected |
|
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().
|
protected |
Referenced by attachLocalField(), cleanInstance(), compareFieldAndMethod(), MEDCoupling::StructuredCoincidentDEC::prepareSourceDE(), MEDCoupling::ExplicitCoincidentDEC::prepareSourceDE(), MEDCoupling::StructuredCoincidentDEC::recvData(), MEDCoupling::InterpKernelDEC::recvData(), MEDCoupling::ExplicitCoincidentDEC::recvData(), renormalizeTargetField(), MEDCoupling::InterpKernelDEC::sendData(), setNature(), MEDCoupling::ExplicitCoincidentDEC::synchronize(), and MEDCoupling::InterpKernelDEC::synchronize().
|
protected |
Processor group representing the union of target and source processors.
Referenced by cleanInstance(), copyInstance(), DisjointDEC(), isInUnion(), MEDCoupling::StructuredCoincidentDEC::recvData(), renormalizeTargetField(), MEDCoupling::StructuredCoincidentDEC::sendData(), and MEDCoupling::InterpKernelDEC::synchronize().
|
protected |
Referenced by attachLocalField(), checkPartitionGroup(), cleanInstance(), copyInstance(), DisjointDEC(), getSourceGrp(), isInSourceSide(), MEDCoupling::InterpKernelDEC::recvData(), renormalizeTargetField(), MEDCoupling::InterpKernelDEC::sendData(), MEDCoupling::StructuredCoincidentDEC::synchronize(), MEDCoupling::ExplicitCoincidentDEC::synchronize(), MEDCoupling::InterpKernelDEC::synchronize(), and MEDCoupling::StructuredCoincidentDEC::~StructuredCoincidentDEC().
|
protected |
Referenced by attachLocalField(), checkPartitionGroup(), cleanInstance(), compareFieldAndMethod(), copyInstance(), DisjointDEC(), getTargetGrp(), isInTargetSide(), MEDCoupling::InterpKernelDEC::recvData(), renormalizeTargetField(), MEDCoupling::InterpKernelDEC::sendData(), MEDCoupling::StructuredCoincidentDEC::synchronize(), MEDCoupling::ExplicitCoincidentDEC::synchronize(), MEDCoupling::InterpKernelDEC::synchronize(), and MEDCoupling::StructuredCoincidentDEC::~StructuredCoincidentDEC().
|
protected |
Referenced by attachLocalField(), MEDCoupling::ExplicitCoincidentDEC::broadcastTopology(), cleanInstance(), copyInstance(), MEDCoupling::StructuredCoincidentDEC::recvData(), MEDCoupling::ExplicitCoincidentDEC::recvData(), renormalizeTargetField(), MEDCoupling::StructuredCoincidentDEC::sendData(), MEDCoupling::ExplicitCoincidentDEC::sendData(), and MEDCoupling::ExplicitCoincidentDEC::transferMappingToSource().
|
protected |
Referenced by attachLocalField(), and cleanInstance().
|
protected |
Referenced by cleanInstance(), and copyInstance().
|
protected |
Referenced by cleanInstance(), copyInstance(), and DisjointDEC().