VTK
vtkMultiTimeStepAlgorithm.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMultiTimeStepAlgorithm.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkMultiTimeStepAlgorithm_h
27 #define vtkMultiTimeStepAlgorithm_h
28 
29 #include "vtkCommonExecutionModelModule.h" // For export macro
30 #include "vtkAlgorithm.h"
31 #include "vtkSmartPointer.h" //needed for a private variable
32 
33 #include <vector> //needed for a private variable
34 #include "vtkDataObject.h" // needed for the smart pointer
35 
39 {
40 public:
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
45 
46 protected:
48 
50  {
51  };
52 
55 
56 
58 
61  {
62  return 1;
63  };
65 
67 
70  {
71  return 1;
72  };
74 
76 
79  {
80  return 1;
81  }
83 
85 
88  {
89  return 1;
90  }
92 
94 
95  bool CacheData;
96  unsigned int NumberOfCacheEntries;
97 
98 private:
99  vtkMultiTimeStepAlgorithm(const vtkMultiTimeStepAlgorithm&); // Not implemented.
100  void operator=(const vtkMultiTimeStepAlgorithm&); // Not implemented.
101 
102 
103  vtkSmartPointer<vtkMultiBlockDataSet> MDataSet; //stores all the temporal data sets
104  int RequestUpdateIndex; //keep track of the time looping index
105  std::vector<double> UpdateTimeSteps; //store the requested time steps
106 
107  bool IsInCache(double time, size_t& idx);
108 
109  struct TimeCache
110  {
111  TimeCache(double time, vtkDataObject* data) : TimeValue(time), Data(data)
112  {
113  }
114  double TimeValue;
116  };
117 
118  std::vector<TimeCache> Cache;
119 };
120 
121 #endif
vtkgl::data
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: vtkgl.h:11339
VTKCOMMONEXECUTIONMODEL_EXPORT
#define VTKCOMMONEXECUTIONMODEL_EXPORT
Definition: vtkCommonExecutionModelModule.h:15
vtkMultiTimeStepAlgorithm::UPDATE_TIME_STEPS
static vtkInformationDoubleVectorKey * UPDATE_TIME_STEPS()
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:62
vtkMultiTimeStepAlgorithm::NumberOfCacheEntries
unsigned int NumberOfCacheEntries
Definition: vtkMultiTimeStepAlgorithm.h:96
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkSmartPointer< vtkMultiBlockDataSet >
vtkCommonExecutionModelModule.h
vtkX3D::time
@ time
Definition: vtkX3D.h:497
vtkMultiTimeStepAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Definition: vtkMultiTimeStepAlgorithm.h:78
vtkMultiBlockDataSet
Composite dataset that organizes datasets into blocks.
Definition: vtkMultiBlockDataSet.h:51
vtkMultiTimeStepAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkAlgorithm.h
vtkMultiTimeStepAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Definition: vtkMultiTimeStepAlgorithm.h:87
vtkMultiTimeStepAlgorithm::vtkMultiTimeStepAlgorithm
vtkMultiTimeStepAlgorithm()
vtkMultiTimeStepAlgorithm::CacheData
bool CacheData
Definition: vtkMultiTimeStepAlgorithm.h:95
vtkMultiTimeStepAlgorithm::ProcessRequest
int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkMultiTimeStepAlgorithm::New
static vtkMultiTimeStepAlgorithm * New()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSmartPointer.h
vtkMultiTimeStepAlgorithm::~vtkMultiTimeStepAlgorithm
~vtkMultiTimeStepAlgorithm()
Definition: vtkMultiTimeStepAlgorithm.h:49
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkDataObject.h
vtkInformationDoubleVectorKey
Key for double vector values.
Definition: vtkInformationDoubleVectorKey.h:34
vtkMultiTimeStepAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Definition: vtkMultiTimeStepAlgorithm.h:69
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkMultiTimeStepAlgorithm::RequestDataObject
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Definition: vtkMultiTimeStepAlgorithm.h:60
vtkMultiTimeStepAlgorithm
Superclass for algorithms that would like to make multiple time requests.
Definition: vtkMultiTimeStepAlgorithm.h:39