1 #ifndef __vtkMedStructElement_h_
2 #define __vtkMedStructElement_h_
6 #include "vtkMedSetGet.h"
8 class vtkMedVariableAttribute;
9 class vtkMedConstantAttribute;
12 class vtkMedEntityArray;
14 class VTK_EXPORT vtkMedStructElement : public vtkObject
17 static vtkMedStructElement* New();
18 vtkTypeMacro(vtkMedStructElement, vtkObject)
19 void PrintSelf(ostream& os, vtkIndent indent);
22 // The iterator to identify this struct element model in the med file
23 vtkSetMacro(MedIterator, med_int);
24 vtkGetMacro(MedIterator, med_int);
27 // This is the name of this structural element model
28 vtkSetStringMacro(Name);
29 vtkGetStringMacro(Name);
32 // The Geometry type this structural elements lies on.
33 vtkSetMacro(GeometryType, med_geometry_type);
34 vtkGetMacro(GeometryType, med_geometry_type);
37 // The dimension of this structural elements model
38 vtkSetMacro(ModelDimension, med_int);
39 vtkGetMacro(ModelDimension, med_int);
42 // The name of the support mesh used by this structural element model
43 vtkSetStringMacro(SupportMeshName);
44 vtkGetStringMacro(SupportMeshName);
47 // This is the support mesh instance, corresponding to the above name.
48 virtual void SetSupportMesh(vtkMedMesh*);
49 vtkGetObjectMacro(SupportMesh, vtkMedMesh);
52 // The type of entity contained in the support mesh
53 vtkSetMacro(SupportEntityType, med_entity_type);
54 vtkGetMacro(SupportEntityType, med_entity_type);
57 // The number of nodes of the support mesh
58 vtkSetMacro(SupportNumberOfNode, med_int);
59 vtkGetMacro(SupportNumberOfNode, med_int);
62 // The number of cells in the support mesh.
63 vtkSetMacro(SupportNumberOfCell, med_int);
64 vtkGetMacro(SupportNumberOfCell, med_int);
67 // The geometry type of the cells in the support mesh
68 vtkSetMacro(SupportGeometryType, med_geometry_type);
69 vtkGetMacro(SupportGeometryType, med_geometry_type);
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);
77 // Get the Variable Attributes
78 vtkGetObjectVectorMacro(VariableAttribute, vtkMedVariableAttribute);
79 vtkSetObjectVectorMacro(VariableAttribute, vtkMedVariableAttribute);
82 // Get the Constant Attributes
83 vtkGetObjectVectorMacro(ConstantAttribute, vtkMedConstantAttribute);
84 vtkSetObjectVectorMacro(ConstantAttribute, vtkMedConstantAttribute);
87 // The file this structural element model is stored in.
88 virtual void SetParentFile(vtkMedFile*);
89 vtkGetObjectMacro(ParentFile, vtkMedFile);
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*);
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();
105 vtkMedStructElement();
106 virtual ~vtkMedStructElement();
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;
119 vtkMedFile* ParentFile;
120 vtkMedMesh* SupportMesh;
122 vtkObjectVector<vtkMedVariableAttribute>* VariableAttribute;
123 vtkObjectVector<vtkMedConstantAttribute>* ConstantAttribute;
126 vtkMedStructElement(const vtkMedStructElement&); // Not implemented.
127 void operator=(const vtkMedStructElement&); // Not implemented.
131 #endif //__vtkMedStructElement_h_