1 // SALOME VTKViewer : build VTK viewer into Salome desktop
3 // Copyright (C) 2003 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.
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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
29 #ifndef VISU_Convertor_impl_HeaderFile
30 #define VISU_Convertor_impl_HeaderFile
32 #include <vtkSmartPointer.h>
34 #include <boost/tuple/tuple.hpp>
38 class vtkUnstructuredGrid;
39 class VTKViewer_AppendFilter;
40 class VISU_MergeFilter;
42 #include "VISU_Convertor.hxx"
43 #include "MED_SliceArray.hxx"
45 #ifndef VISU_ENABLE_QUADRATIC
46 #define VISU_ENABLE_QUADRATIC
47 #define VISU_USE_VTK_QUADRATIC
52 //! Defines VISU enumeration of geometrical types
53 enum EGeometry {ePOINT1=1, eSEG2=102, eSEG3=103, eTRIA3=203,
54 eQUAD4=204, eTRIA6=206,eQUAD8=208, eTETRA4=304,
55 ePYRA5=305, ePENTA6=306, eHEXA8=308, eTETRA10=310,
56 ePYRA13=313, ePENTA15=315, eHEXA20=320,
57 ePOLYGONE=400, ePOLYEDRE=500, eNONE=-1};
59 //! Get number of nodes for defined geometrical type
61 VISUGeom2NbNodes(EGeometry theGeom);
63 //! Maps VISU geometrical type to VTK one
65 VISUGeom2VTK(EGeometry theGeom);
67 //---------------------------------------------------------------
71 typedef vtkUnstructuredGrid TDataSet;
73 typedef vtkSmartPointer<TDataSet> TVTKSource;
74 typedef vtkSmartPointer<vtkPoints> TVTKPoints;
75 typedef vtkSmartPointer<VISU_MergeFilter> TVTKMergeFilter;
77 typedef vtkSmartPointer<VTKViewer_AppendFilter> TVTKAppendFilter;
81 //---------------------------------------------------------------
82 //! Define an utility base class which is repsonsible for preventing repetion
83 struct TIsVTKDone: virtual TBaseStructure
86 bool myIsDone; //!< Say, is the corresponding MED entity already loaded into intermediate data structure
87 bool myIsVTKDone; //!< Say, is the corresponding intermediate data structure already mapped into VTK representation
91 //---------------------------------------------------------------
92 //! Define an utility base class which allow to keep calculated number of cells and their size
93 struct TSizeCounter: virtual TIsVTKDone
96 vtkIdType myNbCells; //!< Number of cells contained into corresponding sublclass
97 vtkIdType myCellsSize; //!< Size of cells contained into corresponding sublclass
101 //---------------------------------------------------------------
102 //! Define a container for VTK representation
103 class TSource: public virtual TSizeCounter
106 mutable TVTKSource mySource;
110 //! This method allow to create corresponding VTK data set by demand (not at once)
114 //! Reimplement the TIDMapper::GetVTKOutput
121 //---------------------------------------------------------------
122 //! Define a container for VTK representation
124 This container allow to combine other VTK representation into single one.
126 class TAppendFilter: public virtual TIsVTKDone,
127 public virtual TIDMapper
130 mutable TVTKAppendFilter myFilter;
134 //! This method allow to create corresponding VTK filter by demand (not at once)
135 const TVTKAppendFilter&
138 //! Reimplement the TIDMapper::GetVTKOutput
145 //---------------------------------------------------------------
146 //! Define a container for VTK representation
148 This container allow to assign data to mesh and represent them into single VTK representation
150 class TMergeFilter: public virtual TIsVTKDone,
151 public virtual TIDMapper
154 mutable TVTKMergeFilter myFilter;
158 //! This method allow to create corresponding VTK filter by demand (not at once)
159 const TVTKMergeFilter&
162 //! Reimplement the TIDMapper::GetVTKOutput
169 //---------------------------------------------------------------
170 typedef TVector<TCoord> TCoordArray;
171 typedef TSlice<TCoordArray> TCoordSlice;
172 typedef TCSlice<TCoordArray> TCCoordSlice;
174 //! This class is responsible for representation of mesh nodes
175 class TPointCoords: public virtual TBaseStructure
178 vtkIdType myDim; //!< Dimension of the nodal coordinates
179 vtkIdType myNbPoints; //!< Number of nodes in corresponding mesh
181 //! An container for coordinates of the nodes
183 Usage of slices allow to minimize amount of memory to store the nodal coordinates and
184 provide unifirm way of conversation with this coordinates (independant from mesh dimension)
187 TVTKPoints myPoints; //!< VTK representation for the mesh nodes
192 //! To initilize the class
194 Init(vtkIdType theNbPoints,
197 //! Get slice of coordinates for defined node (const version)
199 GetCoordSlice(vtkIdType theNodeId) const;
201 //! Get slice of coordinates for defined node
203 GetCoordSlice(vtkIdType theNodeId);
206 GetNbPoints() const { return myNbPoints; }
209 GetDim() const { return myDim; }
212 size() const { return GetNbPoints(); }
215 GetPoints() const { return myPoints;}
217 typedef SharedPtr<TPointCoords> PPointCoords;
220 //---------------------------------------------------------------
221 typedef TVector<vtkIdType> TVectorID;
222 typedef std::map<vtkIdType,vtkIdType> TObj2VTKID;
224 //! This class is responsible for representation of mesh nodes
226 In additition to its base functionlity it support mapping of VTK to object numeration and
227 keeps names for each of nodes.
229 class TNamedPointCoords: public virtual TPointCoords
232 typedef TVector<std::string> TPointsDim;
233 TPointsDim myPointsDim; //!< Keeps name of each dimension
234 TVectorID myVectorID; //!< Keeps object¶ numeration
235 TObj2VTKID myObj2VTKID; //!< Keeps mapping from object number to VTK one
239 //! To initilize the class (numeration of the nodes can be missed)
241 Init(vtkIdType theNbPoints,
243 const TVectorID& theVectorID = TVectorID());
245 //! Get name for defined dimension
247 GetName(vtkIdType theDim);
249 //! Get name for defined dimension (const version)
251 GetName(vtkIdType theDim) const;
253 //! Get object number for node by its VTK one
256 GetObjID(vtkIdType theID) const;
258 //! Get VTK number for node by its object one
261 GetVTKID(vtkIdType theID) const;
263 //! Get name of node by its object number
266 GetNodeName(vtkIdType theObjID) const;
268 typedef SharedPtr<TNamedPointCoords> PNamedPointCoords;
271 //---------------------------------------------------------------
272 //! Specialize TMesh to provide VTK mapping for nodes
273 struct TMeshImpl: virtual TMesh,
276 PNamedPointCoords myNamedPointCoords; //!< Keeps intermediate representation of the nodes
278 TVTKPoints myPoints; //!< Keeps VTK representation of the nodes
279 vtkIdType myNbPoints; //!< Keeps number of the nodes
283 typedef SharedPtr<TMeshImpl> PMeshImpl;
286 //---------------------------------------------------------------
287 typedef TVector<vtkIdType> TSubMeshID;
288 typedef enum {eRemoveAll, eAddAll, eAddPart, eNone} ESubMeshStatus;
290 //! Specialize TSubProfile to provide VTK mapping
291 struct TSubProfileImpl: virtual TSubProfile,
296 EGeometry myGeom; //!< Defines to what geometrical type the MED PROFILE belong to
297 std::string myName; //!< Keeps its name
299 //! Get object number of mesh cell by its VTK one
302 GetElemObjID(int theVtkI) const;
304 //! Keeps status of the structure
306 In some cases MED file does not use MED PROFILES, but at VISU creates corresponding data strucutre
307 in order to construct mesh for MED TIEMSTAMPS in uniform way.
309 ESubMeshStatus myStatus;
310 TSubMeshID mySubMeshID; //!< Keeps numbers of mesh cell which contain the MED PROFILE
312 typedef SharedPtr<TSubProfileImpl> PSubProfileImpl;
315 //---------------------------------------------------------------
316 struct TMeshOnEntityImpl;
318 typedef std::map<vtkIdType,vtkIdType> TID2ID;
319 typedef TVector<PSubProfileImpl> TSubProfileArr;
320 typedef std::map<EGeometry,PSubProfileImpl> TGeom2SubProfile;
322 //! Specialize TProfile to provide VTK mapping for MED TIMESTAMP mesh
323 struct TProfileImpl: virtual TProfile,
324 virtual TAppendFilter
327 bool myIsAll; //!< Say, whether the MED TIMESTAMP defined on all MED ENTITY or not
329 //! Reimplement the TIDMapper::GetNodeObjID
332 GetNodeObjID(vtkIdType theID) const;
334 //! Reimplement the TIDMapper::GetNodeVTKID
337 GetNodeVTKID(vtkIdType theID) const;
339 //! Reimplement the TIDMapper::GetNodeCoord
342 GetNodeCoord(vtkIdType theObjID);
344 //! Reimplement the TIDMapper::GetElemObjID
347 GetElemObjID(vtkIdType theID) const;
349 //! Reimplement the TIDMapper::GetElemVTKID
352 GetElemVTKID(vtkIdType theID) const;
354 //! Reimplement the TIDMapper::GetElemCell
357 GetElemCell(vtkIdType theObjID);
359 //! Reimplement the TIDMapper::GetVTKOutput
364 //! Reimplement the TNamedIDMapper::GetNodeName
367 GetNodeName(vtkIdType theObjID) const;
369 //! Reimplement the TNamedIDMapper::GetElemName
372 GetElemName(vtkIdType theObjID) const;
374 TID2ID myElemObj2VTKID; //!< Keeps object to VTK numeration mapping
375 TSubProfileArr mySubProfileArr; //!< Keeps sequence of TSubProfiles as they were added into TAppendFilter
376 PNamedPointCoords myNamedPointCoords; //!< Keeps reference on the same TNamedPointCoords as TMesh
377 TMeshOnEntityImpl* myMeshOnEntity; //<! Keeps backward reference to corresponding MED ENTITY mesh
379 TSource mySource; //!< Keeps VTK representation of the MED TIMESTAMP mesh
380 TGeom2SubProfile myGeom2SubProfile; //!< Keeps TSubProfiles according to their geometrical type
382 typedef SharedPtr<TProfileImpl> PProfileImpl;
385 //---------------------------------------------------------------
386 //! Specialize TIDMapper to provide VTK mapping for MED TIMESTAMP mesh
387 struct TIDMapperFilter: virtual TMergeFilter
389 TAppendFilter myIDMapper; //!< Responsible for numbering
390 TSource mySource; //!< Keeps assigned data
392 //! Reimplement the TIDMapper::GetNodeObjID
395 GetNodeObjID(vtkIdType theID) const;
397 //! Reimplement the TIDMapper::GetNodeVTKID
400 GetNodeVTKID(vtkIdType theID) const;
402 //! Reimplement the TIDMapper::GetNodeCoord
405 GetNodeCoord(vtkIdType theObjID);
407 //! Reimplement the TIDMapper::GetElemObjID
410 GetElemObjID(vtkIdType theID) const;
412 //! Reimplement the TIDMapper::GetElemVTKID
415 GetElemVTKID(vtkIdType theID) const;
417 //! Reimplement the TIDMapper::GetElemCell
420 GetElemCell(vtkIdType theObjID);
422 //! Reimplement the TIDMapper::GetVTKOutput
427 typedef SharedPtr<TIDMapperFilter> PIDMapperFilter;
430 //---------------------------------------------------------------
432 typedef SharedPtr<TGaussImpl> PGaussImpl;
434 //! Specialize TGauss to provide more detail information of the MED GAUSS entity for VTK mapping
435 struct TGaussImpl: virtual TGauss
437 EGeometry myGeom; //!< Define, to which geometrical type the MED GAUSS entity belongs
438 std::string myName; //!< Keeps name of the MED GAUSS entity
439 vtkIdType myNbPoints; //<! Keeps number of points for the MED GAUSS entity
441 //! To define a way to implement more detail comparision of the TGaussSubMesh instances
444 LessThan(const PGaussImpl& theGauss,
445 bool& theResult) const;
449 //---------------------------------------------------------------
450 //! Specialize TGaussSubMesh to provide VTK mapping for the entity
451 struct TGaussSubMeshImpl: virtual TGaussSubMesh,
456 //! To implement the TGaussPtsIDMapper::GetObjID
459 GetObjID(vtkIdType theID) const;
461 PGaussImpl myGauss; //<! Keep reference to corresponding TGauss structure
463 //! Keeps status of the structure
465 In some cases MED file does not use MED GAUSS, but at VISU creates corresponding data strucutre
466 in order to construct mesh for MED TIEMSTAMPS in uniform way.
468 ESubMeshStatus myStatus;
470 TPointCoords myPointCoords; //!< Keeps coordinates of Gauss Points
472 typedef SharedPtr<TGaussSubMeshImpl> PGaussSubMeshImpl;
475 //---------------------------------------------------------------
476 typedef TVector<PGaussSubMeshImpl> TGaussSubMeshArr;
477 typedef std::map<EGeometry,PGaussSubMeshImpl> TGeom2GaussSubMesh;
479 //! Specialize TGaussMesh to provide VTK mapping for the entity
480 struct TGaussMeshImpl: virtual TGaussMesh,
481 virtual TAppendFilter
485 //! Reimplement the TGaussPtsIDMapper::GetObjID
488 GetObjID(vtkIdType theID) const;
490 //! Reimplement the TIDMapper::GetVTKOutput
495 //! Reimplement the TGaussPtsIDMapper::GetParent
500 TSource mySource; //!< Keeps VTK representation of the Gauss Points
501 TNamedIDMapper* myParent; //!< Refer to parent mesh
502 TGaussSubMeshArr myGaussSubMeshArr; //!< Keeps sequence of TGaussSubMesh as they were added into TAppendFilter
503 TGeom2GaussSubMesh myGeom2GaussSubMesh; //!< Keeps TGaussSubMesh according to their geometrical type
505 typedef SharedPtr<TGaussMeshImpl> PGaussMeshImpl;
508 //---------------------------------------------------------------
509 //! Specialize TGaussPtsIDMapper to provide VTK mapping for MED TIMESTAMP mesh
510 struct TGaussPtsIDFilter: virtual TIDMapperFilter,
511 virtual TGaussPtsIDMapper
513 PGaussPtsIDMapper myGaussPtsIDMapper;
515 //! Reimplement the TGaussPtsIDMapper::GetObjID
518 GetObjID(vtkIdType theID) const;
520 //! Reimplement the TGaussPtsIDMapper::GetParent
525 typedef SharedPtr<TGaussPtsIDFilter> PGaussPtsIDFilter;
528 //---------------------------------------------------------------
529 typedef TVector<vtkIdType> TConnect;
530 typedef TVector<TConnect> TCell2Connect;
532 //! The class is responsible for mapping of cells of defined geometrical type
533 struct TSubMeshImpl: virtual TSource
536 //! To implement the TIDMapper::GetElemObjID
539 GetElemObjID(vtkIdType theID) const;
541 //! To implement the TNamedIDMapper::GetElemName
544 GetElemName(vtkIdType theObjID) const;
547 TCell2Connect myCell2Connect; //!< Contains connectivity for the cells
549 typedef SharedPtr<TSubMeshImpl> PSubMeshImpl;
552 //---------------------------------------------------------------
553 typedef std::map<EGeometry,PSubMeshImpl> TGeom2SubMesh;
554 typedef TVector<PSubMeshImpl> TSubMeshArr;
556 //! Specialize TMeshOnEntity to provide VTK mapping for the entity
557 struct TMeshOnEntityImpl: virtual TMeshOnEntity,
558 virtual TAppendFilter,
561 //! Reimplement the TIDMapper::GetNodeVTKID
564 GetNodeVTKID(vtkIdType theID) const;
566 //! Reimplement the TIDMapper::GetNodeObjID
569 GetNodeObjID(vtkIdType theID) const;
571 //! Reimplement the TIDMapper::GetElemVTKID
574 GetElemVTKID(vtkIdType theID) const;
576 //! Reimplement the TIDMapper::GetElemObjID
579 GetElemObjID(vtkIdType theID) const;
581 //! Reimplement the TNamedIDMapper::GetNodeName
584 GetNodeName(vtkIdType theObjID) const;
586 //! Reimplement the TNamedIDMapper::GetElemName
589 GetElemName(vtkIdType theObjID) const;
591 TID2ID myElemObj2VTKID; //!< To support object to VTK number mapping
592 TSubMeshArr mySubMeshArr; //!< Keeps sequence of TSubMeshImpl as they were added into TAppendFilter
593 PNamedPointCoords myNamedPointCoords; //!< Share the same instance with TMesh to implement nodal mapping
595 TGeom2SubMesh myGeom2SubMesh; //!< Keeps TSubMeshImpl according to their geometrical type
597 typedef SharedPtr<TMeshOnEntityImpl> PMeshOnEntityImpl;
600 //---------------------------------------------------------------
601 typedef std::map<EGeometry,TSubMeshID> TGeom2SubMeshID;
603 //! Specialize TFamily to provide VTK mapping for the entity
604 struct TFamilyImpl: virtual TFamily,
607 //! Reimplement the TIDMapper::GetNodeObjID
609 GetNodeObjID(vtkIdType theID) const ;
611 //! Reimplement the TIDMapper::GetNodeVTKID
614 GetNodeVTKID(vtkIdType theID) const ;
616 //! Reimplement the TIDMapper::GetElemVTKID
619 GetElemVTKID(vtkIdType theID) const;
621 //! Reimplement the TIDMapper::GetElemObjID
624 GetElemObjID(vtkIdType theID) const;
626 //! Reimplement the TIDMapper::GetVTKOutput
631 PNamedPointCoords myNamedPointCoords; //!< Share the same instance with TMesh to implement nodal mapping
632 TID2ID myElemObj2VTKID; //!< To support object to VTK number mapping
633 TSubMeshID myMeshID; //!< Keeps numbers of mesh elements that belongs to the MED FAMILY
635 TGeom2SubMeshID myGeom2SubMeshID; //!< Keeps TSubMeshID according to their geometrical type
637 typedef SharedPtr<TFamilyImpl> PFamilyImpl;
640 //---------------------------------------------------------------
641 typedef std::pair<vtkIdType,vtkIdType> TNbASizeCells;
642 typedef TVector<PFamilyImpl> TFamilyArr;
644 //! Specialize TGroup to provide VTK mapping for the entity
645 struct TGroupImpl: virtual TGroup,
646 virtual TAppendFilter
648 //! Calculate pair of values - number of cells and its size
650 GetNbASizeCells() const;
652 //! Reimplement the TIDMapper::GetElemVTKID
655 GetElemVTKID(vtkIdType theID) const;
657 //! Reimplement the TIDMapper::GetElemObjID
660 GetElemObjID(vtkIdType theID) const;
662 //! Reimplement the TIDMapper::GetNodeObjID
665 GetNodeObjID(vtkIdType theID) const;
667 //! Reimplement the TIDMapper::GetNodeVTKID
670 GetNodeVTKID(vtkIdType theID) const;
672 TID2ID myElemObj2VTKID; //!< To support object to VTK number mapping
673 TFamilyArr myFamilyArr; //!< Keeps sequence of TFamily as they were added into TAppendFilter
674 PNamedPointCoords myNamedPointCoords; //!< Share the same instance with TMesh to implement nodal mapping
676 typedef SharedPtr<TGroupImpl> PGroupImpl;
679 //---------------------------------------------------------------
680 typedef TVector<TMinMax> TMinMaxArr;
682 //! Specialize TField to provide VTK mapping for the entity
683 struct TFieldImpl: virtual TField
685 vtkIdType myDataSize; //!< Keeps size of the assigned data
687 TMinMaxArr myMinMaxArr; //!< Keeps min/max values for each component of the MED FIELD
689 //! Implement the TField::GetMinMax
692 GetMinMax(vtkIdType theCompID);
694 //! To initialize the data structure
696 InitArrays(vtkIdType theNbComp);
700 typedef SharedPtr<TFieldImpl> PFieldImpl;
703 //---------------------------------------------------------------
704 typedef TVector<float> TValue;
705 typedef TSlice<TValue> TValueSlice;
706 typedef TCSlice<TValue> TCValueSlice;
708 typedef TVector<TCValueSlice> TCValueSliceArr;
709 typedef TVector<TValueSlice> TValueSliceArr;
711 //! Define a container to get access to data assigned to mesh
714 TValue myValue; //!< Keeps all values as one dimensional sequence
716 vtkIdType myNbElem; //!< Defines number of mesh elements where the data assigned to
717 vtkIdType myNbComp; //!< Keeps number of components of corresponding MED FIELD
718 vtkIdType myNbGauss; //!< Defines number of Gauss Points
719 vtkIdType myStep; //! Internal variable
721 //! To intitilize the data strucutre
723 Init(vtkIdType theNbElem,
724 vtkIdType theNbGauss,
725 vtkIdType theNbComp);
727 //! To get assigned values first by Gauss Points and then by components (constant version)
729 GetGaussValueSliceArr(vtkIdType theElemId) const;
731 //! To get assigned values first by Gauss Points and then by components
733 GetGaussValueSliceArr(vtkIdType theElemId);
735 //! To get assigned values first by components and then by Gauss Points (constant version)
737 GetCompValueSliceArr(vtkIdType theElemId) const;
739 //! To get assigned values first by components and then by Gauss Points
741 GetCompValueSliceArr(vtkIdType theElemId);
745 //---------------------------------------------------------------
746 typedef std::map<EGeometry,TMeshValue> TGeom2Value;
747 typedef std::map<EGeometry,vtkIdType> TGeom2NbGauss;
749 //! Specialize TValForTime to provide VTK mapping for the entity
750 struct TValForTimeImpl: virtual TValForTime
752 PGaussPtsIDFilter myGaussPtsIDFilter; //!< Keep VTK representation for mesh and data on Gauss Points
753 PIDMapperFilter myIDMapperFilter; //!< Keep VTK representation for ordinary mesh and data
754 TGeom2Value myGeom2Value; //!< Keep value that is assigned to the mesh
755 TGeom2NbGauss myGeom2NbGauss; //!< Keep number of Gauss Points
759 //! Get mesh data for defined geometrical type (constant version)
761 GetMeshValue(EGeometry theGeom) const;
763 //! Get mesh data for defined geometrical type
765 GetMeshValue(EGeometry theGeom);
767 //! Get number of Gauss Points for defined geometrical type
770 GetNbGauss(EGeometry theGeom) const;
772 typedef SharedPtr<TValForTimeImpl> PValForTimeImpl;
776 //! This class perfroms mapping of intermediate data strucutres into corresponding VTK representation
778 It implements VISU_Convertor public interface and declare new pure virtual functions
779 to fill its intermediate data structure from a MED source
781 class VISU_Convertor_impl: public VISU_Convertor
784 VISU_Convertor_impl();
787 ~VISU_Convertor_impl();
789 //! Just to define default behaviour
794 //! Just to define default behaviour
799 //! Just to define default behaviour
804 //! Just to define default behaviour
809 //! Just to define default behaviour
814 //! Implemention of the VISU_Convertor::GetSize
819 //! Implemention of the VISU_Convertor::GetMeshOnEntity
822 GetMeshOnEntity(const std::string& theMeshName,
823 const VISU::TEntity& theEntity);
825 //! Implemention of the VISU_Convertor::GetMeshOnEntitySize
828 GetMeshOnEntitySize(const std::string& theMeshName,
829 const VISU::TEntity& theEntity);
831 //! Implemention of the VISU_Convertor::GetFamilyOnEntity
834 GetFamilyOnEntity(const std::string& theMeshName,
835 const VISU::TEntity& theEntity,
836 const std::string& theFamilyName);
838 //! Implemention of the VISU_Convertor::GetFamilyOnEntitySize
841 GetFamilyOnEntitySize(const std::string& theMeshName,
842 const VISU::TEntity& theEntity,
843 const std::string& theFamilyName);
845 //! Implemention of the VISU_Convertor::GetMeshOnGroup
848 GetMeshOnGroup(const std::string& theMeshName,
849 const std::string& theGroupName);
851 //! Implemention of the VISU_Convertor::GetMeshOnGroupSize
854 GetMeshOnGroupSize(const std::string& theMeshName,
855 const std::string& theGroupName);
857 //! Implemention of the VISU_Convertor::GetTimeStampOnMesh
860 GetTimeStampOnMesh(const std::string& theMeshName,
861 const VISU::TEntity& theEntity,
862 const std::string& theFieldName,
865 //! Implemention of the VISU_Convertor::GetTimeStampSize
868 GetTimeStampSize(const std::string& theMeshName,
869 const VISU::TEntity& theEntity,
870 const std::string& theFieldName,
873 //! Implemention of the VISU_Convertor::GetTimeStampOnGaussPts
875 VISU::PGaussPtsIDMapper
876 GetTimeStampOnGaussPts(const std::string& theMeshName,
877 const VISU::TEntity& theEntity,
878 const std::string& theFieldName,
881 //! Implemention of the VISU_Convertor::GetFieldOnMeshSize
884 GetFieldOnMeshSize(const std::string& theMeshName,
885 const VISU::TEntity& theEntity,
886 const std::string& theFieldName);
888 //! Implemention of the VISU_Convertor::GetField
891 GetField(const std::string& theMeshName,
892 VISU::TEntity theEntity,
893 const std::string& theFieldName);
895 //! Implemention of the VISU_Convertor::GetTimeStamp
897 const VISU::PValForTime
898 GetTimeStamp(const std::string& theMeshName,
899 const VISU::TEntity& theEntity,
900 const std::string& theFieldName,
904 //! An utility method to find TMesh by its name
906 FindMesh(const std::string& theMeshName);
908 //! An utility method to find TMeshOnEntity by name of its parent mesh and entity
909 typedef boost::tuple<VISU::PMeshImpl,VISU::PMeshOnEntityImpl> TFindMeshOnEntity;
911 FindMeshOnEntity(const std::string& theMeshName,
912 const VISU::TEntity& theEntity);
914 //! An utility method to find TFamily by name of its parent mesh, corresponding entity and its name
915 typedef boost::tuple<VISU::PMeshImpl,VISU::PMeshOnEntityImpl,VISU::PFamilyImpl> TFindFamilyOnEntity;
917 FindFamilyOnEntity(const std::string& theMeshName,
918 const VISU::TEntity& theEntity,
919 const std::string& theFamilyName);
921 //! An utility method to find Group by name of its parent mesh and its name
922 typedef boost::tuple<VISU::PMeshImpl,VISU::PGroupImpl> TFindMeshOnGroup;
924 FindMeshOnGroup(const std::string& theMeshName,
925 const std::string& theGroupName);
927 //! An utility method to find TField by name of its parent mesh, corresponding entity and its name
928 typedef boost::tuple<VISU::PMeshImpl,
929 VISU::PMeshOnEntityImpl,
930 VISU::PMeshOnEntityImpl,
931 VISU::PFieldImpl> TFindField;
933 FindField(const std::string& theMeshName,
934 const VISU::TEntity& theEntity,
935 const std::string& theFieldName);
937 //! An utility method to find TTimeStamp by name of its parent mesh, corresponding entity, field name and its number
938 typedef boost::tuple<VISU::PMeshImpl,
939 VISU::PMeshOnEntityImpl,
940 VISU::PMeshOnEntityImpl,
942 VISU::PValForTimeImpl> TFindTimeStamp;
944 FindTimeStamp(const std::string& theMeshName,
945 const VISU::TEntity& theEntity,
946 const std::string& theFieldName,
950 GetTimeStampOnProfile(const VISU::PMeshImpl& theMesh,
951 const VISU::PMeshOnEntityImpl& theMeshOnEntity,
952 const VISU::PFieldImpl& theField,
953 const VISU::PValForTimeImpl& theValForTime,
954 const VISU::PIDMapperFilter& theIDMapperFilter,
955 const VISU::PProfileImpl& theProfile,
956 const VISU::TEntity& theEntity);
959 //! To fill intermeiate representation of TMeshOnEntity from a MED source
962 LoadMeshOnEntity(VISU::PMeshImpl theMesh,
963 VISU::PMeshOnEntityImpl theMeshOnEntity) = 0;
965 //! To fill intermeiate representation of TFamily from a MED source
968 LoadFamilyOnEntity(VISU::PMeshImpl theMesh,
969 VISU::PMeshOnEntityImpl theMeshOnEntity,
970 VISU::PFamilyImpl theFamily) = 0;
972 //! To fill intermeiate representation of TGroup from a MED source
975 LoadMeshOnGroup(VISU::PMeshImpl theMesh,
976 const VISU::TFamilySet& theFamilySet) = 0;
978 //! To fill intermeiate representation of TValForTime for ordinary mesh from a MED source
981 LoadValForTimeOnMesh(VISU::PMeshImpl theMesh,
982 VISU::PMeshOnEntityImpl theMeshOnEntity,
983 VISU::PFieldImpl theField,
984 VISU::PValForTimeImpl theValForTime) = 0;
986 //! To fill intermeiate representation of TValForTime for mesh on Gauss Points from a MED source
989 LoadValForTimeOnGaussPts(VISU::PMeshImpl theMesh,
990 VISU::PMeshOnEntityImpl theMeshOnEntity,
991 VISU::PFieldImpl theField,
992 VISU::PValForTimeImpl theValForTime) = 0;