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 supports (=the same underlying mesh) but different parallel topologies (=different sub-domains in the mesh). It can be used to couple together multi-physics codes that operate on the same domain with different partitioning.
It is very similar to what the StructuredCoincidentDEC does, except that it works with an arbitrary user-defined topology.
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 ExplicitCoincidentDEC
:
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::ExplicitCoincidentDEC::ExplicitCoincidentDEC | ( | ) |
Constructor
|
virtual |
|
virtual |
Synchronization process for exchanging topologies
Implements MEDCoupling::DisjointDEC.
References MEDCoupling::DisjointDEC::_local_field, MEDCoupling::DisjointDEC::_source_group, MEDCoupling::DisjointDEC::_target_group, broadcastTopology(), MEDCoupling::ProcessorGroup::containsMyRank(), MEDCoupling::ProcessorGroup::createComplementProcGroup(), MEDCoupling::ProcessorGroup::createProcGroup(), MEDCoupling::ExplicitTopology::getProcGroup(), MEDCoupling::ParaFIELD::getTopology(), and transferMappingToSource().
void MEDCoupling::ExplicitCoincidentDEC::broadcastTopology | ( | BlockTopology *& | , |
int | tag | ||
) |
Referenced by synchronize().
void MEDCoupling::ExplicitCoincidentDEC::broadcastTopology | ( | const ExplicitTopology * | toposend, |
ExplicitTopology * | toporecv, | ||
int | tag | ||
) |
Synchronizing a topology so that all the groups get it.
toposend | Topology that is transmitted. It is read on processes where it already exists, and it is created and filled on others. |
toporecv | Topology which is received. |
tag | Communication tag associated with this operation. |
References MEDCoupling::DisjointDEC::_comm_interface, MEDCoupling::ProcessorGroup::contains(), MEDCoupling::ProcessorGroup::containsMyRank(), MEDCoupling::MPIProcessorGroup::getComm(), MEDCoupling::ExplicitTopology::getNbLocalElements(), MEDCoupling::ExplicitTopology::getProcGroup(), MEDCoupling::ExplicitTopology::globalToLocal(), MEDCoupling::ExplicitTopology::localToGlobal(), MEDCoupling::MPIProcessorGroup::myRank(), MEDCoupling::CommInterface::recv(), MEDCoupling::CommInterface::send(), MEDCoupling::ExplicitTopology::serialize(), MEDCoupling::ProcessorGroup::size(), and MEDCoupling::ExplicitTopology::unserialize().
void MEDCoupling::ExplicitCoincidentDEC::transferMappingToSource | ( | ) |
References MEDCoupling::DisjointDEC::_comm_interface, MEDCoupling::CommInterface::allToAll(), MEDCoupling::CommInterface::allToAllV(), MEDCoupling::ProcessorGroup::containsMyRank(), MEDCoupling::ProcessorGroup::getCommInterface(), MEDCoupling::ExplicitTopology::getProcGroup(), MEDCoupling::ProcessorGroup::myRank(), MEDCoupling::ProcessorGroup::size(), MEDCoupling::MPIProcessorGroup::translateRank(), and MEDCoupling::CommInterface::worldSize().
Referenced by synchronize().
|
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::ExplicitTopology::getNbComponents(), MEDCoupling::ExplicitTopology::getProcGroup(), MEDCoupling::ProcessorGroup::size(), and MEDCoupling::CommInterface::worldSize().
|
virtual |
Creates the buffers for receiving the fields on the target side
Implements MEDCoupling::DisjointDEC.
References MEDCoupling::ProcessorGroup::containsMyRank(), MEDCoupling::ProcessorGroup::getCommInterface(), MEDCoupling::ExplicitTopology::getNbComponents(), MEDCoupling::ExplicitTopology::getProcGroup(), MEDCoupling::ProcessorGroup::size(), and MEDCoupling::MPIProcessorGroup::translateRank().
|
virtual |
Implements MEDCoupling::DisjointDEC.
References MEDCoupling::DisjointDEC::_comm_interface, MEDCoupling::DisjointDEC::_local_field, MEDCoupling::CommInterface::allToAllV(), MEDCoupling::CPP_DEALLOC, MEDCoupling::MEDCouplingFieldT< T >::getArray(), MEDCoupling::ParaFIELD::getField(), MEDCoupling::ExplicitTopology::getNbComponents(), MEDCoupling::ExplicitTopology::getNbLocalElements(), MEDCoupling::ProcessorGroup::size(), and MEDCoupling::MPIProcessorGroup::translateRank().
|
virtual |
Implements MEDCoupling::DisjointDEC.
References MEDCoupling::DisjointDEC::_comm_interface, and MEDCoupling::CommInterface::allToAllV().