Salome HOME
Merge from V7_2_BR 09/08/2013
[tools/medcoupling.git] / src / MEDPartitioner / MEDPARTITIONER_ConnectZone.hxx
1 // Copyright (C) 2007-2013  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
20 #ifndef __MEDPARTITIONER_CONNECTZONE_HXX__
21 #define __MEDPARTITIONER_CONNECTZONE_HXX__
22
23 #include "MEDPARTITIONER.hxx"
24 #include "MEDCouplingUMesh.hxx"
25 #include "MEDPARTITIONER_SkyLineArray.hxx"
26
27 #include <map>
28 #include <string>
29
30 namespace MEDPARTITIONER
31 {
32   class MEDPARTITIONER_EXPORT ConnectZone
33   {
34   public :
35     ConnectZone();
36     ~ConnectZone();
37     ConnectZone(const ConnectZone & myConnectZone);
38
39     std::string getName() const ;
40     std::string getDescription() const ;
41     int getDistantDomainNumber() const ;
42     int getLocalDomainNumber() const ;
43     ParaMEDMEM::MEDCouplingUMesh *getLocalMesh() const ;
44     ParaMEDMEM::MEDCouplingUMesh *getDistantMesh() const ;
45
46     bool isEntityCorrespPresent(int localEntity,int distantEntity) const;
47     const int *getNodeCorrespIndex() const;
48     const int *getNodeCorrespValue() const;
49     int getNodeNumber() const;
50     const int *getFaceCorrespIndex() const;
51     const int *getFaceCorrespValue() const;
52     int getFaceNumber() const;
53     const int *getEntityCorrespIndex(int localEntity,
54                                      int distantEntity) const;
55     const int *getEntityCorrespValue(int localEntity,
56                                      int distantEntity) const;
57     int getEntityCorrespNumber(int localEntity,
58                                int distantEntity) const;
59     int getEntityCorrespLength(int localEntity,
60                                int distantEntity) const;
61     void setName(const std::string& name) ;
62     void setDescription(const std::string& description) ;
63     void setDistantDomainNumber(int distantDomainNumber) ;
64     void setLocalDomainNumber(int distantDomainNumber) ;
65     void setLocalMesh(ParaMEDMEM::MEDCouplingUMesh * localMesh) ;
66     void setDistantMesh(ParaMEDMEM::MEDCouplingUMesh * distantMesh) ;
67
68     void setNodeCorresp(int * nodeCorresp, int nbnode);
69     void setNodeCorresp(MEDPARTITIONER::SkyLineArray* array);
70     void setFaceCorresp(int * faceCorresp, int nbface);
71     void setFaceCorresp(MEDPARTITIONER::SkyLineArray* array);
72     void setEntityCorresp(int localEntity, int distantEntity,
73                           int * entityCorresp, int nbentity);
74     void setEntityCorresp(int localEntity, int distantEntity,
75                           MEDPARTITIONER::SkyLineArray *array);
76   private :
77     std::string _name;
78     std::string _description;
79     int _local_domain_number;
80     int _distant_domain_number;
81
82     ParaMEDMEM::MEDCouplingUMesh * _local_mesh;
83     ParaMEDMEM::MEDCouplingUMesh * _distant_mesh;
84
85     SkyLineArray * _node_corresp;
86     SkyLineArray * _face_corresp;
87   
88     std::map < std::pair <int,int>, SkyLineArray * > _entity_corresp;
89   };
90 }
91 # endif