1 // Copyright (C) 2010-2012 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef __vtkMedStructElement_h_
21 #define __vtkMedStructElement_h_
23 #include "vtkObject.h"
25 #include "vtkMedSetGet.h"
27 class vtkMedVariableAttribute;
28 class vtkMedConstantAttribute;
31 class vtkMedEntityArray;
33 class VTK_EXPORT vtkMedStructElement : public vtkObject
36 static vtkMedStructElement* New();
37 vtkTypeRevisionMacro(vtkMedStructElement, vtkObject)
38 void PrintSelf(ostream& os, vtkIndent indent);
41 // The iterator to identify this struct element model in the med file
42 vtkSetMacro(MedIterator, med_int);
43 vtkGetMacro(MedIterator, med_int);
46 // This is the name of this structural element model
47 vtkSetStringMacro(Name);
48 vtkGetStringMacro(Name);
51 // The Geometry type this structural elements lies on.
52 vtkSetMacro(GeometryType, med_geometry_type);
53 vtkGetMacro(GeometryType, med_geometry_type);
56 // The dimension of this structural elements model
57 vtkSetMacro(ModelDimension, med_int);
58 vtkGetMacro(ModelDimension, med_int);
61 // The name of the support mesh used by this structural element model
62 vtkSetStringMacro(SupportMeshName);
63 vtkGetStringMacro(SupportMeshName);
66 // This is the support mesh instance, corresponding to the above name.
67 virtual void SetSupportMesh(vtkMedMesh*);
68 vtkGetObjectMacro(SupportMesh, vtkMedMesh);
71 // The type of entity contained in the support mesh
72 vtkSetMacro(SupportEntityType, med_entity_type);
73 vtkGetMacro(SupportEntityType, med_entity_type);
76 // The number of nodes of the support mesh
77 vtkSetMacro(SupportNumberOfNode, med_int);
78 vtkGetMacro(SupportNumberOfNode, med_int);
81 // The number of cells in the support mesh.
82 vtkSetMacro(SupportNumberOfCell, med_int);
83 vtkGetMacro(SupportNumberOfCell, med_int);
86 // The geometry type of the cells in the support mesh
87 vtkSetMacro(SupportGeometryType, med_geometry_type);
88 vtkGetMacro(SupportGeometryType, med_geometry_type);
91 // This boolean is set to true if the attributes are given on a profile
92 vtkSetMacro(AnyProfile, med_bool);
93 vtkGetMacro(AnyProfile, med_bool);
96 // Get the Variable Attributes
97 vtkGetObjectVectorMacro(VariableAttribute, vtkMedVariableAttribute);
98 vtkSetObjectVectorMacro(VariableAttribute, vtkMedVariableAttribute);
101 // Get the Constant Attributes
102 vtkGetObjectVectorMacro(ConstantAttribute, vtkMedConstantAttribute);
103 vtkSetObjectVectorMacro(ConstantAttribute, vtkMedConstantAttribute);
106 // The file this structural element model is stored in.
107 virtual void SetParentFile(vtkMedFile*);
108 vtkGetObjectMacro(ParentFile, vtkMedFile);
111 // This method will use the driver to load the data for this compute step
112 // for all variable attributes from disk.
113 virtual void LoadVariableAttributes(vtkMedEntityArray*);
116 // returns the size of the connectivity for one structural element.
117 // for MED_PARTICLE elements, it returns the number of nodes
118 // if SupportEntityType == MED_CELL, it returns the number of cells in the
119 // support mesh * the number of node for each cell.
120 // else it returns the number of nodes in the support mesh.
121 virtual int GetConnectivitySize();
124 vtkMedStructElement();
125 virtual ~vtkMedStructElement();
129 med_geometry_type GeometryType;
130 med_int ModelDimension;
131 char *SupportMeshName;
132 med_entity_type SupportEntityType;
133 med_int SupportNumberOfNode;
134 med_int SupportNumberOfCell;
135 med_geometry_type SupportGeometryType;
138 vtkMedFile* ParentFile;
139 vtkMedMesh* SupportMesh;
141 vtkObjectVector<vtkMedVariableAttribute>* VariableAttribute;
142 vtkObjectVector<vtkMedConstantAttribute>* ConstantAttribute;
145 vtkMedStructElement(const vtkMedStructElement&); // Not implemented.
146 void operator=(const vtkMedStructElement&); // Not implemented.
150 #endif //__vtkMedStructElement_h_