VTK  9.3.1
vtkAMRInterpolatedVelocityField.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
15 #ifndef vtkAMRInterpolatedVelocityField_h
16 #define vtkAMRInterpolatedVelocityField_h
17 
18 #include "vtkFiltersFlowPathsModule.h" // For export macro
19 
21 
22 VTK_ABI_NAMESPACE_BEGIN
23 class vtkOverlappingAMR;
24 
25 class VTKFILTERSFLOWPATHS_EXPORT vtkAMRInterpolatedVelocityField
27 {
28 public:
30 
35  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
39 
43  virtual void SetAmrDataSet(vtkOverlappingAMR*);
44  vtkGetObjectMacro(AmrDataSet, vtkOverlappingAMR);
45  void SetAMRData(vtkOverlappingAMR* amr) { this->SetAmrDataSet(amr); }
47 
55 
59  void SetLastCellId(vtkIdType c) override { this->Superclass::SetLastCellId(c); }
60 
72  int FunctionValues(double* x, double* f) override;
73 
77  static bool FindGrid(
78  double q[3], vtkOverlappingAMR* amrds, unsigned int& level, unsigned int& gridId);
79 
81 
84  bool GetLastDataSetLocation(unsigned int& level, unsigned int& id);
85  bool SetLastDataSet(int level, int id);
86  void SetLastCellId(vtkIdType c, int dataindex) override;
88 
89 protected:
91  int LastLevel;
92  int LastId;
93 
96  int FunctionValues(vtkDataSet* ds, double* x, double* f) override
97  {
98  return this->Superclass::FunctionValues(ds, x, f);
99  }
100 
107  int SelfInitialize() override;
108 
109 private:
111  void operator=(const vtkAMRInterpolatedVelocityField&) = delete;
112 };
113 
114 VTK_ABI_NAMESPACE_END
115 #endif
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
int FunctionValues(vtkDataSet *ds, double *x, double *f) override
Evaluate the velocity field f at point (x, y, z) in a specified dataset by invoking vtkDataSet::FindC...
An abstract class for obtaining the interpolated velocity values at a point.
void SetAMRData(vtkOverlappingAMR *amr)
Specify the AMR dataset to process.
int vtkIdType
Definition: vtkType.h:315
virtual int SelfInitialize()
These methods pertain to initializing the vector field by subclasses (which may have special initiali...
virtual void CopyParameters(vtkAbstractInterpolatedVelocityField *from)
Copy essential parameters between instances of this class.
a simple class to control print indentation
Definition: vtkIndent.h:28
int FunctionValues(double *x, double *f) override=0
Evaluate the velocity field f at point (x, y, z).
void SetLastCellId(vtkIdType c) override
Set the cell id cached by the last evaluation.
virtual int FunctionValues(double *x, double *f)
Evaluate functions at x_j.
virtual void SetLastCellId(vtkIdType c)
Get/Set the id of the cell cached from last evaluation.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for obtaining type information and printing the object state.
hierarchical dataset of vtkUniformGrids
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
A concrete class for obtaining the interpolated velocity values at a point in AMR data...