VTK  9.1.0
vtkGenericInterpolatedVelocityField.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkGenericInterpolatedVelocityField.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
42#ifndef vtkGenericInterpolatedVelocityField_h
43#define vtkGenericInterpolatedVelocityField_h
44
45#include "vtkCommonDataModelModule.h" // For export macro
46#include "vtkFunctionSet.h"
47
51
52class vtkGenericInterpolatedVelocityFieldDataSetsType;
53
54class VTKCOMMONDATAMODEL_EXPORT vtkGenericInterpolatedVelocityField : public vtkFunctionSet
55{
56public:
58 void PrintSelf(ostream& os, vtkIndent indent) override;
59
65
66 using Superclass::FunctionValues;
71 int FunctionValues(double* x, double* f) override;
72
80 virtual void AddDataSet(vtkGenericDataSet* dataset);
81
87
92
98 int GetLastLocalCoordinates(double pcoords[3]);
99
101
104 vtkGetMacro(Caching, vtkTypeBool);
105 vtkSetMacro(Caching, vtkTypeBool);
106 vtkBooleanMacro(Caching, vtkTypeBool);
108
110
113 vtkGetMacro(CacheHit, int);
114 vtkGetMacro(CacheMiss, int);
116
118
123 vtkGetStringMacro(VectorsSelection);
124 void SelectVectors(const char* fieldName) { this->SetVectorsSelection(fieldName); }
126
128
134 vtkGetObjectMacro(LastDataSet, vtkGenericDataSet);
136
143
144protected:
147
149
150 double LastPCoords[3]; // last local coordinates
154
156
157 vtkSetStringMacro(VectorsSelection);
159
160 vtkGenericInterpolatedVelocityFieldDataSetsType* DataSets;
161
162 int FunctionValues(vtkGenericDataSet* dataset, double* x, double* f);
163
164 static const double TOLERANCE_SCALE;
165
166private:
168 void operator=(const vtkGenericInterpolatedVelocityField&) = delete;
169};
170
171#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:113
int vtkTypeBool
Definition: vtkABI.h:69