1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D
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, or (at your option) any later version.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef __MEDPARTITIONER_CONNECTZONE_HXX__
21 #define __MEDPARTITIONER_CONNECTZONE_HXX__
23 #include "MEDPARTITIONER.hxx"
28 class MEDCouplingUMesh;
29 class MEDCouplingSkyLineArray;
36 using namespace MEDCoupling;
38 namespace MEDPARTITIONER
40 class MEDPARTITIONER_EXPORT ConnectZone
45 ConnectZone(const ConnectZone & myConnectZone);
47 std::string getName() const ;
48 std::string getDescription() const ;
49 int getDistantDomainNumber() const ;
50 int getLocalDomainNumber() const ;
51 MEDCouplingUMesh *getLocalMesh() const ;
52 MEDCouplingUMesh *getDistantMesh() const ;
54 bool isEntityCorrespPresent(int localEntity,int distantEntity) const;
55 const int *getNodeCorrespIndex() const;
56 const int *getNodeCorrespValue() const;
57 int getNodeNumber() const;
58 const MEDCouplingSkyLineArray * getNodeCorresp() const;
59 const int *getFaceCorrespIndex() const;
60 const int *getFaceCorrespValue() const;
61 int getFaceNumber() const;
62 const MEDCouplingSkyLineArray * getFaceCorresp() const;
63 const int *getEntityCorrespIndex(int localEntity,
64 int distantEntity) const;
65 const int *getEntityCorrespValue(int localEntity,
66 int distantEntity) const;
67 int getEntityCorrespNumber(int localEntity,
68 int distantEntity) const;
69 int getEntityCorrespLength(int localEntity,
70 int distantEntity) const;
71 const MEDCouplingSkyLineArray * getEntityCorresp(int localEntity,
72 int distantEntity) const;
73 std::vector< std::pair< int,int > > getEntities() const;
75 void setName(const std::string& name) ;
76 void setDescription(const std::string& description) ;
77 void setDistantDomainNumber(int distantDomainNumber) ;
78 void setLocalDomainNumber(int distantDomainNumber) ;
79 void setLocalMesh(MEDCouplingUMesh * localMesh) ;
80 void setDistantMesh(MEDCouplingUMesh * distantMesh) ;
82 void setNodeCorresp(const int * nodeCorresp, int nbnode);
83 void setNodeCorresp(MEDCouplingSkyLineArray* array);
84 void setFaceCorresp(const int * faceCorresp, int nbface);
85 void setFaceCorresp(MEDCouplingSkyLineArray* array);
86 void setEntityCorresp(int localEntity, int distantEntity,
87 const int * entityCorresp, int nbentity);
88 void setEntityCorresp(int localEntity, int distantEntity,
89 MEDCouplingSkyLineArray *array);
92 std::string _description;
93 int _local_domain_number;
94 int _distant_domain_number;
96 MEDCouplingUMesh * _local_mesh;
97 MEDCouplingUMesh * _distant_mesh;
99 MCAuto<MEDCouplingSkyLineArray> _node_corresp;
100 MCAuto<MEDCouplingSkyLineArray> _face_corresp;
102 std::map < std::pair <int,int>, MEDCouplingSkyLineArray * > _entity_corresp;