VTK
9.5.2
Main Page
Related Pages
Topics
Namespaces
Classes
Files
Examples
File List
File Members
Filters
FlowPaths
vtkStreamTracer.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2
// SPDX-License-Identifier: BSD-3-Clause
81
82
#ifndef vtkStreamTracer_h
83
#define vtkStreamTracer_h
84
85
#include "vtkFiltersFlowPathsModule.h"
// For export macro
86
#include "
vtkPolyDataAlgorithm.h
"
87
88
#include "
vtkDataSetAttributesFieldList.h
"
// Needed to identify common data arrays
89
#include "
vtkInitialValueProblemSolver.h
"
// Needed for constants
90
91
VTK_ABI_NAMESPACE_BEGIN
92
class
vtkAbstractInterpolatedVelocityField
;
93
class
vtkCompositeDataSet
;
94
class
vtkDataArray
;
95
class
vtkDataSetAttributes
;
96
class
vtkDoubleArray
;
97
class
vtkExecutive
;
98
class
vtkGenericCell
;
99
class
vtkIdList
;
100
class
vtkIntArray
;
101
class
vtkPoints
;
102
103
VTK_ABI_NAMESPACE_END
104
#include <vector>
// for std::vector
105
106
// Helper struct to convert between different length scales.
107
VTK_ABI_NAMESPACE_BEGIN
108
struct
VTKFILTERSFLOWPATHS_EXPORT
vtkIntervalInformation
109
{
110
double
Interval
;
111
int
Unit
;
112
113
static
double
ConvertToLength
(
double
interval,
int
unit,
double
cellLength);
114
static
double
ConvertToLength
(
vtkIntervalInformation
& interval,
double
cellLength);
115
};
116
127
typedef
bool (*
CustomTerminationCallbackType
)(
128
void
* clientdata,
vtkPoints
* points,
vtkDataArray
* velocity,
int
integrationDirection);
129
130
class
VTKFILTERSFLOWPATHS_EXPORT
vtkStreamTracer
:
public
vtkPolyDataAlgorithm
131
{
132
public
:
140
static
vtkStreamTracer
*
New
();
141
143
146
vtkTypeMacro(
vtkStreamTracer
,
vtkPolyDataAlgorithm
);
147
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
149
151
156
vtkSetVector3Macro(
StartPosition
,
double
);
157
vtkGetVector3Macro(
StartPosition
,
double
);
159
161
167
void
SetSourceData
(
vtkDataSet
*
source
);
168
vtkDataSet
*
GetSource
();
170
176
void
SetSourceConnection
(
vtkAlgorithmOutput
* algOutput);
177
178
// The previously-supported TIME_UNIT is excluded in this current
179
// enumeration definition because the underlying step size is ALWAYS in
180
// arc length unit (LENGTH_UNIT) while the 'real' time interval (virtual
181
// for steady flows) that a particle actually takes to trave in a single
182
// step is obtained by dividing the arc length by the LOCAL speed. The
183
// overall elapsed time (i.e., the life span) of the particle is the sum
184
// of those individual step-wise time intervals. The arc-length-to-time
185
// conversion only occurs for vorticity computation and for generating a
186
// point data array named 'IntegrationTime'.
187
enum
Units
188
{
189
LENGTH_UNIT
= 1,
190
CELL_LENGTH_UNIT
= 2
191
};
192
193
enum
Solvers
194
{
195
RUNGE_KUTTA2
,
196
RUNGE_KUTTA4
,
197
RUNGE_KUTTA45
,
198
NONE
,
199
UNKNOWN
200
};
201
202
enum
ReasonForTermination
203
{
204
OUT_OF_DOMAIN
=
vtkInitialValueProblemSolver::OUT_OF_DOMAIN
,
205
NOT_INITIALIZED
=
vtkInitialValueProblemSolver::NOT_INITIALIZED
,
206
UNEXPECTED_VALUE
=
vtkInitialValueProblemSolver::UNEXPECTED_VALUE
,
207
OUT_OF_LENGTH
= 4,
208
OUT_OF_STEPS
= 5,
209
STAGNATION
= 6,