1 // Copyright (C) 2007-2024 CEA, EDF
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"
29 class MEDCouplingUMesh;
30 class MEDCouplingSkyLineArray;
37 using namespace MEDCoupling;
39 namespace MEDPARTITIONER
41 class MEDPARTITIONER_EXPORT ConnectZone
46 ConnectZone(const ConnectZone & myConnectZone);
48 std::string getName() const ;
49 std::string getDescription() const ;
50 int getDistantDomainNumber() const ;
51 int getLocalDomainNumber() const ;
52 MEDCouplingUMesh *getLocalMesh() const ;
53 MEDCouplingUMesh *getDistantMesh() const ;
55 bool isEntityCorrespPresent(mcIdType localEntity,mcIdType distantEntity) const;
56 const mcIdType *getNodeCorrespIndex() const;
57 const mcIdType *getNodeCorrespValue() const;
58 mcIdType getNodeNumber() const;
59 const MEDCouplingSkyLineArray * getNodeCorresp() const;
60 const mcIdType *getFaceCorrespIndex() const;
61 const mcIdType *getFaceCorrespValue() const;
62 mcIdType getFaceNumber() const;
63 const MEDCouplingSkyLineArray * getFaceCorresp() const;
64 const mcIdType *getEntityCorrespIndex(mcIdType localEntity,
65 mcIdType distantEntity) const;
66 const mcIdType *getEntityCorrespValue(mcIdType localEntity,
67 mcIdType distantEntity) const;
68 mcIdType getEntityCorrespNumber(mcIdType localEntity,
69 mcIdType distantEntity) const;
70 mcIdType getEntityCorrespLength(mcIdType localEntity,
71 mcIdType distantEntity) const;
72 const MEDCouplingSkyLineArray * getEntityCorresp(mcIdType localEntity,
73 mcIdType distantEntity) const;
74 std::vector< std::pair< mcIdType,mcIdType > > getEntities() const;
76 void setName(const std::string& name) ;
77 void setDescription(const std::string& description) ;
78 void setDistantDomainNumber(int distantDomainNumber) ;
79 void setLocalDomainNumber(int distantDomainNumber) ;
80 void setLocalMesh(MEDCouplingUMesh * localMesh) ;
81 void setDistantMesh(MEDCouplingUMesh * distantMesh) ;
83 void setNodeCorresp(const mcIdType * nodeCorresp, mcIdType nbnode);
84 void setNodeCorresp(MEDCouplingSkyLineArray* array);
85 void setFaceCorresp(const mcIdType * faceCorresp, mcIdType nbface);
86 void setFaceCorresp(MEDCouplingSkyLineArray* array);
87 void setEntityCorresp(mcIdType localEntity, mcIdType distantEntity,
88 const mcIdType * entityCorresp, mcIdType nbentity);
89 void setEntityCorresp(mcIdType localEntity, mcIdType distantEntity,
90 MEDCouplingSkyLineArray *array);
93 std::string _description;
94 int _local_domain_number;
95 int _distant_domain_number;
97 MEDCouplingUMesh * _local_mesh;
98 MEDCouplingUMesh * _distant_mesh;
100 MCAuto<MEDCouplingSkyLineArray> _node_corresp;
101 MCAuto<MEDCouplingSkyLineArray> _face_corresp;
103 std::map < std::pair <mcIdType,mcIdType>, MEDCouplingSkyLineArray * > _entity_corresp;