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=========================================================================*/
27#ifndef vtkMultiTimeStepAlgorithm_h
28#define vtkMultiTimeStepAlgorithm_h
29
30#include "vtkCommonExecutionModelModule.h" // For export macro
31#include "vtkAlgorithm.h"
32#include "vtkSmartPointer.h" //needed for a private variable
33
34#include <vector> //needed for a private variable
35#include "vtkDataObject.h" // needed for the smart pointer
36
39class VTKCOMMONEXECUTIONMODEL_EXPORT vtkMultiTimeStepAlgorithm : public vtkAlgorithm
40{
41public:
44 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
45
46
47protected:
49
51 {
52 };
53
58
59
61
66 {
67 return 1;
68 };
70
72
77 {
78 return 1;
79 };
81
87 {
88 return 1;
89 }
90
96 {
97 return 1;
98 }
99
101
104
105private:
106 vtkMultiTimeStepAlgorithm(const vtkMultiTimeStepAlgorithm&) VTK_DELETE_FUNCTION;
107 void operator=(const vtkMultiTimeStepAlgorithm&) VTK_DELETE_FUNCTION;
108
109
110 vtkSmartPointer<vtkMultiBlockDataSet> MDataSet; //stores all the temporal data sets
111 int RequestUpdateIndex; //keep track of the time looping index
112 std::vector<double> UpdateTimeSteps; //store the requested time steps
113
114 bool IsInCache(double time, size_t& idx);
115
116 struct TimeCache
117 {
118 TimeCache(double time, vtkDataObject* data) : TimeValue(time), Data(data)
119 {
120 }
121 double TimeValue;
123 };
124
125 std::vector<TimeCache> Cache;
126};
127
128#endif
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:60
general representation of visualization data
Definition: vtkDataObject.h:65
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Composite dataset that organizes datasets into blocks.
Superclass for algorithms that would like to make multiple time requests.
static vtkInformationDoubleVectorKey * UPDATE_TIME_STEPS()
This is filled by the child class to request multiple time steps.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
static vtkMultiTimeStepAlgorithm * New()
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
@ time
Definition: vtkX3D.h:497
@ data
Definition: vtkX3D.h:315