1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, 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 #ifndef MED_Algorithm_HeaderFile
24 #define MED_Algorithm_HeaderFile
26 #include "MED_WrapperDef.hxx"
27 #include "MED_Structures.hxx"
34 //---------------------------------------------------------------
35 typedef std::map<EGeometrieElement,PElemInfo> TGeom2ElemInfo;
36 typedef std::map<EEntiteMaillage,TGeom2ElemInfo> TEntity2TGeom2ElemInfo;
37 typedef std::set<PFamilyInfo> TFamilyInfoSet;
38 typedef std::map<std::string,TFamilyInfoSet> TGroupInfo;
39 typedef boost::tuple<PFamilyInfo,TInt> TFamilyTSize;
40 typedef std::set<TFamilyTSize> TFamilyTSizeSet;
41 typedef std::map<EEntiteMaillage,TFamilyTSizeSet> TEntity2FamilySet;
42 typedef std::set<PTimeStampInfo> TTimeStampInfoSet;
43 typedef std::map<PFieldInfo,TTimeStampInfoSet> TFieldInfo2TimeStampInfoSet;
44 typedef std::map<EEntiteMaillage,TFieldInfo2TimeStampInfoSet> TEntite2TFieldInfo2TimeStampInfoSet;
45 typedef std::map<TGaussInfo::TKey,PGaussInfo,TGaussInfo::TLess> TKey2Gauss;
46 typedef std::map<TProfileInfo::TKey,PProfileInfo> TKey2Profile;
47 typedef boost::tuple<EModeProfil,TKey2Profile> TMKey2Profile;
48 typedef std::map<TInt,TInt> TFamilyID2NbCells;
50 //---------------------------------------------------------------
51 //! Get set of TElemInfo by its geometrical type and corresponding MED ENTITY
53 TEntity2TGeom2ElemInfo
54 GetEntity2TGeom2ElemInfo(const PWrapper& theWrapper,
55 const PMeshInfo& theMeshInfo,
56 const MED::TEntityInfo& theEntityInfo);
58 //---------------------------------------------------------------
59 //! Read set of MED FAMILIES for defined MED file
62 GetFamilyInfoSet(const PWrapper& theWrapper,
63 const PMeshInfo& theMeshInfo);
65 //---------------------------------------------------------------
66 //! Compare two MED FAMILIES
69 operator<(const TFamilyTSize& theLeft, const TFamilyTSize& theRight);
71 //---------------------------------------------------------------
72 //! Split set of MED FAMILIES by corresponding MED ENTITY
75 GetEntity2FamilySet(const PWrapper& theWrapper,
76 const TEntity2TGeom2ElemInfo& theEntity2TGeom2ElemInfo,
77 const TFamilyInfoSet& theFamilyInfoSet);
79 //---------------------------------------------------------------
80 //! Split the input set of MED FAMILIES by corresponding MED GROUPS
83 GetGroupInfo(const TFamilyInfoSet& theFamilyInfoSet);
85 //---------------------------------------------------------------
86 //! Read set of MED TIMESTAMPS groupped by corresponding MED FIELDS
88 TFieldInfo2TimeStampInfoSet
89 GetFieldInfo2TimeStampInfoSet(const PWrapper& theWrapper,
90 const PMeshInfo& theMeshInfo,
91 const MED::TEntityInfo& theEntityInfo);
93 //---------------------------------------------------------------
94 //! Split the input set of MED TIMESTAMPS by corresponding MED FIELDS and MED ENTITIES
96 TEntite2TFieldInfo2TimeStampInfoSet
97 GetEntite2TFieldInfo2TimeStampInfoSet(const TFieldInfo2TimeStampInfoSet& theFieldInfo2TimeStampInfoSet);
99 //---------------------------------------------------------------
100 //! Read set of MED GAUSS
103 GetKey2Gauss(const PWrapper& theWrapper,
105 EModeSwitch theMode = eFULL_INTERLACE);
107 //---------------------------------------------------------------
108 //! Get MED PROFILE by its name
111 GetProfileInfo(const PWrapper& theWrapper,
112 const std::string& theProfileName,
114 EModeProfil theMode = eCOMPACT);
116 //---------------------------------------------------------------
117 //! Read set of MED PROFILES
120 GetMKey2Profile(const PWrapper& theWrapper,
122 EModeProfil theMode = eCOMPACT);
124 //---------------------------------------------------------------
125 //! Get Entity for Grille by family id.
128 GetEntityByFamilyId(PGrilleInfo& theInfo,
131 //---------------------------------------------------------------
132 //! Get Number of cells for theId family, for Grille
135 GetFamilyID2NbCells(PGrilleInfo& theInfo);
137 //---------------------------------------------------------------
138 //! Convert eNOEUD_ELEMENT to eMAILLE
141 ConvertEntity(const EEntiteMaillage& aEntity);
144 #endif // MED_Algorithm_HeaderFile