Back to index

salome-paravis  6.5.0
vtkMedStructElement.h
Go to the documentation of this file.
00001 // Copyright (C) 2010-2012  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef __vtkMedStructElement_h_
00021 #define __vtkMedStructElement_h_
00022 
00023 #include "vtkObject.h"
00024 #include "vtkMed.h"
00025 #include "vtkMedSetGet.h"
00026 
00027 class vtkMedVariableAttribute;
00028 class vtkMedConstantAttribute;
00029 class vtkMedFile;
00030 class vtkMedMesh;
00031 class vtkMedEntityArray;
00032 
00033 class VTK_EXPORT vtkMedStructElement : public vtkObject
00034 {
00035 public :
00036   static vtkMedStructElement* New();
00037   vtkTypeRevisionMacro(vtkMedStructElement, vtkObject)
00038   void PrintSelf(ostream& os, vtkIndent indent);
00039 
00040   // Description:
00041   // The iterator to identify this struct element model in the med file
00042   vtkSetMacro(MedIterator, med_int);
00043   vtkGetMacro(MedIterator, med_int);
00044 
00045   // Description:
00046   // This is the name of this structural element model
00047   vtkSetStringMacro(Name);
00048   vtkGetStringMacro(Name);
00049 
00050   // Description:
00051   // The Geometry type this structural elements lies on.
00052   vtkSetMacro(GeometryType, med_geometry_type);
00053   vtkGetMacro(GeometryType, med_geometry_type);
00054 
00055   // Description:
00056   // The dimension of this structural elements model
00057   vtkSetMacro(ModelDimension, med_int);
00058   vtkGetMacro(ModelDimension, med_int);
00059 
00060   // Description:
00061   // The name of the support mesh used by this structural element model
00062   vtkSetStringMacro(SupportMeshName);
00063   vtkGetStringMacro(SupportMeshName);
00064 
00065   // Description:
00066   // This is the support mesh instance, corresponding to the above name.
00067   virtual void  SetSupportMesh(vtkMedMesh*);
00068   vtkGetObjectMacro(SupportMesh, vtkMedMesh);
00069 
00070   // Description:
00071   // The type of entity contained in the support mesh
00072   vtkSetMacro(SupportEntityType, med_entity_type);
00073   vtkGetMacro(SupportEntityType, med_entity_type);
00074 
00075   // Description:
00076   // The number of nodes of the support mesh
00077   vtkSetMacro(SupportNumberOfNode, med_int);
00078   vtkGetMacro(SupportNumberOfNode, med_int);
00079 
00080   // Description:
00081   // The number of cells in the support mesh.
00082   vtkSetMacro(SupportNumberOfCell, med_int);
00083   vtkGetMacro(SupportNumberOfCell, med_int);
00084 
00085   // Description:
00086   // The geometry type of the cells in the support mesh
00087   vtkSetMacro(SupportGeometryType, med_geometry_type);
00088   vtkGetMacro(SupportGeometryType, med_geometry_type);
00089 
00090   // Description:
00091   // This boolean is set to true if the attributes are given on a profile
00092   vtkSetMacro(AnyProfile, med_bool);
00093   vtkGetMacro(AnyProfile, med_bool);
00094 
00095   // Description:
00096   // Get the Variable Attributes
00097   vtkGetObjectVectorMacro(VariableAttribute, vtkMedVariableAttribute);
00098   vtkSetObjectVectorMacro(VariableAttribute, vtkMedVariableAttribute);
00099 
00100   // Description:
00101   // Get the Constant Attributes
00102   vtkGetObjectVectorMacro(ConstantAttribute, vtkMedConstantAttribute);
00103   vtkSetObjectVectorMacro(ConstantAttribute, vtkMedConstantAttribute);
00104 
00105   // Description:
00106   // The file this structural element model is stored in.
00107   virtual void SetParentFile(vtkMedFile*);
00108   vtkGetObjectMacro(ParentFile, vtkMedFile);
00109 
00110   // Description:
00111   // This method will use the driver to load the data for this compute step
00112   // for all variable attributes from disk.
00113   virtual void  LoadVariableAttributes(vtkMedEntityArray*);
00114 
00115   // Description:
00116   // returns the size of the connectivity for one structural element.
00117   // for MED_PARTICLE elements, it returns the number of nodes
00118   // if SupportEntityType == MED_CELL, it returns the number of cells in the
00119   // support mesh * the number of node for each cell.
00120   // else it returns the number of nodes in the support mesh.
00121   virtual int GetConnectivitySize();
00122 
00123 protected:
00124   vtkMedStructElement();
00125   virtual ~vtkMedStructElement();
00126 
00127   med_int MedIterator;
00128   char *Name;
00129   med_geometry_type GeometryType;
00130   med_int ModelDimension;
00131   char *SupportMeshName;
00132   med_entity_type SupportEntityType;
00133   med_int SupportNumberOfNode;
00134   med_int SupportNumberOfCell;
00135   med_geometry_type SupportGeometryType;
00136   med_bool AnyProfile;
00137 
00138   vtkMedFile* ParentFile;
00139   vtkMedMesh* SupportMesh;
00140 
00141   vtkObjectVector<vtkMedVariableAttribute>* VariableAttribute;
00142   vtkObjectVector<vtkMedConstantAttribute>* ConstantAttribute;
00143 
00144 private:
00145   vtkMedStructElement(const vtkMedStructElement&); // Not implemented.
00146   void operator=(const vtkMedStructElement&); // Not implemented.
00147 
00148 };
00149 
00150 #endif //__vtkMedStructElement_h_