Additional Inherited Members | |
Protected Member Functions inherited from MEDCoupling::DisjointDEC | |
void | checkPartitionGroup () const |
void | cleanInstance () |
void | compareFieldAndMethod () const throw (INTERP_KERNEL::Exception) |
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 |
This class aims at remapping fields that have identical structured supports (=the same underlying mesh) but different parallel topologies (=different sub-domains in the structured mesh). It can be used to couple together multi-physics codes that operate on the same domain with different partitioning. This can be useful for example if one of the computation is much faster than the other. It can also be used to couple together codes that share an interface that was generated in the same manner (with identical global ids). Also, this DEC can be used for fields that have component topologies, i.e., components that are scattered over several processors.
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 :
This example illustrates the sending of a field with the StructuredCoincidentDEC
:
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.
MEDCoupling::StructuredCoincidentDEC::StructuredCoincidentDEC | ( | ) |
MEDCoupling::StructuredCoincidentDEC::StructuredCoincidentDEC | ( | ProcessorGroup & | source, |
ProcessorGroup & | target | ||
) |
|
virtual |
|
virtual |
Prepares a DEC for data exchange
This method broadcasts the topologies from source to target so that the target side can analyse from which processors it is expected to receive data.
Implements MEDCoupling::DisjointDEC.
References MEDCoupling::DisjointDEC::_source_group, MEDCoupling::DisjointDEC::_target_group, MEDCoupling::ProcessorGroup::containsMyRank(), prepareSourceDE(), and prepareTargetDE().
|
virtual |
Implements MEDCoupling::DisjointDEC.
References MEDCoupling::DisjointDEC::_comm_interface, MEDCoupling::DisjointDEC::_local_field, MEDCoupling::DisjointDEC::_union_group, MEDCoupling::CommInterface::allToAllV(), MEDCoupling::MEDCouplingFieldT< T >::getArray(), MEDCoupling::ParaFIELD::getField(), MEDCoupling::BlockTopology::getNbLocalElements(), MEDCoupling::BlockTopology::getProcGroup(), MEDCoupling::BlockTopology::globalToLocal(), MEDCoupling::BlockTopology::localToGlobal(), MEDCoupling::ProcessorGroup::myRank(), MEDCoupling::ProcessorGroup::size(), and MEDCoupling::MPIProcessorGroup::translateRank().
|
virtual |
|
virtual |
Creates the arrays necessary for the data transfer and fills the send array with the values of the source field
Implements MEDCoupling::DisjointDEC.
References MEDCoupling::DisjointDEC::_local_field, MEDCoupling::ProcessorGroup::containsMyRank(), MEDCoupling::MEDCouplingFieldT< T >::getArray(), MEDCoupling::ProcessorGroup::getCommInterface(), MEDCoupling::ParaFIELD::getField(), MEDCoupling::BlockTopology::getProcGroup(), MEDCoupling::BlockTopology::globalToLocal(), MEDCoupling::BlockTopology::localToGlobal(), MEDCoupling::ProcessorGroup::myRank(), MEDCoupling::ProcessorGroup::size(), and MEDCoupling::MPIProcessorGroup::translateRank().
Referenced by synchronize().
|
virtual |
Creates the buffers for receiving the fields on the target side
Implements MEDCoupling::DisjointDEC.
References MEDCoupling::ProcessorGroup::containsMyRank(), MEDCoupling::ProcessorGroup::getCommInterface(), MEDCoupling::BlockTopology::getProcGroup(), MEDCoupling::BlockTopology::globalToLocal(), MEDCoupling::BlockTopology::localToGlobal(), MEDCoupling::ProcessorGroup::myRank(), MEDCoupling::ProcessorGroup::size(), and MEDCoupling::MPIProcessorGroup::translateRank().
Referenced by synchronize().