Functions | |
ParaMEDMEM::StructuredCoincidentDEC::StructuredCoincidentDEC (ProcessorGroup &source, ProcessorGroup &target) | |
void | ParaMEDMEM::StructuredCoincidentDEC::prepareSourceDE () |
void | ParaMEDMEM::StructuredCoincidentDEC::prepareTargetDE () |
void | ParaMEDMEM::StructuredCoincidentDEC::recvData () |
void | ParaMEDMEM::StructuredCoincidentDEC::sendData () |
void | ParaMEDMEM::StructuredCoincidentDEC::synchronize () |
This class is meant for remapping fields that have identical supports with different parallel topologies. It can be used to couple together multiphysics codes that operate on the same domain with different partitionings, which can be useful 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 NonCoincidentDEC and InterpKernelDEC. Therefore, this DEC must not be used for coincident meshes that do not have the same numbering.
As all the other DECs, its use is made of two phases :
This example illustrates the sending of a field with the DEC :
... StructuredCoincidentDEC dec(groupA, groupB); dec.attachLocalField(field); dec.synchronize(); if (groupA.containsMyRank()) dec.recvData(); else if (groupB.containsMyRank()) dec.sendData(); ...
Creating a ParaFIELD to be attached to the DEC is exactly the same as for other DECs in the case when the remapping concerns similar meshes that only have different partitionings. In the case when the fields have also different component topologies, creating the ParaFIELD requires some more effort. See ParaFIELD section for more details.
ParaMEDMEM::StructuredCoincidentDEC::StructuredCoincidentDEC | ( | ProcessorGroup & | source, | |
ProcessorGroup & | target | |||
) | [inherited] |
void ParaMEDMEM::StructuredCoincidentDEC::prepareSourceDE | ( | ) | [virtual, inherited] |
Creates the arrays necessary for the data transfer and fills the send array with the values of the source field
Implements ParaMEDMEM::DEC.
References ParaMEDMEM::DEC::_local_field, ParaMEDMEM::ParaFIELD::getField(), and ParaMEDMEM::MPIProcessorGroup::translateRank().
Referenced by ParaMEDMEM::StructuredCoincidentDEC::synchronize().
void ParaMEDMEM::StructuredCoincidentDEC::prepareTargetDE | ( | ) | [virtual, inherited] |
Creates the _buffers for receiving the fields on the target side
Implements ParaMEDMEM::DEC.
References ParaMEDMEM::MPIProcessorGroup::translateRank().
Referenced by ParaMEDMEM::StructuredCoincidentDEC::synchronize().
void ParaMEDMEM::StructuredCoincidentDEC::recvData | ( | ) | [virtual, inherited] |
void ParaMEDMEM::StructuredCoincidentDEC::sendData | ( | ) | [virtual, inherited] |
Implements ParaMEDMEM::DEC.
References ParaMEDMEM::DEC::_comm_interface, ParaMEDMEM::DEC::_union_group, and ParaMEDMEM::CommInterface::allToAllV().
void ParaMEDMEM::StructuredCoincidentDEC::synchronize | ( | ) | [virtual, inherited] |
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 ParaMEDMEM::DEC.
References ParaMEDMEM::DEC::_source_group, ParaMEDMEM::DEC::_target_group, ParaMEDMEM::StructuredCoincidentDEC::prepareSourceDE(), and ParaMEDMEM::StructuredCoincidentDEC::prepareTargetDE().