1 // Copyright (C) 2007-2020 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"
29 #include <boost/tuple/tuple.hpp>
36 //---------------------------------------------------------------
37 typedef std::map<EGeometrieElement,PElemInfo> TGeom2ElemInfo;
38 typedef std::map<EEntiteMaillage,TGeom2ElemInfo> TEntity2TGeom2ElemInfo;
39 typedef std::set<PFamilyInfo> TFamilyInfoSet;
40 typedef std::map<std::string,TFamilyInfoSet> TGroupInfo;
41 typedef boost::tuple<PFamilyInfo,TInt> TFamilyTSize;
42 typedef std::set<TFamilyTSize> TFamilyTSizeSet;
43 typedef std::map<EEntiteMaillage,TFamilyTSizeSet> TEntity2FamilySet;
44 typedef std::set<PTimeStampInfo> TTimeStampInfoSet;
45 typedef std::map<PFieldInfo,TTimeStampInfoSet> TFieldInfo2TimeStampInfoSet;
46 typedef std::map<EEntiteMaillage,TFieldInfo2TimeStampInfoSet> TEntite2TFieldInfo2TimeStampInfoSet;
47 typedef std::map<TGaussInfo::TKey,PGaussInfo,TGaussInfo::TLess> TKey2Gauss;
48 typedef std::map<TProfileInfo::TKey,PProfileInfo> TKey2Profile;
49 typedef boost::tuple<EModeProfil,TKey2Profile> TMKey2Profile;
50 typedef std::map<TInt,TInt> TFamilyID2NbCells;
52 //---------------------------------------------------------------
53 //! Get set of TElemInfo by its geometrical type and corresponding MED ENTITY
55 TEntity2TGeom2ElemInfo
56 GetEntity2TGeom2ElemInfo(const PWrapper& theWrapper,
57 const PMeshInfo& theMeshInfo,
58 const MED::TEntityInfo& theEntityInfo);
60 //---------------------------------------------------------------
61 //! Read set of MED FAMILIES for defined MED file
64 GetFamilyInfoSet(const PWrapper& theWrapper,
65 const PMeshInfo& theMeshInfo);
67 //---------------------------------------------------------------
68 //! Compare two MED FAMILIES
71 operator<(const TFamilyTSize& theLeft, const TFamilyTSize& theRight);
73 //---------------------------------------------------------------
74 //! Split set of MED FAMILIES by corresponding MED ENTITY
77 GetEntity2FamilySet(const PWrapper& theWrapper,
78 const TEntity2TGeom2ElemInfo& theEntity2TGeom2ElemInfo,
79 const TFamilyInfoSet& theFamilyInfoSet);
81 //---------------------------------------------------------------
82 //! Split the input set of MED FAMILIES by corresponding MED GROUPS
85 GetGroupInfo(const TFamilyInfoSet& theFamilyInfoSet);
87 //---------------------------------------------------------------
88 //! Read set of MED TIMESTAMPS groupped by corresponding MED FIELDS
90 TFieldInfo2TimeStampInfoSet
91 GetFieldInfo2TimeStampInfoSet(const PWrapper& theWrapper,
92 const PMeshInfo& theMeshInfo,
93 const MED::TEntityInfo& theEntityInfo);
95 //---------------------------------------------------------------
96 //! Split the input set of MED TIMESTAMPS by corresponding MED FIELDS and MED ENTITIES
98 TEntite2TFieldInfo2TimeStampInfoSet
99 GetEntite2TFieldInfo2TimeStampInfoSet(const TFieldInfo2TimeStampInfoSet& theFieldInfo2TimeStampInfoSet);
101 //---------------------------------------------------------------
102 //! Read set of MED GAUSS
105 GetKey2Gauss(const PWrapper& theWrapper,
107 EModeSwitch theMode = eFULL_INTERLACE);
109 //---------------------------------------------------------------
110 //! Get MED PROFILE by its name
113 GetProfileInfo(const PWrapper& theWrapper,
114 const std::string& theProfileName,
116 EModeProfil theMode = eCOMPACT);
118 //---------------------------------------------------------------
119 //! Read set of MED PROFILES
122 GetMKey2Profile(const PWrapper& theWrapper,
124 EModeProfil theMode = eCOMPACT);
126 //---------------------------------------------------------------
127 //! Get Entity for Grille by family id.
130 GetEntityByFamilyId(PGrilleInfo& theInfo,
133 //---------------------------------------------------------------
134 //! Get Number of cells for theId family, for Grille
137 GetFamilyID2NbCells(PGrilleInfo& theInfo);
139 //---------------------------------------------------------------
140 //! Convert eNOEUD_ELEMENT to eMAILLE
143 ConvertEntity(const EEntiteMaillage& aEntity);
146 #endif // MED_Algorithm_HeaderFile