1 // Copyright (C) 2003 CEA/DEN, EDF R&D
5 // File : VISU_MedConvertor.hxx
6 // Author : Alexey PETROV
9 #ifndef VISU_MedConvertor_HeaderFile
10 #define VISU_MedConvertor_HeaderFile
12 #include "VISU_Convertor_impl.hxx"
14 #include "MED_Common.hxx"
15 #include "MED_Structures.hxx"
17 #include <boost/thread/mutex.hpp>
18 #include <qfileinfo.h>
22 typedef TVector<TName> TNames;
24 //---------------------------------------------------------------
25 class TMEDNamedPointCoords: public virtual TNamedPointCoords
27 MED::PNodeInfo myNodeInfo;
31 Init(vtkIdType theNbPoints,
33 const MED::PNodeInfo& theNodeInfo);
36 Init(vtkIdType theNbPoints,
38 const MED::PGrilleInfo& theGrilleInfo);
42 GetNodeName(vtkIdType theObjID) const;
44 typedef SharedPtr<TMEDNamedPointCoords> PMEDNamedPointCoords;
47 //---------------------------------------------------------------
48 struct TMEDMesh: virtual TMeshImpl
50 MED::PMeshInfo myMeshInfo;
51 MED::TEntityInfo myEntityInfo;
53 typedef SharedPtr<TMEDMesh> PMEDMesh;
56 //---------------------------------------------------------------
57 struct TMEDSubProfile: virtual TSubProfileImpl
59 MED::EGeometrieElement myMGeom;
62 myIsElemNum(MED::eFAUX)
65 MED::EBooleen myIsElemNum;
66 MED::TElemNum myElemNum;
70 GetElemObjID(vtkIdType theID) const;
72 typedef SharedPtr<TMEDSubProfile> PMEDSubProfile;
75 //---------------------------------------------------------------
76 struct TMEDProfile: virtual TProfileImpl
78 typedef SharedPtr<TMEDProfile> PMEDProfile;
81 //---------------------------------------------------------------
82 struct TMEDGauss: virtual TGaussImpl
84 MED::PGaussInfo myGaussInfo;
86 //! To define a way to implement more detail comparision of the TGaussSubMesh instances
89 LessThan(const PGaussImpl& theGauss,
90 bool& theResult) const;
92 typedef SharedPtr<TMEDGauss> PMEDGauss;
95 //---------------------------------------------------------------
96 struct TMEDGaussSubMesh: virtual TGaussSubMeshImpl
99 myIsElemNum(MED::eFAUX)
102 MED::EBooleen myIsElemNum;
103 MED::TElemNum myElemNum;
107 GetObjID(vtkIdType theID,
108 vtkIdType theStartID) const;
110 typedef SharedPtr<TMEDGaussSubMesh> PMEDGaussSubMesh;
113 //---------------------------------------------------------------
114 struct TMEDGaussMesh: virtual TGaussMeshImpl
116 typedef SharedPtr<TMEDGaussMesh> PMEDGaussMesh;
119 //---------------------------------------------------------------
120 struct TMEDSubMesh: virtual TSubMeshImpl
123 myIsElemNum(MED::eFAUX)
126 MED::EBooleen myIsElemNum;
127 MED::TElemNum myElemNum;
128 MED::PElemInfo myElemInfo;
131 Init(const MED::PElemInfo& theElemInfo);
134 Init(const MED::PGrilleInfo& theGrilleInfo);
138 GetElemObjID(vtkIdType theID) const;
142 GetElemName(vtkIdType theObjID) const;
144 typedef SharedPtr<TMEDSubMesh> PMEDSubMesh;
147 //---------------------------------------------------------------
148 typedef std::map<vtkIdType,vtkIdType> TFamilyID2CellsSize;
150 struct TMEDMeshOnEntity: virtual TMeshOnEntityImpl
152 TFamilyID2CellsSize myFamilyID2CellsSize;
153 MED::TGeom2Size myGeom2Size;
155 typedef SharedPtr<TMEDMeshOnEntity> PMEDMeshOnEntity;
158 //---------------------------------------------------------------
159 struct TMEDFamily: virtual TFamilyImpl
161 typedef SharedPtr<TMEDFamily> PMEDFamily;
164 //---------------------------------------------------------------
165 struct TMEDGroup: virtual TGroupImpl
167 typedef SharedPtr<TMEDGroup> PMEDGroup;
170 //---------------------------------------------------------------
171 struct TMEDField: virtual TFieldImpl
173 typedef SharedPtr<TMEDField> PMEDField;
176 //---------------------------------------------------------------
177 struct TMEDValForTime: virtual TValForTimeImpl
179 typedef SharedPtr<TMEDValForTime> PMEDValForTime;
183 class VISU_MedConvertor: public VISU_Convertor_impl
186 VISU_MedConvertor(const VISU_MedConvertor&);
188 bool myIsEntitiesDone;
194 VISU_MedConvertor(const std::string& theFileName);
213 QFileInfo myFileInfo;
217 LoadMeshOnEntity(VISU::PMeshImpl theMesh,
218 VISU::PMeshOnEntityImpl theMeshOnEntity);
222 LoadFamilyOnEntity(VISU::PMeshImpl theMesh,
223 VISU::PMeshOnEntityImpl theMeshOnEntity,
224 VISU::PFamilyImpl theFamily);
228 LoadMeshOnGroup(VISU::PMeshImpl theMesh,
229 const VISU::TFamilySet& theFamilySet);
233 LoadValForTimeOnMesh(VISU::PMeshImpl theMesh,
234 VISU::PMeshOnEntityImpl theMeshOnEntity,
235 VISU::PFieldImpl theField,
236 VISU::PValForTimeImpl theValForTime);
240 LoadValForTimeOnGaussPts(VISU::PMeshImpl theMesh,
241 VISU::PMeshOnEntityImpl theMeshOnEntity,
242 VISU::PFieldImpl theField,
243 VISU::PValForTimeImpl theValForTime);
246 LoadPoints(const MED::PWrapper& theMed,
247 const VISU::PMEDMesh theMesh);
250 LoadPointsOnFamily(const MED::PWrapper& theMed,
251 const VISU::PMEDMesh theMesh,
252 const VISU::PMEDFamily theFamily);
255 LoadCellsOnEntity(const MED::PWrapper& theMed,
256 const VISU::PMEDMesh theMesh,
257 const VISU::PMEDMeshOnEntity theMeshOnEntity);
260 LoadCellsOnFamily(const MED::PWrapper& theMed,
261 const VISU::PMEDMesh theMesh,
262 const VISU::PMEDMeshOnEntity theMeshOnEntity,
263 const VISU::PMEDFamily theFamily);
266 LoadValForTimeOnMesh(const MED::PWrapper& theMed,
267 VISU::PMEDMesh theMesh,
268 VISU::PMEDMeshOnEntity theMeshOnEntity,
269 VISU::PMEDField theField,
270 VISU::PMEDValForTime theValForTime);
273 LoadValForTimeOnGaussPts(const MED::PWrapper& theMed,
274 VISU::PMEDMesh theMesh,
275 VISU::PMEDMeshOnEntity theMeshOnEntity,
276 VISU::PMEDField theField,
277 VISU::PMEDValForTime theValForTime);