VTK  9.3.1
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 
36 VTK_ABI_NAMESPACE_BEGIN
37 class vtkGenericDataSet;
40 
41 class vtkGenericInterpolatedVelocityFieldDataSetsType;
42 
43 class VTKCOMMONDATAMODEL_EXPORT vtkGenericInterpolatedVelocityField : public vtkFunctionSet
44 {
45 public:
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 
75  void ClearLastCell();
76 
80  vtkGenericAdaptorCell* GetLastCell();
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 
131  virtual void CopyParameters(vtkGenericInterpolatedVelocityField* from);
132 
133 protected:
136 
138 
139  double LastPCoords[3]; // last local coordinates
140  int CacheHit;
143 
145 
146  vtkSetStringMacro(VectorsSelection);
147  char* VectorsSelection;
148 
149  vtkGenericInterpolatedVelocityFieldDataSetsType* DataSets;
150 
151  int FunctionValues(vtkGenericDataSet* dataset, double* x, double* f);
152 
153  static const double TOLERANCE_SCALE;
154 
155 private:
157  void operator=(const vtkGenericInterpolatedVelocityField&) = delete;
158 };
159 
160 VTK_ABI_NAMESPACE_END
161 #endif
void SelectVectors(const char *fieldName)
If you want to work with an arbitrary vector array, then set its name here.
iterator used to traverse cells
int vtkTypeBool
Definition: vtkABI.h:64
defines cell interface
vtkGenericInterpolatedVelocityFieldDataSetsType * DataSets
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
Abstract interface for sets of functions.
virtual int FunctionValues(double *x, double *f)
Evaluate functions at x_j.
defines dataset interface
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Interface for obtaining interpolated velocity values.