1 // Copyright (C) 2007-2015 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
22 #ifndef MED_Algorithm_HeaderFile
23 #define MED_Algorithm_HeaderFile
25 #include "MED_WrapperBase.hxx"
26 #include "MED_Structures.hxx"
32 //---------------------------------------------------------------
33 typedef std::map<EGeometrieElement,PElemInfo> TGeom2ElemInfo;
34 typedef std::map<EEntiteMaillage,TGeom2ElemInfo> TEntity2TGeom2ElemInfo;
36 //! Get set of TElemInfo by its geometrical type and corresponding MED ENTITY
38 TEntity2TGeom2ElemInfo
39 GetEntity2TGeom2ElemInfo(const PWrapper& theWrapper,
40 const PMeshInfo& theMeshInfo,
41 const MED::TEntityInfo& theEntityInfo);
44 //---------------------------------------------------------------
45 typedef std::set<PFamilyInfo> TFamilyInfoSet;
47 //! Read set of MED FAMILIES for defined MED file
50 GetFamilyInfoSet(const PWrapper& theWrapper,
51 const PMeshInfo& theMeshInfo);
54 //---------------------------------------------------------------
55 typedef boost::tuple<PFamilyInfo,TInt> TFamilyTSize;
58 operator<(const TFamilyTSize& theLeft, const TFamilyTSize& theRight);
59 typedef std::set<TFamilyTSize> TFamilyTSizeSet;
62 //---------------------------------------------------------------
63 typedef std::map<EEntiteMaillage,TFamilyTSizeSet> TEntity2FamilySet;
65 //! Split set of MED FAMILIES by corresponding MED ENTITY
68 GetEntity2FamilySet(const PWrapper& theWrapper,
69 const TEntity2TGeom2ElemInfo& theEntity2TGeom2ElemInfo,
70 const TFamilyInfoSet& theFamilyInfoSet);
73 //---------------------------------------------------------------
74 typedef std::map<std::string,TFamilyInfoSet> TGroupInfo;
76 //! Split the input set of MED FAMILIES by corresponding MED GROUPS
79 GetGroupInfo(const TFamilyInfoSet& theFamilyInfoSet);
82 //---------------------------------------------------------------
83 typedef std::set<PTimeStampInfo> TTimeStampInfoSet;
84 typedef std::map<PFieldInfo,TTimeStampInfoSet> TFieldInfo2TimeStampInfoSet;
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);
94 //---------------------------------------------------------------
95 typedef std::map<EEntiteMaillage,TFieldInfo2TimeStampInfoSet> TEntite2TFieldInfo2TimeStampInfoSet;
97 //! Split the input set of MED TIMESTAMPS by corresponding MED FIELDS and MED ENTITIES
99 TEntite2TFieldInfo2TimeStampInfoSet
100 GetEntite2TFieldInfo2TimeStampInfoSet(const TFieldInfo2TimeStampInfoSet& theFieldInfo2TimeStampInfoSet);
103 //---------------------------------------------------------------
104 typedef std::map<TGaussInfo::TKey,PGaussInfo,TGaussInfo::TLess> TKey2Gauss;
106 //! Read set of MED GAUSS
109 GetKey2Gauss(const PWrapper& theWrapper,
111 EModeSwitch theMode = eFULL_INTERLACE);
114 //---------------------------------------------------------------
115 //! Get MED PROFILE by its name
118 GetProfileInfo(const PWrapper& theWrapper,
119 const std::string& theProfileName,
121 EModeProfil theMode = eCOMPACT);
124 //---------------------------------------------------------------
125 typedef std::map<TProfileInfo::TKey,PProfileInfo> TKey2Profile;
126 typedef boost::tuple<EModeProfil,TKey2Profile> TMKey2Profile;
128 //! Read set of MED PROFILES
131 GetMKey2Profile(const PWrapper& theWrapper,
133 EModeProfil theMode = eCOMPACT);
135 //---------------------------------------------------------------
136 //! Get Entity for Grille by family id.
139 GetEntityByFamilyId(PGrilleInfo& theInfo,
142 typedef std::map<TInt,TInt> TFamilyID2NbCells;
144 //! Get Number of cells for theId family, for Grille
147 GetFamilyID2NbCells(PGrilleInfo& theInfo);
149 //! Convert eNOEUD_ELEMENT to eMAILLE
152 ConvertEntity(const EEntiteMaillage& aEntity);