Back to index

salome-paravis  6.5.0
vtkMedFieldStep.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 __vtkMedFieldStep_h_
00021 #define __vtkMedFieldStep_h_
00022 
00023 #include "vtkObject.h"
00024 #include "vtkMedSetGet.h"
00025 #include "vtkMed.h"
00026 #include "vtkMedUtilities.h"
00027 
00028 class vtkMedString;
00029 class vtkMedMesh;
00030 class vtkDataArray;
00031 class vtkMedFieldOverEntity;
00032 class vtkMedField;
00033 
00034 class VTK_EXPORT vtkMedFieldStep: public vtkObject
00035 {
00036 public:
00037   static vtkMedFieldStep* New();
00038   vtkTypeRevisionMacro(vtkMedFieldStep, vtkObject);
00039   void PrintSelf(ostream& os, vtkIndent indent);
00040 
00041   // Description:
00042   // This iterator is used when reading information from the med file
00043   vtkSetMacro(MedIterator, med_int);
00044   vtkGetMacro(MedIterator, med_int);
00045 
00046   // Description:
00047   // The compute step of this field
00048   void  SetComputeStep(const vtkMedComputeStep& cs)
00049     {
00050     this->ComputeStep = cs;
00051     }
00052   const vtkMedComputeStep& GetComputeStep() const
00053     {
00054     return this->ComputeStep;
00055     }
00056 
00057   // Description:
00058   // The compute step of the mesh supporting this field at this step
00059   void  SetMeshComputeStep(const vtkMedComputeStep& cs)
00060     {
00061     this->MeshComputeStep = cs;
00062     }
00063   const vtkMedComputeStep& GetMeshComputeStep() const
00064     {
00065     return this->MeshComputeStep;
00066     }
00067 
00068   // Description:
00069   // Set the number of steps of this field over these cells.
00070   vtkGetObjectVectorMacro(FieldOverEntity, vtkMedFieldOverEntity);
00071   vtkSetObjectVectorMacro(FieldOverEntity, vtkMedFieldOverEntity);
00072 
00073   // Description:
00074   // returns the vtkMedFieldOverEntity for the given Type and Geometry;
00075   virtual vtkMedFieldOverEntity*
00076           GetFieldOverEntity(const vtkMedEntity&);
00077 
00078   // Description:
00079   // The parent field is the one that owns this step
00080   virtual void  SetParentField(vtkMedField*);
00081   vtkGetObjectMacro(ParentField, vtkMedField);
00082 
00083   // Description:
00084   // The parent field is the one that owns this step
00085   virtual void  SetPreviousStep(vtkMedFieldStep*);
00086   vtkGetObjectMacro(PreviousStep, vtkMedFieldStep);
00087 
00088   virtual void  LoadInformation();
00089 
00090   // Description:
00091   // This flag is used to delay loading information on all entity as long as possible
00092   vtkSetMacro(EntityInfoLoaded, med_int);
00093   vtkGetMacro(EntityInfoLoaded, med_int);
00094 
00095 protected:
00096   vtkMedFieldStep();
00097   virtual ~vtkMedFieldStep();
00098 
00099   int EntityInfoLoaded;
00100   med_int MedIterator;
00101   vtkMedComputeStep ComputeStep;
00102   vtkMedComputeStep MeshComputeStep;
00103   vtkMedField* ParentField;
00104   vtkMedFieldStep* PreviousStep;
00105 
00106   //BTX
00107   vtkObjectVector<vtkMedFieldOverEntity>* FieldOverEntity;
00108   //ETX
00109 
00110 private:
00111   vtkMedFieldStep(const vtkMedFieldStep&); // Not implemented.
00112   void operator=(const vtkMedFieldStep&); // Not implemented.
00113 };
00114 
00115 #endif //__vtkMedFieldStep_h_