1 // Copyright (C) 2007-2015 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"
24 #include "MEDCouplingUMesh.hxx"
25 #include "MEDCouplingSkyLineArray.hxx"
31 namespace MEDPARTITIONER
33 class MEDPARTITIONER_EXPORT ConnectZone
38 ConnectZone(const ConnectZone & myConnectZone);
40 std::string getName() const ;
41 std::string getDescription() const ;
42 int getDistantDomainNumber() const ;
43 int getLocalDomainNumber() const ;
44 ParaMEDMEM::MEDCouplingUMesh *getLocalMesh() const ;
45 ParaMEDMEM::MEDCouplingUMesh *getDistantMesh() const ;
47 bool isEntityCorrespPresent(int localEntity,int distantEntity) const;
48 const int *getNodeCorrespIndex() const;
49 const int *getNodeCorrespValue() const;
50 int getNodeNumber() const;
51 const ParaMEDMEM::MEDCouplingSkyLineArray * getNodeCorresp() const;
52 const int *getFaceCorrespIndex() const;
53 const int *getFaceCorrespValue() const;
54 int getFaceNumber() const;
55 const ParaMEDMEM::MEDCouplingSkyLineArray * getFaceCorresp() const;
56 const int *getEntityCorrespIndex(int localEntity,
57 int distantEntity) const;
58 const int *getEntityCorrespValue(int localEntity,
59 int distantEntity) const;
60 int getEntityCorrespNumber(int localEntity,
61 int distantEntity) const;
62 int getEntityCorrespLength(int localEntity,
63 int distantEntity) const;
64 const ParaMEDMEM::MEDCouplingSkyLineArray * getEntityCorresp(int localEntity,
65 int distantEntity) const;
66 std::vector< std::pair< int,int > > getEntities() const;
68 void setName(const std::string& name) ;
69 void setDescription(const std::string& description) ;
70 void setDistantDomainNumber(int distantDomainNumber) ;
71 void setLocalDomainNumber(int distantDomainNumber) ;
72 void setLocalMesh(ParaMEDMEM::MEDCouplingUMesh * localMesh) ;
73 void setDistantMesh(ParaMEDMEM::MEDCouplingUMesh * distantMesh) ;
75 void setNodeCorresp(const int * nodeCorresp, int nbnode);
76 void setNodeCorresp(ParaMEDMEM::MEDCouplingSkyLineArray* array);
77 void setFaceCorresp(const int * faceCorresp, int nbface);
78 void setFaceCorresp(ParaMEDMEM::MEDCouplingSkyLineArray* array);
79 void setEntityCorresp(int localEntity, int distantEntity,
80 const int * entityCorresp, int nbentity);
81 void setEntityCorresp(int localEntity, int distantEntity,
82 ParaMEDMEM::MEDCouplingSkyLineArray *array);
85 std::string _description;
86 int _local_domain_number;
87 int _distant_domain_number;
89 ParaMEDMEM::MEDCouplingUMesh * _local_mesh;
90 ParaMEDMEM::MEDCouplingUMesh * _distant_mesh;
92 ParaMEDMEM::MEDCouplingSkyLineArray * _node_corresp;
93 ParaMEDMEM::MEDCouplingSkyLineArray * _face_corresp;
95 std::map < std::pair <int,int>, ParaMEDMEM::MEDCouplingSkyLineArray * > _entity_corresp;