]> SALOME platform Git repositories - tools/medcoupling.git/blob - src/ParaMEDMEM/ExplicitCoincidentDEC.hxx
Salome HOME
Merge from BR_V5_DEV 16Feb09
[tools/medcoupling.git] / src / ParaMEDMEM / ExplicitCoincidentDEC.hxx
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D
2 //
3 //  This library is free software; you can redistribute it and/or
4 //  modify it under the terms of the GNU Lesser General Public
5 //  License as published by the Free Software Foundation; either
6 //  version 2.1 of the License.
7 //
8 //  This library is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 //  Lesser General Public License for more details.
12 //
13 //  You should have received a copy of the GNU Lesser General Public
14 //  License along with this library; if not, write to the Free Software
15 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 #ifndef __EXPLICITCOINCIDENTDEC_HXX__
20 #define __EXPLICITCOINCIDENTDEC_HXX__
21
22 #include "DEC.hxx"
23 #include "ExplicitMapping.hxx"
24 #include "ExplicitTopology.hxx"
25
26 #include <map>
27
28 namespace ParaMEDMEM
29 {
30   class BlockTopology;
31
32   class ExplicitCoincidentDEC : public DEC
33   {
34   public:
35     ExplicitCoincidentDEC();
36     virtual ~ExplicitCoincidentDEC();
37     void synchronize();
38     void broadcastTopology(BlockTopology*&, int tag);
39     void broadcastTopology(const ExplicitTopology* toposend, ExplicitTopology* toporecv, int tag);
40     void transferMappingToSource();
41     void prepareSourceDE();
42     void prepareTargetDE();
43     void recvData();
44     void sendData();
45   private:  
46     ExplicitTopology* _toposource;
47     ExplicitTopology* _topotarget;
48     ProcessorGroup* _targetgroup;
49     ProcessorGroup* _sourcegroup;
50     int* _sendcounts;
51     int* _recvcounts;
52     int* _senddispls;
53     int* _recvdispls;
54     double* _recvbuffer;
55     double* _sendbuffer;
56     std::map<int,std::pair<int,int> > _distant_elems;
57     ExplicitMapping _explicit_mapping;
58   }; 
59 }
60
61 #endif