VTK  9.6.1
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 constructor.
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 constructor.

Definition at line 210 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 110 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 constructor.

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 168 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 175 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 176 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 177 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 195 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 201 of file vtkTemporalAlgorithm.h.