VTK  9.3.20240425
vtkGenericInterpolatedVelocityField.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
30#ifndef vtkGenericInterpolatedVelocityField_h
31#define vtkGenericInterpolatedVelocityField_h
32
33#include "vtkCommonDataModelModule.h" // For export macro
34#include "vtkFunctionSet.h"
35
36VTK_ABI_NAMESPACE_BEGIN
40
41class vtkGenericInterpolatedVelocityFieldDataSetsType;
42
43class VTKCOMMONDATAMODEL_EXPORT vtkGenericInterpolatedVelocityField : public vtkFunctionSet
44{
45public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
54
55 using Superclass::FunctionValues;
60 int FunctionValues(double* x, double* f) override;
61
69 virtual void AddDataSet(vtkGenericDataSet* dataset);
70
76
81
87 int GetLastLocalCoordinates(double pcoords[3]);
88
90
93 vtkGetMacro(Caching, vtkTypeBool);
94 vtkSetMacro(Caching, vtkTypeBool);
95 vtkBooleanMacro(Caching, vtkTypeBool);
97
99
102 vtkGetMacro(CacheHit, int);
103 vtkGetMacro(CacheMiss, int);
105
107
112 vtkGetStringMacro(VectorsSelection);
113 void SelectVectors(const char* fieldName) { this->SetVectorsSelection(fieldName); }
115
117
123 vtkGetObjectMacro(LastDataSet, vtkGenericDataSet);
125
132
133protected:
136
138
139 double LastPCoords[3]; // last local coordinates
143
145
146 vtkSetStringMacro(VectorsSelection);
148
149 vtkGenericInterpolatedVelocityFieldDataSetsType* DataSets;
150
151 int FunctionValues(vtkGenericDataSet* dataset, double* x, double* f);
152
153 static const double TOLERANCE_SCALE;
154
155private:
157 void operator=(const vtkGenericInterpolatedVelocityField&) = delete;
158};
159
160VTK_ABI_NAMESPACE_END
161#endif
Abstract interface for sets of functions.
defines cell interface
iterator used to traverse cells
defines dataset interface
Interface for obtaining interpolated velocity values.
virtual void AddDataSet(vtkGenericDataSet *dataset)
Add a dataset used for the implicit function evaluation.
int FunctionValues(double *x, double *f) override
Evaluate the velocity field, f, at (x, y, z, t).
void SelectVectors(const char *fieldName)
If you want to work with an arbitrary vector array, then set its name here.
static vtkGenericInterpolatedVelocityField * New()
Construct a vtkGenericInterpolatedVelocityField with no initial data set.
void ClearLastCell()
Set the last cell id to -1 so that the next search does not start from the previous cell.
int FunctionValues(vtkGenericDataSet *dataset, double *x, double *f)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGenericAdaptorCell * GetLastCell()
Return the cell cached from last evaluation.
virtual void CopyParameters(vtkGenericInterpolatedVelocityField *from)
Copy the user set parameters from source.
vtkGenericInterpolatedVelocityFieldDataSetsType * DataSets
int GetLastLocalCoordinates(double pcoords[3])
Returns the interpolation weights cached from last evaluation if the cached cell is valid (returns 1)...
a simple class to control print indentation
Definition vtkIndent.h:108
int vtkTypeBool
Definition vtkABI.h:64