VMTK
Loading...
Searching...
No Matches
vtkvmtkStaticTemporalInterpolatedVelocityField.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4
5 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
6 All rights reserved.
7 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13=========================================================================*/
14/*=========================================================================
15
16Program: VMTK
17
18 Copyright (c) Luca Antiga, David Steinman. All rights reserved.
19 See LICENSE file for details.
20
21 Portions of this code are covered under the VTK copyright.
22 See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
23 for details.
24
25 This software is distributed WITHOUT ANY WARRANTY; without even
26 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
27 PURPOSE. See the above copyright notices for more information.
28
29=========================================================================*/
57
58#ifndef __vtkvmtkStaticTemporalInterpolatedVelocityField_h
59#define __vtkvmtkStaticTemporalInterpolatedVelocityField_h
60
61#include "vtkvmtkWin32Header.h"
62#include "vtkVersion.h"
63
64#if VTK_MAJOR_VERSION > 9 || (VTK_MAJOR_VERSION == 9 && VTK_MINOR_VERSION >= 2)
65// vtkInterpolatedVelocityField was deprecated by the VTK 9.2 rework of the
66// interpolated velocity fields and later removed.
67#include "vtkCompositeInterpolatedVelocityField.h"
68#define VMTK_STIVF_SUPERCLASS vtkCompositeInterpolatedVelocityField
69#else
70#include "vtkInterpolatedVelocityField.h"
71#define VMTK_STIVF_SUPERCLASS vtkInterpolatedVelocityField
72#endif
73
74class vtkTable;
75class vtkGenericCell;
76
79{
80public:
83
84 void PrintSelf( std::ostream & os, vtkIndent indent ) override;
85
91
93
100 vtkGetObjectMacro(TimeStepsTable,vtkTable);
101 virtual void SetTimeStepsTable(vtkTable*);
103
105
111 vtkSetMacro(Periodic, int);
112 vtkGetMacro(Periodic, int);
113 vtkBooleanMacro(Periodic, int);
115
117
121 vtkSetMacro(VelocityScale, double);
122 vtkGetMacro(VelocityScale, double);
124
126
132 vtkSetMacro(UseVectorComponents, int);
133 vtkGetMacro(UseVectorComponents, int);
134 vtkBooleanMacro(UseVectorComponents, int);
136
138
143 vtkSetStringMacro(VectorPrefix);
144 vtkGetStringMacro(VectorPrefix);
146
148
153 vtkSetStringMacro(Component0Prefix);
154 vtkGetStringMacro(Component0Prefix);
156
158
163 vtkSetStringMacro(Component1Prefix);
164 vtkGetStringMacro(Component1Prefix);
166
168
173 vtkSetStringMacro(Component2Prefix);
174 vtkGetStringMacro(Component2Prefix);
176
180 virtual void SetLastCellId( vtkIdType c, int dataindex ) override;
181
183
186 virtual void SetLastCellId( vtkIdType c ) override
187 { this->Superclass::SetLastCellId( c ); }
188
189
197 virtual void CopyParameters( vtkAbstractInterpolatedVelocityField * from ) override;
198
199protected:
202
209 virtual int FunctionValues( vtkDataSet * ds, double * x, double * f ) override;
210
211 void FindTimeRowId(double time, int& prevRowId, int& nextRowId, double& p);
212
213 void BuildArrayName(char* prefix, int index, char* name);
214
215 vtkTable* TimeStepsTable;
216
218
220
222
228
229#if VTK_MAJOR_VERSION > 9 || (VTK_MAJOR_VERSION == 9 && VTK_MINOR_VERSION >= 2)
230 // The VTK 9.2 rework of the interpolated velocity fields removed the
231 // GenCell/Cell scratch members from the base class; keep our own.
232 vtkGenericCell* TemporalGenCell;
233 vtkGenericCell* TemporalCell;
234#endif
235
236private:
238 ( const vtkvmtkStaticTemporalInterpolatedVelocityField & ); // Not implemented.
239 void operator =
240 ( const vtkvmtkStaticTemporalInterpolatedVelocityField & ); // Not implemented.
241};
242
243#endif
Evaluates an interpolated velocity field from a time-tabulated, temporally piecewise-linear velocity ...
static vtkvmtkStaticTemporalInterpolatedVelocityField * New()