1 // Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #include "MED_Common.hxx"
59 GetVersionRelease(TInt& major, TInt& minor, TInt& release)
61 major = MED_MAJOR_NUM;
62 minor = MED_MINOR_NUM;
63 release = MED_RELEASE_NUM;
67 GetNbConn(EGeometrieElement typmai,
68 EEntiteMaillage /*typent*/,
75 GetNbNodes(EGeometrieElement typmai)
80 const MED::TEntity2GeomSet& GetEntity2GeomSet()
82 static MED::TEntity2GeomSet Entity2GeomSet;
84 if ( Entity2GeomSet.empty() ) {
85 TGeomSet& aGeomARETESet = Entity2GeomSet[MED::eARETE];
86 aGeomARETESet.insert(MED::eSEG2);
87 aGeomARETESet.insert(MED::eSEG3);
89 TGeomSet& aGeomFACESet = Entity2GeomSet[MED::eFACE];
90 aGeomFACESet.insert(MED::eTRIA3);
91 aGeomFACESet.insert(MED::eQUAD4);
92 aGeomFACESet.insert(MED::eTRIA6);
93 aGeomFACESet.insert(MED::eTRIA7);
94 aGeomFACESet.insert(MED::eQUAD8);
95 aGeomFACESet.insert(MED::eQUAD9);
96 aGeomFACESet.insert(MED::ePOLYGONE);
97 aGeomFACESet.insert(MED::ePOLYGON2);
99 TGeomSet& aGeomMAILLESet = Entity2GeomSet[MED::eMAILLE];
100 aGeomMAILLESet.insert(MED::ePOINT1);
101 aGeomMAILLESet.insert(aGeomARETESet.begin(), aGeomARETESet.end());
102 aGeomMAILLESet.insert(aGeomFACESet.begin(), aGeomFACESet.end());
103 aGeomMAILLESet.insert(MED::eTETRA4);
104 aGeomMAILLESet.insert(MED::ePYRA5);
105 aGeomMAILLESet.insert(MED::ePENTA6);
106 aGeomMAILLESet.insert(MED::eHEXA8);
107 aGeomMAILLESet.insert(MED::eOCTA12);
108 aGeomMAILLESet.insert(MED::eTETRA10);
109 aGeomMAILLESet.insert(MED::ePYRA13);
110 aGeomMAILLESet.insert(MED::ePENTA15);
111 aGeomMAILLESet.insert(MED::ePENTA18);
112 aGeomMAILLESet.insert(MED::eHEXA20);
113 aGeomMAILLESet.insert(MED::eHEXA27);
114 aGeomMAILLESet.insert(MED::ePOLYEDRE);
116 /* This combination allows reading nb of models of structure elements */
117 Entity2GeomSet[MED::eSTRUCT_ELEMENT].insert(MED::eAllGeoType);
120 return Entity2GeomSet;