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 
54  static vtkInformationDoubleVectorKey* UPDATE_TIME_STEPS();
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
#define VTKCOMMONEXECUTIONMODEL_EXPORT
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:61
Key for double vector values.
a simple class to control print indentation
Definition: vtkIndent.h:38
Superclass for algorithms that would like to make multiple time requests.
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Composite dataset that organizes datasets into blocks.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
general representation of visualization data
Definition: vtkDataObject.h:64
void PrintSelf(ostream &os, vtkIndent indent)