#include "VISU_Convertor_impl.hxx"
#include "MED_Common.hxx"
+#include "MED_Structures.hxx"
-namespace VISU{
+#include <boost/thread/mutex.hpp>
+#include <qfileinfo.h>
- struct TMEDMesh: TMeshImpl{
+namespace VISU
+{
+ typedef TVector<TName> TNames;
+
+ //---------------------------------------------------------------
+ class TMEDNamedPointCoords: public virtual TNamedPointCoords
+ {
+ MED::PNodeInfo myNodeInfo;
+ TNames myPointNames;
+ public:
+ void
+ Init(vtkIdType theNbPoints,
+ vtkIdType theDim,
+ const MED::PNodeInfo& theNodeInfo);
+
+ virtual
+ std::string
+ GetNodeName(vtkIdType theObjID) const;
+ };
+ typedef SharedPtr<TMEDNamedPointCoords> PMEDNamedPointCoords;
+
+
+ //---------------------------------------------------------------
+ struct TMEDMesh: virtual TMeshImpl
+ {
MED::PMeshInfo myMeshInfo;
MED::TEntityInfo myEntityInfo;
};
- typedef shared_ptr<TMEDMesh> PMEDMesh;
+ typedef SharedPtr<TMEDMesh> PMEDMesh;
+
- struct TMEDMeshOnEntity: TMeshOnEntityImpl{
- MED::TGeom myGeom;
+ //---------------------------------------------------------------
+ struct TMEDSubProfile: virtual TSubProfileImpl
+ {
+ MED::EGeometrieElement myMGeom;
+
+ TMEDSubProfile():
+ myIsElemNum(MED::eFAUX)
+ {}
+
+ MED::EBooleen myIsElemNum;
+ MED::TElemNum myElemNum;
+
+ virtual
+ vtkIdType
+ GetElemObjID(vtkIdType theID) const;
};
- typedef shared_ptr<TMEDMeshOnEntity> PMEDMeshOnEntity;
+ typedef SharedPtr<TMEDSubProfile> PMEDSubProfile;
+
+
+ //---------------------------------------------------------------
+ struct TMEDProfile: virtual TProfileImpl
+ {};
+ typedef SharedPtr<TMEDProfile> PMEDProfile;
+
- struct TMEDFamily: TFamilyImpl{
+ //---------------------------------------------------------------
+ struct TMEDGauss: virtual TGaussImpl
+ {
+ MED::PGaussInfo myGaussInfo;
+
+ //! To define a way to implement more detail comparision of the TGaussSubMesh instances
+ virtual
+ void
+ LessThan(const PGaussImpl& theGauss,
+ bool& theResult) const;
};
- typedef shared_ptr<TMEDFamily> PMEDFamily;
-
- struct TMEDGroup: TGroupImpl{
+ typedef SharedPtr<TMEDGauss> PMEDGauss;
+
+
+ //---------------------------------------------------------------
+ struct TMEDGaussSubMesh: virtual TGaussSubMeshImpl
+ {
+ TMEDGaussSubMesh():
+ myIsElemNum(MED::eFAUX)
+ {}
+
+ MED::EBooleen myIsElemNum;
+ MED::TElemNum myElemNum;
+
+ virtual
+ TGaussPointID
+ GetObjID(vtkIdType theID) const;
};
- typedef shared_ptr<TMEDGroup> PMEDGroup;
+ typedef SharedPtr<TMEDGaussSubMesh> PMEDGaussSubMesh;
+
+
+ //---------------------------------------------------------------
+ struct TMEDGaussMesh: virtual TGaussMeshImpl
+ {};
+ typedef SharedPtr<TMEDGaussMesh> PMEDGaussMesh;
+
+
+ //---------------------------------------------------------------
+ struct TMEDSubMesh: virtual TSubMeshImpl
+ {
+ TMEDSubMesh():
+ myIsElemNum(MED::eFAUX)
+ {}
+
+ MED::EBooleen myIsElemNum;
+ MED::TElemNum myElemNum;
+ MED::PElemInfo myElemInfo;
+
+ void
+ Init(const MED::PElemInfo& theElemInfo);
- struct TMEDField: TFieldImpl{
+ virtual
+ vtkIdType
+ GetElemObjID(vtkIdType theID) const;
+
+ virtual
+ std::string
+ GetElemName(vtkIdType theObjID) const;
};
- typedef shared_ptr<TMEDField> PMEDField;
+ typedef SharedPtr<TMEDSubMesh> PMEDSubMesh;
+
+
+ //---------------------------------------------------------------
+ typedef std::map<vtkIdType,vtkIdType> TFamilyID2CellsSize;
- struct TMEDValForTime: TValForTimeImpl{
+ struct TMEDMeshOnEntity: virtual TMeshOnEntityImpl
+ {
+ TFamilyID2CellsSize myFamilyID2CellsSize;
+ MED::TGeom2Size myGeom2Size;
};
- typedef shared_ptr<TMEDValForTime> PMEDValForTime;
+ typedef SharedPtr<TMEDMeshOnEntity> PMEDMeshOnEntity;
+
+
+ //---------------------------------------------------------------
+ struct TMEDFamily: virtual TFamilyImpl
+ {};
+ typedef SharedPtr<TMEDFamily> PMEDFamily;
+
+
+ //---------------------------------------------------------------
+ struct TMEDGroup: virtual TGroupImpl
+ {};
+ typedef SharedPtr<TMEDGroup> PMEDGroup;
+
+
+ //---------------------------------------------------------------
+ struct TMEDField: virtual TFieldImpl
+ {};
+ typedef SharedPtr<TMEDField> PMEDField;
+
+
+ //---------------------------------------------------------------
+ struct TMEDValForTime: virtual TValForTimeImpl
+ {};
+ typedef SharedPtr<TMEDValForTime> PMEDValForTime;
}
-class VISU_MedConvertor: public VISU_Convertor_impl{
+class VISU_MedConvertor: public VISU_Convertor_impl
+{
VISU_MedConvertor();
VISU_MedConvertor(const VISU_MedConvertor&);
+
+ bool myIsEntitiesDone;
+ bool myIsFieldsDone;
+ bool myIsGroupsDone;
+ bool myIsMinMaxDone;
+
public:
- VISU_MedConvertor(const std::string& theFileName) ;
- virtual VISU_Convertor* Build() ;
+ VISU_MedConvertor(const std::string& theFileName);
+
+ virtual
+ VISU_Convertor*
+ BuildEntities();
+
+ virtual
+ VISU_Convertor*
+ BuildFields();
+
+ virtual
+ VISU_Convertor*
+ BuildMinMax();
+
+ virtual
+ VISU_Convertor*
+ BuildGroups();
+
protected:
QFileInfo myFileInfo;
- virtual int LoadMeshOnEntity(VISU::PMeshOnEntityImpl theMeshOnEntity,
- const std::string& theFamilyName = "");
+ virtual
+ int
+ LoadMeshOnEntity(VISU::PMeshImpl theMesh,
+ VISU::PMeshOnEntityImpl theMeshOnEntity);
+
+ virtual
+ int
+ LoadFamilyOnEntity(VISU::PMeshImpl theMesh,
+ VISU::PMeshOnEntityImpl theMeshOnEntity,
+ VISU::PFamilyImpl theFamily);
- virtual int LoadMeshOnGroup(VISU::PMeshImpl theMesh,
- const VISU::TFamilyAndEntitySet& theFamilyAndEntitySet);
+ virtual
+ int
+ LoadMeshOnGroup(VISU::PMeshImpl theMesh,
+ const VISU::TFamilySet& theFamilySet);
+
+ virtual
+ int
+ LoadValForTimeOnMesh(VISU::PMeshImpl theMesh,
+ VISU::PMeshOnEntityImpl theMeshOnEntity,
+ VISU::PFieldImpl theField,
+ VISU::PValForTimeImpl theValForTime);
+
+ virtual
+ int
+ LoadValForTimeOnGaussPts(VISU::PMeshImpl theMesh,
+ VISU::PMeshOnEntityImpl theMeshOnEntity,
+ VISU::PFieldImpl theField,
+ VISU::PValForTimeImpl theValForTime);
- virtual int LoadFieldOnMesh(VISU::PMeshImpl theMesh,
- VISU::PMeshOnEntityImpl theMeshOnEntity,
- VISU::PFieldImpl theField,
- VISU::PValForTimeImpl theValForTime);
+ int
+ LoadPoints(const MED::PWrapper& theMed,
+ const VISU::PMEDMesh theMesh);
+
+ int
+ LoadPointsOnFamily(const MED::PWrapper& theMed,
+ const VISU::PMEDMesh theMesh,
+ const VISU::PMEDFamily theFamily);
+
+ int
+ LoadCellsOnEntity(const MED::PWrapper& theMed,
+ const VISU::PMEDMesh theMesh,
+ const VISU::PMEDMeshOnEntity theMeshOnEntity);
- int LoadPoints(const MED::PWrapper& theMed,
- VISU::PMEDMesh theMesh,
- const std::string& theFamilyName = "");
-
- int LoadCellsOnEntity(const MED::PWrapper& theMed,
- VISU::PMEDMesh theMesh,
- VISU::PMEDMeshOnEntity theMeshOnEntity,
- const std::string& theFamilyName = "");
+ int
+ LoadCellsOnFamily(const MED::PWrapper& theMed,
+ const VISU::PMEDMesh theMesh,
+ const VISU::PMEDMeshOnEntity theMeshOnEntity,
+ const VISU::PMEDFamily theFamily);
- int LoadField(const MED::PWrapper& theMed,
- VISU::PMEDMesh theMesh,
- VISU::PMEDMeshOnEntity theMeshOnEntity,
- VISU::PMEDField theField,
- VISU::PMEDValForTime theValForTime);
+ int
+ LoadValForTimeOnMesh(const MED::PWrapper& theMed,
+ VISU::PMEDMesh theMesh,
+ VISU::PMEDMeshOnEntity theMeshOnEntity,
+ VISU::PMEDField theField,
+ VISU::PMEDValForTime theValForTime);
+ int
+ LoadValForTimeOnGaussPts(const MED::PWrapper& theMed,
+ VISU::PMEDMesh theMesh,
+ VISU::PMEDMeshOnEntity theMeshOnEntity,
+ VISU::PMEDField theField,
+ VISU::PMEDValForTime theValForTime);
};
#endif