Functions | |
| ParaMEDMEM::StructuredCoincidentDEC.StructuredCoincidentDEC (ProcessorGroup &source, ProcessorGroup &target) | |
| void | ParaMEDMEM::StructuredCoincidentDEC.synchronizeTopology () |
| void | ParaMEDMEM::StructuredCoincidentDEC.prepareSourceDE () |
| void | ParaMEDMEM::StructuredCoincidentDEC.prepareTargetDE () |
| void | ParaMEDMEM::StructuredCoincidentDEC.broadcastTopology (BlockTopology *&, int tag) |
| 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 StructuredCoincidentDEC :
...
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::synchronizeTopology | ( | ) | [private, inherited] |
Synchronization process for exchanging topologies
References ParaMEDMEM.DisjointDEC._local_field, ParaMEDMEM.DisjointDEC._source_group, ParaMEDMEM.DisjointDEC._target_group, ParaMEDMEM.StructuredCoincidentDEC._topo_source, ParaMEDMEM.StructuredCoincidentDEC._topo_target, ParaMEDMEM.StructuredCoincidentDEC.broadcastTopology(), ParaMEDMEM.ProcessorGroup.containsMyRank(), ParaMEDMEM.BlockTopology.getNbElements(), and ParaMEDMEM.ParaFIELD.getTopology().
| 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.DisjointDEC.
References ParaMEDMEM.DisjointDEC._local_field, ParaMEDMEM.StructuredCoincidentDEC._recv_counts, ParaMEDMEM.StructuredCoincidentDEC._recv_displs, ParaMEDMEM.StructuredCoincidentDEC._send_buffer, ParaMEDMEM.StructuredCoincidentDEC._send_counts, ParaMEDMEM.StructuredCoincidentDEC._send_displs, ParaMEDMEM.StructuredCoincidentDEC._topo_source, ParaMEDMEM.StructuredCoincidentDEC._topo_target, ParaMEDMEM.ProcessorGroup.containsMyRank(), ParaMEDMEM.MEDCouplingFieldDouble.getArray(), ParaMEDMEM.ProcessorGroup.getCommInterface(), ParaMEDMEM.ParaFIELD.getField(), ParaMEDMEM.DataArrayDouble.getPointer(), ParaMEDMEM.BlockTopology.getProcGroup(), ParaMEDMEM.BlockTopology.globalToLocal(), med_test1.group, ParaMEDMEM.BlockTopology.localToGlobal(), ParaMEDMEM.ProcessorGroup.myRank(), test_NonCoincidentDEC.nb_local, test_NonCoincidentDEC.size, ParaMEDMEM.ProcessorGroup.size(), ParaMEDMEM.MPIProcessorGroup.translateRank(), and batchmode_medcorba_test.value.
| void ParaMEDMEM.StructuredCoincidentDEC::prepareTargetDE | ( | ) | [virtual, inherited] |
Creates the buffers for receiving the fields on the target side
Implements ParaMEDMEM.DisjointDEC.
References ParaMEDMEM.StructuredCoincidentDEC._recv_buffer, ParaMEDMEM.StructuredCoincidentDEC._recv_counts, ParaMEDMEM.StructuredCoincidentDEC._recv_displs, ParaMEDMEM.StructuredCoincidentDEC._send_counts, ParaMEDMEM.StructuredCoincidentDEC._send_displs, ParaMEDMEM.StructuredCoincidentDEC._topo_source, ParaMEDMEM.StructuredCoincidentDEC._topo_target, ParaMEDMEM.ProcessorGroup.containsMyRank(), ParaMEDMEM.ProcessorGroup.getCommInterface(), ParaMEDMEM.BlockTopology.getProcGroup(), ParaMEDMEM.BlockTopology.globalToLocal(), med_test1.group, ParaMEDMEM.BlockTopology.localToGlobal(), ParaMEDMEM.ProcessorGroup.myRank(), test_NonCoincidentDEC.nb_local, ParaMEDMEM.ProcessorGroup.size(), and ParaMEDMEM.MPIProcessorGroup.translateRank().
| void ParaMEDMEM.StructuredCoincidentDEC::broadcastTopology | ( | BlockTopology *& | topo, |
| int | tag | ||
| ) | [private, inherited] |
Synchronizing a topology so that all the group possesses it.
| topo | Topology that is transmitted. It is read on processes where it already exists, and it is created and filled on others. |
| tag | Communication tag associated with this operation. |
References ParaMEDMEM.DisjointDEC._comm_interface, ParaMEDMEM.CommInterface.broadcast(), ParaMEDMEM.MPIProcessorGroup.getComm(), ParaMEDMEM.BlockTopology.getProcGroup(), med_test1.group, MESSAGE, ParaMEDMEM.MPIProcessorGroup.myRank(), ParaMEDMEM.ProcessorGroup.myRank(), ParaMEDMEM.CommInterface.recv(), ParaMEDMEM.CommInterface.send(), ParaMEDMEM.BlockTopology.serialize(), ParaMEDMEM.ProcessorGroup.size(), test_NonCoincidentDEC.size, testMedMemCxxTests.status, ParaMEDMEM.MPIProcessorGroup.translateRank(), and ParaMEDMEM.BlockTopology.unserialize().
| void ParaMEDMEM.StructuredCoincidentDEC::recvData | ( | ) | [virtual, inherited] |
Implements ParaMEDMEM.DisjointDEC.
References ParaMEDMEM.DisjointDEC._comm_interface, ParaMEDMEM.DisjointDEC._local_field, ParaMEDMEM.StructuredCoincidentDEC._recv_buffer, ParaMEDMEM.StructuredCoincidentDEC._recv_counts, ParaMEDMEM.StructuredCoincidentDEC._recv_displs, ParaMEDMEM.StructuredCoincidentDEC._send_buffer, ParaMEDMEM.StructuredCoincidentDEC._send_counts, ParaMEDMEM.StructuredCoincidentDEC._send_displs, ParaMEDMEM.StructuredCoincidentDEC._topo_source, ParaMEDMEM.StructuredCoincidentDEC._topo_target, ParaMEDMEM.DisjointDEC._union_group, ParaMEDMEM.CommInterface.allToAllV(), ParaMEDMEM.MEDCouplingFieldDouble.getArray(), ParaMEDMEM.ParaFIELD.getField(), ParaMEDMEM.BlockTopology.getNbLocalElements(), ParaMEDMEM.DataArrayDouble.getPointer(), ParaMEDMEM.BlockTopology.getProcGroup(), ParaMEDMEM.BlockTopology.globalToLocal(), med_test1.group, ParaMEDMEM.BlockTopology.localToGlobal(), MESSAGE, ParaMEDMEM.ProcessorGroup.myRank(), test_NonCoincidentDEC.nb_local, ParaMEDMEM.ProcessorGroup.size(), ParaMEDMEM.MPIProcessorGroup.translateRank(), and batchmode_medcorba_test.value.
| void ParaMEDMEM.StructuredCoincidentDEC::sendData | ( | ) | [virtual, inherited] |
Implements ParaMEDMEM.DisjointDEC.
References ParaMEDMEM.DisjointDEC._comm_interface, ParaMEDMEM.StructuredCoincidentDEC._recv_buffer, ParaMEDMEM.StructuredCoincidentDEC._recv_counts, ParaMEDMEM.StructuredCoincidentDEC._recv_displs, ParaMEDMEM.StructuredCoincidentDEC._send_buffer, ParaMEDMEM.StructuredCoincidentDEC._send_counts, ParaMEDMEM.StructuredCoincidentDEC._send_displs, ParaMEDMEM.DisjointDEC._union_group, ParaMEDMEM.CommInterface.allToAllV(), and MESSAGE.
| 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.DisjointDEC.
References ParaMEDMEM.DisjointDEC._source_group, ParaMEDMEM.DisjointDEC._target_group, ParaMEDMEM.ProcessorGroup.containsMyRank(), ParaMEDMEM.StructuredCoincidentDEC.prepareSourceDE(), ParaMEDMEM.StructuredCoincidentDEC.prepareTargetDE(), and ParaMEDMEM.StructuredCoincidentDEC.synchronizeTopology().