X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FParaMEDMEM%2FOverlapDEC.cxx;h=75cbee3085ccb68d9d6859854bb5a43ec90407d1;hb=c41e6035d050073ea10040690daae247865b8b74;hp=af842fb9dd08f600d6886b8afa3d109c564d4660;hpb=242bed6361d2165733aa20dab027c4b637c732f3;p=tools%2Fmedcoupling.git diff --git a/src/ParaMEDMEM/OverlapDEC.cxx b/src/ParaMEDMEM/OverlapDEC.cxx index af842fb9d..75cbee308 100644 --- a/src/ParaMEDMEM/OverlapDEC.cxx +++ b/src/ParaMEDMEM/OverlapDEC.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -25,8 +25,9 @@ #include "MPIProcessorGroup.hxx" #include "OverlapElementLocator.hxx" #include "OverlapInterpolationMatrix.hxx" +#include "ICoCoMEDField.hxx" -namespace ParaMEDMEM +namespace MEDCoupling { /*! \anchor OverlapDEC-det @@ -71,7 +72,7 @@ namespace ParaMEDMEM Here the pair (0,2) does not appear because the bounding box of fieldtemplateA of proc#2 does not intersect that of fieldtemplate B on proc#0. - Stage performed by ParaMEDMEM::OverlapElementLocator::computeBoundingBoxes. + Stage performed by MEDCoupling::OverlapElementLocator::computeBoundingBoxes. \subsection ParaMEDMEMOverlapDECAlgoStep2 Step 2 : Computation of local TODO list @@ -156,7 +157,7 @@ namespace ParaMEDMEM keep track of the ids sent to proc \#m for te matrix-vector computation. This is incarnated by OverlapMapping::keepTracksOfSourceIds in proc k. - This step is performed in ParaMEDMEM::OverlapElementLocator::exchangeMeshes method. + This step is performed in MEDCoupling::OverlapElementLocator::exchangeMeshes method. \subsection ParaMEDMEMOverlapDECAlgoStep4 Step 4 : Computation of the interpolation matrix @@ -166,7 +167,7 @@ namespace ParaMEDMEM the \b local TODO list per proc is expected to be as well balanced as possible. - The interpolation is performed as the \ref ParaMEDMEM::MEDCouplingRemapper "remapper" does. + The interpolation is performed as the \ref MEDCoupling::MEDCouplingRemapper "remapper" does. This operation is performed by OverlapInterpolationMatrix::addContribution method. @@ -184,7 +185,7 @@ namespace ParaMEDMEM is equal to k. After this step, the matrix repartition is the following after a call to - ParaMEDMEM::OverlapMapping::prepare : + MEDCoupling::OverlapMapping::prepare : - proc\#0 : (0,0),(1,0),(2,0) - proc\#1 : (0,1),(2,1) @@ -194,19 +195,19 @@ namespace ParaMEDMEM "prepare". This is an example of item 0 in \ref ParaMEDMEMOverlapDECAlgoStep2 "Step2". Tuple (0,1) computed on proc 1 is stored in proc 1 too. This is an example of item 1 in \ref ParaMEDMEMOverlapDECAlgoStep2 "Step2". - In the end ParaMEDMEM::OverlapMapping::_proc_ids_to_send_vector_st will contain : + In the end MEDCoupling::OverlapMapping::_proc_ids_to_send_vector_st will contain : - Proc\#0 : 0,1 - Proc\#1 : 0,2 - Proc\#2 : 0,1,2 - In the end ParaMEDMEM::OverlapMapping::_proc_ids_to_recv_vector_st will contain : + In the end MEDCoupling::OverlapMapping::_proc_ids_to_recv_vector_st will contain : - Proc\#0 : 0,1,2 - Proc\#1 : 0,2 - Proc\#2 : 1,2 - The method in charge to perform this is : ParaMEDMEM::OverlapMapping::prepare. + The method in charge to perform this is : MEDCoupling::OverlapMapping::prepare. */ OverlapDEC::OverlapDEC(const std::set& procIds, const MPI_Comm& world_comm): _load_balancing_algo(1), @@ -216,7 +217,7 @@ namespace ParaMEDMEM _default_field_value(0.0), _comm(MPI_COMM_NULL) { - ParaMEDMEM::CommInterface comm; + MEDCoupling::CommInterface comm; int *ranks_world=new int[procIds.size()]; // ranks of sources and targets in world_comm std::copy(procIds.begin(),procIds.end(),ranks_world); MPI_Group group,world_group; @@ -249,7 +250,7 @@ namespace ParaMEDMEM delete _locator; if (_comm != MPI_COMM_NULL) { - ParaMEDMEM::CommInterface comm; + MEDCoupling::CommInterface comm; comm.commFree(&_comm); } } @@ -348,6 +349,16 @@ namespace ParaMEDMEM attachTargetLocalField(tmpField,true); } + void OverlapDEC::attachSourceLocalField(ICoCo::MEDField *field) + { + attachSourceLocalField(field->getField()); + } + + void OverlapDEC::attachTargetLocalField(ICoCo::MEDField *field) + { + attachTargetLocalField(field->getField()); + } + bool OverlapDEC::isInGroup() const { if(!_group)