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);
37 GetNodeName(vtkIdType theObjID) const;
39 typedef SharedPtr<TMEDNamedPointCoords> PMEDNamedPointCoords;
42 //---------------------------------------------------------------
43 struct TMEDMesh: virtual TMeshImpl
45 MED::PMeshInfo myMeshInfo;
46 MED::TEntityInfo myEntityInfo;
48 typedef SharedPtr<TMEDMesh> PMEDMesh;
51 //---------------------------------------------------------------
52 struct TMEDSubProfile: virtual TSubProfileImpl
54 MED::EGeometrieElement myMGeom;
57 myIsElemNum(MED::eFAUX)
60 MED::EBooleen myIsElemNum;
61 MED::TElemNum myElemNum;
65 GetElemObjID(vtkIdType theID) const;
67 typedef SharedPtr<TMEDSubProfile> PMEDSubProfile;
70 //---------------------------------------------------------------
71 struct TMEDProfile: virtual TProfileImpl
73 typedef SharedPtr<TMEDProfile> PMEDProfile;
76 //---------------------------------------------------------------
77 struct TMEDGauss: virtual TGaussImpl
79 MED::PGaussInfo myGaussInfo;
81 //! To define a way to implement more detail comparision of the TGaussSubMesh instances
84 LessThan(const PGaussImpl& theGauss,
85 bool& theResult) const;
87 typedef SharedPtr<TMEDGauss> PMEDGauss;
90 //---------------------------------------------------------------
91 struct TMEDGaussSubMesh: virtual TGaussSubMeshImpl
94 myIsElemNum(MED::eFAUX)
97 MED::EBooleen myIsElemNum;
98 MED::TElemNum myElemNum;
102 GetObjID(vtkIdType theID,
103 vtkIdType theStartID) const;
105 typedef SharedPtr<TMEDGaussSubMesh> PMEDGaussSubMesh;
108 //---------------------------------------------------------------
109 struct TMEDGaussMesh: virtual TGaussMeshImpl
111 typedef SharedPtr<TMEDGaussMesh> PMEDGaussMesh;
114 //---------------------------------------------------------------
115 struct TMEDSubMesh: virtual TSubMeshImpl
118 myIsElemNum(MED::eFAUX)
121 MED::EBooleen myIsElemNum;
122 MED::TElemNum myElemNum;
123 MED::PElemInfo myElemInfo;
126 Init(const MED::PElemInfo& theElemInfo);
130 GetElemObjID(vtkIdType theID) const;
134 GetElemName(vtkIdType theObjID) const;
136 typedef SharedPtr<TMEDSubMesh> PMEDSubMesh;
139 //---------------------------------------------------------------
140 typedef std::map<vtkIdType,vtkIdType> TFamilyID2CellsSize;
142 struct TMEDMeshOnEntity: virtual TMeshOnEntityImpl
144 TFamilyID2CellsSize myFamilyID2CellsSize;
145 MED::TGeom2Size myGeom2Size;
147 typedef SharedPtr<TMEDMeshOnEntity> PMEDMeshOnEntity;
150 //---------------------------------------------------------------
151 struct TMEDFamily: virtual TFamilyImpl
153 typedef SharedPtr<TMEDFamily> PMEDFamily;
156 //---------------------------------------------------------------
157 struct TMEDGroup: virtual TGroupImpl
159 typedef SharedPtr<TMEDGroup> PMEDGroup;
162 //---------------------------------------------------------------
163 struct TMEDField: virtual TFieldImpl
165 typedef SharedPtr<TMEDField> PMEDField;
168 //---------------------------------------------------------------
169 struct TMEDValForTime: virtual TValForTimeImpl
171 typedef SharedPtr<TMEDValForTime> PMEDValForTime;
175 class VISU_MedConvertor: public VISU_Convertor_impl
178 VISU_MedConvertor(const VISU_MedConvertor&);
180 bool myIsEntitiesDone;
186 VISU_MedConvertor(const std::string& theFileName);
205 QFileInfo myFileInfo;
209 LoadMeshOnEntity(VISU::PMeshImpl theMesh,
210 VISU::PMeshOnEntityImpl theMeshOnEntity);
214 LoadFamilyOnEntity(VISU::PMeshImpl theMesh,
215 VISU::PMeshOnEntityImpl theMeshOnEntity,
216 VISU::PFamilyImpl theFamily);
220 LoadMeshOnGroup(VISU::PMeshImpl theMesh,
221 const VISU::TFamilySet& theFamilySet);
225 LoadValForTimeOnMesh(VISU::PMeshImpl theMesh,
226 VISU::PMeshOnEntityImpl theMeshOnEntity,
227 VISU::PFieldImpl theField,
228 VISU::PValForTimeImpl theValForTime);
232 LoadValForTimeOnGaussPts(VISU::PMeshImpl theMesh,
233 VISU::PMeshOnEntityImpl theMeshOnEntity,
234 VISU::PFieldImpl theField,
235 VISU::PValForTimeImpl theValForTime);
238 LoadPoints(const MED::PWrapper& theMed,
239 const VISU::PMEDMesh theMesh);
242 LoadPointsOnFamily(const MED::PWrapper& theMed,
243 const VISU::PMEDMesh theMesh,
244 const VISU::PMEDFamily theFamily);
247 LoadCellsOnEntity(const MED::PWrapper& theMed,
248 const VISU::PMEDMesh theMesh,
249 const VISU::PMEDMeshOnEntity theMeshOnEntity);
252 LoadCellsOnFamily(const MED::PWrapper& theMed,
253 const VISU::PMEDMesh theMesh,
254 const VISU::PMEDMeshOnEntity theMeshOnEntity,
255 const VISU::PMEDFamily theFamily);
258 LoadValForTimeOnMesh(const MED::PWrapper& theMed,
259 VISU::PMEDMesh theMesh,
260 VISU::PMEDMeshOnEntity theMeshOnEntity,
261 VISU::PMEDField theField,
262 VISU::PMEDValForTime theValForTime);
265 LoadValForTimeOnGaussPts(const MED::PWrapper& theMed,
266 VISU::PMEDMesh theMesh,
267 VISU::PMEDMeshOnEntity theMeshOnEntity,
268 VISU::PMEDField theField,
269 VISU::PMEDValForTime theValForTime);