]> SALOME platform Git repositories - modules/paravis.git/blob - src/Plugins/MedReader/IO/vtkMedStructElement.h
Salome HOME
Merge from BR_PORTING_VTK6 01/03/2013
[modules/paravis.git] / src / Plugins / MedReader / IO / vtkMedStructElement.h
1 #ifndef __vtkMedStructElement_h_
2 #define __vtkMedStructElement_h_
3
4 #include "vtkObject.h"
5 #include "vtkMed.h"
6 #include "vtkMedSetGet.h"
7
8 class vtkMedVariableAttribute;
9 class vtkMedConstantAttribute;
10 class vtkMedFile;
11 class vtkMedMesh;
12 class vtkMedEntityArray;
13
14 class VTK_EXPORT vtkMedStructElement : public vtkObject
15 {
16 public :
17   static vtkMedStructElement* New();
18   vtkTypeMacro(vtkMedStructElement, vtkObject)
19   void PrintSelf(ostream& os, vtkIndent indent);
20
21   // Description:
22   // The iterator to identify this struct element model in the med file
23   vtkSetMacro(MedIterator, med_int);
24   vtkGetMacro(MedIterator, med_int);
25
26   // Description:
27   // This is the name of this structural element model
28   vtkSetStringMacro(Name);
29   vtkGetStringMacro(Name);
30
31   // Description:
32   // The Geometry type this structural elements lies on.
33   vtkSetMacro(GeometryType, med_geometry_type);
34   vtkGetMacro(GeometryType, med_geometry_type);
35
36   // Description:
37   // The dimension of this structural elements model
38   vtkSetMacro(ModelDimension, med_int);
39   vtkGetMacro(ModelDimension, med_int);
40
41   // Description:
42   // The name of the support mesh used by this structural element model
43   vtkSetStringMacro(SupportMeshName);
44   vtkGetStringMacro(SupportMeshName);
45
46   // Description:
47   // This is the support mesh instance, corresponding to the above name.
48   virtual void  SetSupportMesh(vtkMedMesh*);
49   vtkGetObjectMacro(SupportMesh, vtkMedMesh);
50
51   // Description:
52   // The type of entity contained in the support mesh
53   vtkSetMacro(SupportEntityType, med_entity_type);
54   vtkGetMacro(SupportEntityType, med_entity_type);
55
56   // Description:
57   // The number of nodes of the support mesh
58   vtkSetMacro(SupportNumberOfNode, med_int);
59   vtkGetMacro(SupportNumberOfNode, med_int);
60
61   // Description:
62   // The number of cells in the support mesh.
63   vtkSetMacro(SupportNumberOfCell, med_int);
64   vtkGetMacro(SupportNumberOfCell, med_int);
65
66   // Description:
67   // The geometry type of the cells in the support mesh
68   vtkSetMacro(SupportGeometryType, med_geometry_type);
69   vtkGetMacro(SupportGeometryType, med_geometry_type);
70
71   // Description:
72   // This boolean is set to true if the attributes are given on a profile
73   vtkSetMacro(AnyProfile, med_bool);
74   vtkGetMacro(AnyProfile, med_bool);
75
76   // Description:
77   // Get the Variable Attributes
78   vtkGetObjectVectorMacro(VariableAttribute, vtkMedVariableAttribute);
79   vtkSetObjectVectorMacro(VariableAttribute, vtkMedVariableAttribute);
80
81   // Description:
82   // Get the Constant Attributes
83   vtkGetObjectVectorMacro(ConstantAttribute, vtkMedConstantAttribute);
84   vtkSetObjectVectorMacro(ConstantAttribute, vtkMedConstantAttribute);
85
86   // Description:
87   // The file this structural element model is stored in.
88   virtual void SetParentFile(vtkMedFile*);
89   vtkGetObjectMacro(ParentFile, vtkMedFile);
90
91   // Description:
92   // This method will use the driver to load the data for this compute step
93   // for all variable attributes from disk.
94   virtual void  LoadVariableAttributes(vtkMedEntityArray*);
95
96   // Description:
97   // returns the size of the connectivity for one structural element.
98   // for MED_PARTICLE elements, it returns the number of nodes
99   // if SupportEntityType == MED_CELL, it returns the number of cells in the
100   // support mesh * the number of node for each cell.
101   // else it returns the number of nodes in the support mesh.
102   virtual int GetConnectivitySize();
103
104 protected:
105   vtkMedStructElement();
106   virtual ~vtkMedStructElement();
107
108   med_int MedIterator;
109   char *Name;
110   med_geometry_type GeometryType;
111   med_int ModelDimension;
112   char *SupportMeshName;
113   med_entity_type SupportEntityType;
114   med_int SupportNumberOfNode;
115   med_int SupportNumberOfCell;
116   med_geometry_type SupportGeometryType;
117   med_bool AnyProfile;
118
119   vtkMedFile* ParentFile;
120   vtkMedMesh* SupportMesh;
121
122   vtkObjectVector<vtkMedVariableAttribute>* VariableAttribute;
123   vtkObjectVector<vtkMedConstantAttribute>* ConstantAttribute;
124
125 private:
126   vtkMedStructElement(const vtkMedStructElement&); // Not implemented.
127   void operator=(const vtkMedStructElement&); // Not implemented.
128
129 };
130
131 #endif //__vtkMedStructElement_h_