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 
54  static vtkInformationDoubleVectorKey* UPDATE_TIME_STEPS();
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
vtkMultiTimeStepAlgorithm::~vtkMultiTimeStepAlgorithm
~vtkMultiTimeStepAlgorithm() override
Definition: vtkMultiTimeStepAlgorithm.h:49
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:62
vtkX3D::data
@ data
Definition: vtkX3D.h:321
vtkMultiTimeStepAlgorithm::NumberOfCacheEntries
unsigned int NumberOfCacheEntries
Definition: vtkMultiTimeStepAlgorithm.h:100
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkSmartPointer< vtkMultiBlockDataSet >
vtkX3D::time
@ time
Definition: vtkX3D.h:503
vtkMultiTimeStepAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Definition: vtkMultiTimeStepAlgorithm.h:82
vtkMultiBlockDataSet
Composite dataset that organizes datasets into blocks.
Definition: vtkMultiBlockDataSet.h:45
vtkAlgorithm.h
vtkMultiTimeStepAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Definition: vtkMultiTimeStepAlgorithm.h:91
vtkMultiTimeStepAlgorithm::CacheData
bool CacheData
Definition: vtkMultiTimeStepAlgorithm.h:99
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSmartPointer.h
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkDataObject.h
vtkInformationDoubleVectorKey
Key for double vector values.
Definition: vtkInformationDoubleVectorKey.h:31
vtkMultiTimeStepAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Definition: vtkMultiTimeStepAlgorithm.h:72
vtkAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
vtkAlgorithm::ProcessRequest
virtual vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkMultiTimeStepAlgorithm::RequestDataObject
virtual int RequestDataObject(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Definition: vtkMultiTimeStepAlgorithm.h:61
vtkMultiTimeStepAlgorithm
Superclass for algorithms that would like to make multiple time requests.
Definition: vtkMultiTimeStepAlgorithm.h:39