VTK  9.2.6
vtkAMRInterpolatedVelocityField.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAMRInterpolatedVelocityField.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 =========================================================================*/
27 #ifndef vtkAMRInterpolatedVelocityField_h
28 #define vtkAMRInterpolatedVelocityField_h
29 
30 #include "vtkFiltersFlowPathsModule.h" // For export macro
31 
33 
34 class vtkOverlappingAMR;
35 
36 class VTKFILTERSFLOWPATHS_EXPORT vtkAMRInterpolatedVelocityField
38 {
39 public:
41 
46  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
54  virtual void SetAmrDataSet(vtkOverlappingAMR*);
55  vtkGetObjectMacro(AmrDataSet, vtkOverlappingAMR);
56  void SetAMRData(vtkOverlappingAMR* amr) { this->SetAmrDataSet(amr); }
58 
66 
70  void SetLastCellId(vtkIdType c) override { this->Superclass::SetLastCellId(c); }
71 
83  int FunctionValues(double* x, double* f) override;
84 
88  static bool FindGrid(
89  double q[3], vtkOverlappingAMR* amrds, unsigned int& level, unsigned int& gridId);
90 
92 
95  bool GetLastDataSetLocation(unsigned int& level, unsigned int& id);
96  bool SetLastDataSet(int level, int id);
97  void SetLastCellId(vtkIdType c, int dataindex) override;
99 
100 protected:
103  int LastId;
104 
107  int FunctionValues(vtkDataSet* ds, double* x, double* f) override
108  {
109  return this->Superclass::FunctionValues(ds, x, f);
110  }
111 
118  int SelfInitialize() override;
119 
120 private:
122  void operator=(const vtkAMRInterpolatedVelocityField&) = delete;
123 };
124 
125 #endif
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
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:332
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:39
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...