VTK  9.5.2
vtkTemporalAlgorithm.h File Reference
#include "vtkAlgorithm.h"
#include "vtkCommonExecutionModelModule.h"
#include "vtkNew.h"
#include "vtkTemporalAlgorithm.txx"
Include dependency graph for vtkTemporalAlgorithm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define vtkCreateWrappedTemporalAlgorithmInterface()

Functions

static const char * TimeStepsArrayName ()
 When vtkStreamingDemandDrivenPipeline::NO_PRIOR_TEMPORAL_ACCESS() is set, an array with this name is populated in the output's field data listing all the time steps executed so far.
 vtkTemporalAlgorithm ()
int RequestInformation (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
int RequestUpdateTime (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
int RequestUpdateExtent (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
int RequestData (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
virtual int Initialize (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)=0
 Method called at first temporal iteration.
virtual int Execute (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)=0
 Method called at each time step.
virtual int Finalize (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)=0
 Method that converts the temporal cache into the outputs.
int GetCurrentTimeIndex () const
 Returns the current time index being executed (or finalized).
double GetCurrentTimeStep () const
 Returns the current time step being executed (or finalized).
bool MustReset () const
 Returns true if the cache must be reinitialized before executing the current time step.
bool MustContinue () const
 Returns true if there are time steps missing that must be requested upstream.
 vtkTemplateTypeMacro (vtkTemporalAlgorithm, AlgorithmT)

Variables

bool IntegrateFullTimeSeries = false
 To be set in the constructon.
bool RunBackward = false
 When turned on, time steps will be requested backward upstream.
bool NoPriorTimeStepAccess = false
 When true, the algorithm calls Finalize at each iteration.
vtkNew< vtkDoubleArrayProcessedTimeSteps
 Array only used when the information key NO_PRIOR_TEMPORAL_ACCESS() is set.
std::vector< double > InputTimeSteps
 When the information key NO_PRIOR_TEMPORAL_ACCESS() is not set on the input port, this is used to keep track of which iteration we are currently executing, and when to terminate.
int TerminationTimeIndex = 0
 When the information key NO_PRIOR_TEMPORAL_ACCESS() is not set on the input port, this is used to keep track of which iteration we are currently executing, and when to terminate.
int CurrentTimeIndex = 0
 When the information key NO_PRIOR_TEMPORAL_ACCESS() is not set on the input port, this is used to keep track of which iteration we are currently executing, and when to terminate.

Macro Definition Documentation

◆ vtkCreateWrappedTemporalAlgorithmInterface

#define vtkCreateWrappedTemporalAlgorithmInterface ( )
Value:
static const char* TimeStepsArrayName(); \
\
protected: \
int GetCurrentTimeIndex() const; \
double GetCurrentTimeStep() const; \
\
public:
static const char * TimeStepsArrayName()
When vtkStreamingDemandDrivenPipeline::NO_PRIOR_TEMPORAL_ACCESS() is set, an array with this name is ...
double GetCurrentTimeStep() const
Returns the current time step being executed (or finalized).
int GetCurrentTimeIndex() const
Returns the current time index being executed (or finalized).
bool IntegrateFullTimeSeries
To be set in the constructon.

Definition at line 215 of file vtkTemporalAlgorithm.h.

Function Documentation

◆ vtkTemplateTypeMacro()

vtkTemplateTypeMacro ( vtkTemporalAlgorithm ,
AlgorithmT  )

◆ TimeStepsArrayName()

const char * TimeStepsArrayName ( )
static

When vtkStreamingDemandDrivenPipeline::NO_PRIOR_TEMPORAL_ACCESS() is set, an array with this name is populated in the output's field data listing all the time steps executed so far.

Definition at line 107 of file vtkTemporalAlgorithm.h.

◆ vtkTemporalAlgorithm()

vtkTemporalAlgorithm ( )
protected

◆ RequestInformation()

int RequestInformation ( vtkInformation * request,
vtkInformationVector ** inputVector,
vtkInformationVector * outputVector )
overrideprotected

◆ RequestUpdateTime()

int RequestUpdateTime ( vtkInformation * request,
vtkInformationVector ** inputVector,
vtkInformationVector * outputVector )
overrideprotected

◆ RequestUpdateExtent()

int RequestUpdateExtent ( vtkInformation * request,
vtkInformationVector ** inputVector,
vtkInformationVector * outputVector )
overrideprotected

◆ RequestData()

int RequestData ( vtkInformation * request,
vtkInformationVector ** inputVector,
vtkInformationVector * outputVector )
overrideprotected

◆ Initialize()

virtual int Initialize ( vtkInformation * request,
vtkInformationVector ** inputVector,
vtkInformationVector * outputVector )
protectedpure virtual

Method called at first temporal iteration.

This method wipes any temporal cache that could be maintained and sets up all the internals needed to run Execute properly. The parameters are passed as is by RequestData.

Warning
Within this method, GetCurrentTimeIndex and GetCurrentTimeStep should not be called. One can assume the current index is 0.

◆ Execute()

virtual int Execute ( vtkInformation * request,
vtkInformationVector ** inputVector,
vtkInformationVector * outputVector )
protectedpure virtual

Method called at each time step.

The temporal cache is updated to represent the data available in the input. The parameters are passed as is by RequestData.

◆ Finalize()

virtual int Finalize ( vtkInformation * request,
vtkInformationVector ** inputVector,
vtkInformationVector * outputVector )
protectedpure virtual

Method that converts the temporal cache into the outputs.

The parameters are passed as is by RequestData.

◆ GetCurrentTimeIndex()

int GetCurrentTimeIndex ( ) const
protected

Returns the current time index being executed (or finalized).

First iteration is indexed at 0.

◆ GetCurrentTimeStep()

double GetCurrentTimeStep ( ) const
protected

Returns the current time step being executed (or finalized).

◆ MustReset()

bool MustReset ( ) const
protected

Returns true if the cache must be reinitialized before executing the current time step.

◆ MustContinue()

bool MustContinue ( ) const
protected

Returns true if there are time steps missing that must be requested upstream.

Variable Documentation

◆ IntegrateFullTimeSeries

bool IntegrateFullTimeSeries = false
protected

To be set in the constructon.

If true, all time steps are requested upstream for any requested time step dowstream. Downstream effectively lose temporality. Otherwise, the algorithm integrates inputs up to the requested time step.

Definition at line 165 of file vtkTemporalAlgorithm.h.

◆ RunBackward

bool RunBackward = false
protected

When turned on, time steps will be requested backward upstream.

Warning
This is deprecated. This is only here for one release cycle for backward compatibility of some subclasses. Please avoid setting this.

Definition at line 173 of file vtkTemporalAlgorithm.h.

◆ InputTimeSteps

std::vector<double> InputTimeSteps
protected

When the information key NO_PRIOR_TEMPORAL_ACCESS() is not set on the input port, this is used to keep track of which iteration we are currently executing, and when to terminate.

Definition at line 180 of file vtkTemporalAlgorithm.h.

◆ TerminationTimeIndex

int TerminationTimeIndex = 0
protected

When the information key NO_PRIOR_TEMPORAL_ACCESS() is not set on the input port, this is used to keep track of which iteration we are currently executing, and when to terminate.

Definition at line 181 of file vtkTemporalAlgorithm.h.

◆ CurrentTimeIndex

int CurrentTimeIndex = 0
protected

When the information key NO_PRIOR_TEMPORAL_ACCESS() is not set on the input port, this is used to keep track of which iteration we are currently executing, and when to terminate.

Definition at line 182 of file vtkTemporalAlgorithm.h.

◆ NoPriorTimeStepAccess

bool NoPriorTimeStepAccess = false
protected

When true, the algorithm calls Finalize at each iteration.

It is set to true if the first input on port 0 has set the information key NO_PRIOR_TEMPORAL_ACCESS(). It is typically set for in situ visualization.

Definition at line 200 of file vtkTemporalAlgorithm.h.

◆ ProcessedTimeSteps

vtkNew<vtkDoubleArray> ProcessedTimeSteps
protected

Array only used when the information key NO_PRIOR_TEMPORAL_ACCESS() is set.

It is put in the output's field data.

Definition at line 206 of file vtkTemporalAlgorithm.h.