VTK  9.3.0
vtkCompositeInterpolatedVelocityField.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
26 #ifndef vtkCompositeInterpolatedVelocityField_h
27 #define vtkCompositeInterpolatedVelocityField_h
28 
30 #include "vtkFiltersFlowPathsModule.h" // For export macro
31 
32 #include <array> // For array
33 #include <vector> // For vector
34 
35 VTK_ABI_NAMESPACE_BEGIN
36 class vtkDataSet;
37 
38 class VTKFILTERSFLOWPATHS_EXPORT vtkCompositeInterpolatedVelocityField
40 {
41 public:
43 
47  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
54 
62  virtual void AddDataSet(vtkDataSet* dataset, size_t maxCellSize = 0);
63 
68  int FunctionValues(double* x, double* f) override;
69 
73  int InsideTest(double* x);
74 
78  virtual int SnapPointOnCell(double* pOrigin, double* pProj);
79 
83  void SetLastCellId(vtkIdType c, int dataindex) override;
84 
88  void SetLastCellId(vtkIdType c) override { this->Superclass::SetLastCellId(c); }
89 
91 
98  vtkGetMacro(LastDataSetIndex, int);
100 
102 
105  vtkGetMacro(CacheDataSetHit, int);
106  vtkGetMacro(CacheDataSetMiss, int);
108 
114 
115 protected:
118 
127  int FunctionValues(vtkDataSet* ds, double* x, double* f) override
128  {
129  return this->Superclass::FunctionValues(ds, x, f);
130  }
131 
136  {
138  std::array<double, 6> Bounds{};
141  };
142  std::vector<DataSetBoundsInformation> DataSetsBoundsInfo;
143 
144 private:
146  void operator=(const vtkCompositeInterpolatedVelocityField&) = delete;
147 };
148 
149 VTK_ABI_NAMESPACE_END
150 #endif
An abstract class for obtaining the interpolated velocity values at a point.
An abstract class for obtaining the interpolated velocity values at a point.
static vtkCompositeInterpolatedVelocityField * New()
Construct a vtkCompositeInterpolatedVelocityField class.
void SetLastCellId(vtkIdType c, int dataindex) override
Set the cell id cached by the last evaluation within a specified dataset.
int FunctionValues(vtkDataSet *ds, double *x, double *f) override
Evaluate the velocity field f at point (x, y, z) in a specified dataset by either involving vtkPointL...
std::vector< DataSetBoundsInformation > DataSetsBoundsInfo
void SetLastCellId(vtkIdType c) override
Set the cell id cached by the last evaluation.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for type information and printing.
virtual void AddDataSet(vtkDataSet *dataset, size_t maxCellSize=0)
Add a dataset for implicit velocity function evaluation.
void CopyParameters(vtkAbstractInterpolatedVelocityField *from) override
Copy essential parameters between instances of this class.
int FunctionValues(double *x, double *f) override
Evaluate the velocity field f at point (x, y, z).
int InsideTest(double *x)
Check if point x is inside the dataset.
virtual int SnapPointOnCell(double *pOrigin, double *pProj)
Project the provided point on current cell, current dataset.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
virtual int FunctionValues(double *x, double *f)
Evaluate functions at x_j.
a simple class to control print indentation
Definition: vtkIndent.h:38
A helper class for interpolating between times during particle tracing.
int vtkIdType
Definition: vtkType.h:315