VTK
vtkAbstractInterpolatedVelocityField.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAbstractInterpolatedVelocityField.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 =========================================================================*/
67 #ifndef vtkAbstractInterpolatedVelocityField_h
68 #define vtkAbstractInterpolatedVelocityField_h
69 
70 #include "vtkFunctionSet.h"
71 
72 #include <vector> // STL Header; Required for vector
73 
74 class vtkDataSet;
75 
76 class vtkDataArray;
77 
78 class vtkPointData;
79 class vtkGenericCell;
80 class vtkAbstractInterpolatedVelocityFieldDataSetsType;
81 
82 #include "vtkFiltersFlowPathsModule.h" // For export macro
83 
84 class VTKFILTERSFLOWPATHS_EXPORT vtkAbstractInterpolatedVelocityField : public vtkFunctionSet
85 {
86 public:
88  void PrintSelf( ostream & os, vtkIndent indent ) VTK_OVERRIDE;
89 
91 
98  vtkSetMacro( Caching, bool );
99  vtkGetMacro( Caching, bool );
101 
103 
107  vtkGetMacro( CacheHit, int );
108  vtkGetMacro( CacheMiss, int );
110 
111  vtkGetObjectMacro( LastDataSet, vtkDataSet );
112 
114 
117  vtkGetMacro( LastCellId, vtkIdType );
118  virtual void SetLastCellId( vtkIdType c ) { this->LastCellId = c; }
120 
124  virtual void SetLastCellId( vtkIdType c, int dataindex ) = 0;
125 
127 
131  vtkGetStringMacro( VectorsSelection );
132  vtkGetMacro(VectorsType,int);
134 
139  void SelectVectors(int fieldAssociation, const char * fieldName );
140 
141 
143 
160  vtkSetMacro( NormalizeVector, bool );
161  vtkGetMacro( NormalizeVector, bool );
163 
165 
169  vtkSetMacro(ForceSurfaceTangentVector, bool);
170  vtkGetMacro(ForceSurfaceTangentVector, bool);
172 
174 
177  vtkSetMacro(SurfaceDataset, bool);
178  vtkGetMacro(SurfaceDataset, bool);
180 
185  { this->Caching = from->Caching; }
186 
187 
191  int FunctionValues( double * x, double * f ) VTK_OVERRIDE = 0;
192 
196  void ClearLastCellId() { this->LastCellId = -1; }
197 
199 
203  int GetLastWeights( double * w );
204  int GetLastLocalCoordinates( double pcoords[3] );
206 
207 protected:
209  ~vtkAbstractInterpolatedVelocityField() VTK_OVERRIDE;
210 
211  static const double TOLERANCE_SCALE;
212  static const double SURFACE_TOLERANCE_SCALE;
213 
214  int CacheHit;
217  bool Caching;
223  double * Weights;
224  double LastPCoords[3];
229  vtkGenericCell * GenCell; // the current cell
230 
231 
233 
236  vtkSetStringMacro( VectorsSelection );
238 
250  virtual int FunctionValues( vtkDataSet * ds, double * x, double * f );
251 
255  virtual bool CheckPCoords(double pcoords[3]);
256 
264  virtual bool FindAndUpdateCell(vtkDataSet* ds, double* x);
265 
268 
274  void FastCompute( vtkDataArray * vectors, double f[3] );
275  bool InterpolatePoint( vtkPointData * outPD, vtkIdType outIndex );
277  { return ( this->LastCellId != -1 ) ? this->GenCell : nullptr; }
279 
280 private:
282  ( const vtkAbstractInterpolatedVelocityField & ) VTK_DELETE_FUNCTION;
283  void operator = ( const vtkAbstractInterpolatedVelocityField & ) VTK_DELETE_FUNCTION;
284 };
285 
286 
287 
288 #endif
A helper class for interpolating between times during particle tracing.
represent and manipulate point attribute data
Definition: vtkPointData.h:37
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
An abstract class for obtaining the interpolated velocity values at a point.
int vtkIdType
Definition: vtkType.h:345
virtual int FunctionValues(double *x, double *f)=0
Evaluate functions at x_j.
provides thread-safe access to cells
virtual void CopyParameters(vtkAbstractInterpolatedVelocityField *from)
Import parameters.
void ClearLastCellId()
Set the last cell id to -1 to incur a global cell search for the next point.
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:39
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkGenericCell * GetLastCell()
If all weights have been computed (parametric coords etc all valid), a scalar/vector can be quickly i...
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
Abstract interface for sets of functions.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
virtual void SetLastCellId(vtkIdType c)
Get/Set the id of the cell cached from last evaluation.
bool InterpolatePoint(vtkPointData *outPD1, vtkPointData *outPD2, vtkIdType outIndex)