VTK  9.0.1
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 "vtkAlgorithm.h"
31 #include "vtkCommonExecutionModelModule.h" // For export macro
32 #include "vtkSmartPointer.h" //needed for a private variable
33 
34 #include "vtkDataObject.h" // needed for the smart pointer
35 #include <vector> //needed for a private variable
36 
39 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkMultiTimeStepAlgorithm : public vtkAlgorithm
40 {
41 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
46 protected:
48 
50 
55 
57 
62  {
63  return 1;
64  }
66 
68 
73  {
74  return 1;
75  }
77 
83  {
84  return 1;
85  }
86 
92  {
93  return 1;
94  }
95 
98 
99  bool CacheData;
100  unsigned int NumberOfCacheEntries;
101 
102 private:
104  void operator=(const vtkMultiTimeStepAlgorithm&) = delete;
105 
106  vtkSmartPointer<vtkMultiBlockDataSet> MDataSet; // stores all the temporal data sets
107  int RequestUpdateIndex; // keep track of the time looping index
108  std::vector<double> UpdateTimeSteps; // store the requested time steps
109 
110  bool IsInCache(double time, size_t& idx);
111 
112  struct TimeCache
113  {
114  TimeCache(double time, vtkDataObject* data)
115  : TimeValue(time)
116  , Data(data)
117  {
118  }
119  double TimeValue;
121  };
122 
123  std::vector<TimeCache> Cache;
124 };
125 
126 #endif
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:63
general representation of visualization data
Definition: vtkDataObject.h:60
a simple class to control print indentation
Definition: vtkIndent.h:34
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 vtkMultiTimeStepAlgorithm * New()
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
static vtkInformationDoubleVectorKey * UPDATE_TIME_STEPS()
This is filled by the child class to request multiple time steps.
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
@ time
Definition: vtkX3D.h:503
@ data
Definition: vtkX3D.h:321
int vtkTypeBool
Definition: vtkABI.h:69