Version: 9.16.0
MED_Algorithm.hxx
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5//
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.
10//
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.
15//
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
19//
20// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21//
22
23#ifndef MED_Algorithm_HeaderFile
24#define MED_Algorithm_HeaderFile
25
26#include "MED_WrapperDef.hxx"
27#include "MED_Structures.hxx"
28
29#include <boost/tuple/tuple.hpp>
30
31#include <set>
32#include <string>
33
34namespace MED
35{
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;
51
52 //---------------------------------------------------------------
56 GetEntity2TGeom2ElemInfo(const PWrapper& theWrapper,
57 const PMeshInfo& theMeshInfo,
58 const MED::TEntityInfo& theEntityInfo);
59
60 //---------------------------------------------------------------
64 GetFamilyInfoSet(const PWrapper& theWrapper,
65 const PMeshInfo& theMeshInfo);
66
67 //---------------------------------------------------------------
70 bool
71 operator<(const TFamilyTSize& theLeft, const TFamilyTSize& theRight);
72
73 //---------------------------------------------------------------
77 GetEntity2FamilySet(const PWrapper& theWrapper,
78 const TEntity2TGeom2ElemInfo& theEntity2TGeom2ElemInfo,
79 const TFamilyInfoSet& theFamilyInfoSet);
80
81 //---------------------------------------------------------------
85 GetGroupInfo(const TFamilyInfoSet& theFamilyInfoSet);
86
87 //---------------------------------------------------------------
92 const PMeshInfo& theMeshInfo,
93 const MED::TEntityInfo& theEntityInfo);
94
95 //---------------------------------------------------------------
99 GetEntite2TFieldInfo2TimeStampInfoSet(const TFieldInfo2TimeStampInfoSet& theFieldInfo2TimeStampInfoSet);
100
101 //---------------------------------------------------------------
105 GetKey2Gauss(const PWrapper& theWrapper,
106 TErr* theErr = NULL,
107 EModeSwitch theMode = eFULL_INTERLACE);
108
109 //---------------------------------------------------------------
113 GetProfileInfo(const PWrapper& theWrapper,
114 const std::string& theProfileName,
115 TErr* theErr = NULL,
116 EModeProfil theMode = eCOMPACT);
117
118 //---------------------------------------------------------------
122 GetMKey2Profile(const PWrapper& theWrapper,
123 TErr* theErr = NULL,
124 EModeProfil theMode = eCOMPACT);
125
126 //---------------------------------------------------------------
131 TInt theId);
132
133 //---------------------------------------------------------------
138
139 //---------------------------------------------------------------
143 ConvertEntity(const EEntiteMaillage& aEntity);
144}
145
146#endif // MED_Algorithm_HeaderFile
#define MEDWRAPPER_EXPORT
Definition: MED_WrapperDef.hxx:33
Specialization of SharedPtr for TWrapper.
Definition: MED_Wrapper.hxx:967
Definition: MED_Algorithm.cxx:28
boost::tuple< PFamilyInfo, TInt > TFamilyTSize
Definition: MED_Algorithm.hxx:41
EEntiteMaillage
Definition: MED_Common.hxx:72
TFieldInfo2TimeStampInfoSet GetFieldInfo2TimeStampInfoSet(const PWrapper &theWrapper, const PMeshInfo &theMeshInfo, const MED::TEntityInfo &theEntityInfo)
Read set of MED TIMESTAMPS grouped by corresponding MED FIELDS.
Definition: MED_Algorithm.cxx:114
EEntiteMaillage ConvertEntity(const EEntiteMaillage &aEntity)
Convert eNOEUD_ELEMENT to eMAILLE.
Definition: MED_Algorithm.cxx:341
std::map< PFieldInfo, TTimeStampInfoSet > TFieldInfo2TimeStampInfoSet
Definition: MED_Algorithm.hxx:45
std::map< EEntiteMaillage, TGeom2ElemInfo > TEntity2TGeom2ElemInfo
Definition: MED_Algorithm.hxx:38
TEntite2TFieldInfo2TimeStampInfoSet GetEntite2TFieldInfo2TimeStampInfoSet(const TFieldInfo2TimeStampInfoSet &theFieldInfo2TimeStampInfoSet)
Split the input set of MED TIMESTAMPS by corresponding MED FIELDS and MED ENTITIES.
Definition: MED_Algorithm.cxx:143
PProfileInfo GetProfileInfo(const PWrapper &theWrapper, const std::string &theProfileName, TErr *theErr, EModeProfil theMode)
Get MED PROFILE by its name.
Definition: MED_Algorithm.cxx:261
bool operator<(const TFamilyTSize &theLeft, const TFamilyTSize &theRight)
Compare two MED FAMILIES.
Definition: MED_Algorithm.cxx:160
TGroupInfo GetGroupInfo(const TFamilyInfoSet &theFamilyInfoSet)
Split the input set of MED FAMILIES by corresponding MED GROUPS.
Definition: MED_Algorithm.cxx:81
std::map< TInt, TInt > TFamilyID2NbCells
Definition: MED_Algorithm.hxx:50
EModeProfil
Definition: MED_Common.hxx:74
@ eCOMPACT
Definition: MED_Common.hxx:74
std::map< EEntiteMaillage, TGeom2Size > TEntityInfo
Definition: MED_Common.hxx:87
TEntity2TGeom2ElemInfo GetEntity2TGeom2ElemInfo(const PWrapper &theWrapper, const PMeshInfo &theMeshInfo, const MED::TEntityInfo &theEntityInfo)
Get set of TElemInfo by its geometrical type and corresponding MED ENTITY.
Definition: MED_Algorithm.cxx:31
std::set< PFamilyInfo > TFamilyInfoSet
Definition: MED_Algorithm.hxx:39
TKey2Gauss GetKey2Gauss(const PWrapper &theWrapper, TErr *theErr, EModeSwitch theMode)
Read set of MED GAUSS.
Definition: MED_Algorithm.cxx:234
std::set< TFamilyTSize > TFamilyTSizeSet
Definition: MED_Algorithm.hxx:42
EEntiteMaillage GetEntityByFamilyId(PGrilleInfo &theInfo, TInt theId)
Get Entity for Grille by family id.
Definition: MED_Algorithm.cxx:308
std::map< EEntiteMaillage, TFieldInfo2TimeStampInfoSet > TEntite2TFieldInfo2TimeStampInfoSet
Definition: MED_Algorithm.hxx:46
TFamilyInfoSet GetFamilyInfoSet(const PWrapper &theWrapper, const PMeshInfo &theMeshInfo)
Read set of MED FAMILIES for defined MED file.
Definition: MED_Algorithm.cxx:62
std::map< std::string, TFamilyInfoSet > TGroupInfo
Definition: MED_Algorithm.hxx:40
std::map< TProfileInfo::TKey, PProfileInfo > TKey2Profile
Definition: MED_Algorithm.hxx:48
boost::tuple< EModeProfil, TKey2Profile > TMKey2Profile
Definition: MED_Algorithm.hxx:49
herr_t TErr
Definition: MED_Common.hxx:52
std::map< TGaussInfo::TKey, PGaussInfo, TGaussInfo::TLess > TKey2Gauss
Definition: MED_Algorithm.hxx:47
med_int TInt
Definition: MED_Common.hxx:50
TEntity2FamilySet GetEntity2FamilySet(const PWrapper &, const TEntity2TGeom2ElemInfo &theEntity2TGeom2ElemInfo, const TFamilyInfoSet &theFamilyInfoSet)
Split set of MED FAMILIES by corresponding MED ENTITY.
Definition: MED_Algorithm.cxx:169
std::set< PTimeStampInfo > TTimeStampInfoSet
Definition: MED_Algorithm.hxx:44
EModeSwitch
Definition: MED_Common.hxx:54
@ eFULL_INTERLACE
Definition: MED_Common.hxx:54
std::map< EGeometrieElement, PElemInfo > TGeom2ElemInfo
Definition: MED_Algorithm.hxx:37
TMKey2Profile GetMKey2Profile(const PWrapper &theWrapper, TErr *theErr, EModeProfil theMode)
Read set of MED PROFILES.
Definition: MED_Algorithm.cxx:279
std::map< EEntiteMaillage, TFamilyTSizeSet > TEntity2FamilySet
Definition: MED_Algorithm.hxx:43
TFamilyID2NbCells GetFamilyID2NbCells(PGrilleInfo &theInfo)
Get Number of cells for theId family, for Grille.
Definition: MED_Algorithm.cxx:327