1 // Copyright (C) 2007-2013 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.
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_WrapperBase.hxx"
27 #include "MED_Structures.hxx"
33 //---------------------------------------------------------------
34 typedef std::map<EGeometrieElement,PElemInfo> TGeom2ElemInfo;
35 typedef std::map<EEntiteMaillage,TGeom2ElemInfo> TEntity2TGeom2ElemInfo;
37 //! Get set of TElemInfo by its geometrical type and corresponding MED ENTITY
39 TEntity2TGeom2ElemInfo
40 GetEntity2TGeom2ElemInfo(const PWrapper& theWrapper,
41 const PMeshInfo& theMeshInfo,
42 const MED::TEntityInfo& theEntityInfo);
45 //---------------------------------------------------------------
46 typedef std::set<PFamilyInfo> TFamilyInfoSet;
48 //! Read set of MED FAMILIES for defined MED file
51 GetFamilyInfoSet(const PWrapper& theWrapper,
52 const PMeshInfo& theMeshInfo);
55 //---------------------------------------------------------------
56 typedef boost::tuple<PFamilyInfo,TInt> TFamilyTSize;
59 operator<(const TFamilyTSize& theLeft, const TFamilyTSize& theRight);
60 typedef std::set<TFamilyTSize> TFamilyTSizeSet;
63 //---------------------------------------------------------------
64 typedef std::map<EEntiteMaillage,TFamilyTSizeSet> TEntity2FamilySet;
66 //! Split set of MED FAMILIES by corresponding MED ENTITY
69 GetEntity2FamilySet(const PWrapper& theWrapper,
70 const TEntity2TGeom2ElemInfo& theEntity2TGeom2ElemInfo,
71 const TFamilyInfoSet& theFamilyInfoSet);
74 //---------------------------------------------------------------
75 typedef std::map<std::string,TFamilyInfoSet> TGroupInfo;
77 //! Split the input set of MED FAMILIES by corresponding MED GROUPS
80 GetGroupInfo(const TFamilyInfoSet& theFamilyInfoSet);
83 //---------------------------------------------------------------
84 typedef std::set<PTimeStampInfo> TTimeStampInfoSet;
85 typedef std::map<PFieldInfo,TTimeStampInfoSet> TFieldInfo2TimeStampInfoSet;
87 //! Read set of MED TIMESTAMPS groupped by corresponding MED FIELDS
89 TFieldInfo2TimeStampInfoSet
90 GetFieldInfo2TimeStampInfoSet(const PWrapper& theWrapper,
91 const PMeshInfo& theMeshInfo,
92 const MED::TEntityInfo& theEntityInfo);
95 //---------------------------------------------------------------
96 typedef std::map<EEntiteMaillage,TFieldInfo2TimeStampInfoSet> TEntite2TFieldInfo2TimeStampInfoSet;
98 //! Split the input set of MED TIMESTAMPS by corresponding MED FIELDS and MED ENTITIES
100 TEntite2TFieldInfo2TimeStampInfoSet
101 GetEntite2TFieldInfo2TimeStampInfoSet(const TFieldInfo2TimeStampInfoSet& theFieldInfo2TimeStampInfoSet);
104 //---------------------------------------------------------------
105 typedef std::map<TGaussInfo::TKey,PGaussInfo,TGaussInfo::TLess> TKey2Gauss;
107 //! Read set of MED GAUSS
110 GetKey2Gauss(const PWrapper& theWrapper,
112 EModeSwitch theMode = eFULL_INTERLACE);
115 //---------------------------------------------------------------
116 //! Get MED PROFILE by its name
119 GetProfileInfo(const PWrapper& theWrapper,
120 const std::string& theProfileName,
122 EModeProfil theMode = eCOMPACT);
125 //---------------------------------------------------------------
126 typedef std::map<TProfileInfo::TKey,PProfileInfo> TKey2Profile;
127 typedef boost::tuple<EModeProfil,TKey2Profile> TMKey2Profile;
129 //! Read set of MED PROFILES
132 GetMKey2Profile(const PWrapper& theWrapper,
134 EModeProfil theMode = eCOMPACT);
136 //---------------------------------------------------------------
137 //! Get Entity for Grille by family id.
140 GetEntityByFamilyId(PGrilleInfo& theInfo,
143 typedef std::map<TInt,TInt> TFamilyID2NbCells;
145 //! Get Number of cells for theId family, for Grille
148 GetFamilyID2NbCells(PGrilleInfo& theInfo);
150 //! Convert eNOEUD_ELEMENT to eMAILLE
153 ConvertEntity(const EEntiteMaillage& aEntity);