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=========================================================================*/
23
24#ifndef vtkAMRInterpolatedVelocityField_h
25#define vtkAMRInterpolatedVelocityField_h
26
27#include "vtkFiltersFlowPathsModule.h" // For export macro
28
30
32
33class VTKFILTERSFLOWPATHS_EXPORT vtkAMRInterpolatedVelocityField
35{
36public:
38
43 void PrintSelf(ostream& os, vtkIndent indent) override;
45
47
52 vtkGetObjectMacro(AmrDataSet, vtkOverlappingAMR);
53 void SetAMRData(vtkOverlappingAMR* amr) { this->SetAmrDataSet(amr); }
55
63
67 void SetLastCellId(vtkIdType c) override { this->Superclass::SetLastCellId(c); }
68
69 using Superclass::FunctionValues;
80 int FunctionValues(double* x, double* f) override;
81
85 static bool FindGrid(
86 double q[3], vtkOverlappingAMR* amrds, unsigned int& level, unsigned int& gridId);
87
89
92 bool GetLastDataSetLocation(unsigned int& level, unsigned int& id);
93 bool SetLastDataSet(int level, int id);
94 void SetLastCellId(vtkIdType c, int dataindex) override;
96
97protected:
101
104 int FunctionValues(vtkDataSet* ds, double* x, double* f) override
105 {
106 return this->Superclass::FunctionValues(ds, x, f);
107 }
108
115 int SelfInitialize() override;
116
117private:
119 void operator=(const vtkAMRInterpolatedVelocityField&) = delete;
120};
121
122#endif
bool SetLastDataSet(int level, int id)
Methods to support local caching while searching for AMR datasets.
virtual void SetAmrDataSet(vtkOverlappingAMR *)
Specify the AMR dataset to process.
bool GetLastDataSetLocation(unsigned int &level, unsigned int &id)
Methods to support local caching while searching for AMR datasets.
void CopyParameters(vtkAbstractInterpolatedVelocityField *from) override
Copy essential parameters between instances of this class.
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...
static bool FindGrid(double q[3], vtkOverlappingAMR *amrds, unsigned int &level, unsigned int &gridId)
Helper function to locator the grid within an AMR dataset.
int FunctionValues(double *x, double *f) override
Evaluate the velocity field f at point p.
static vtkAMRInterpolatedVelocityField * New()
Standard methods for obtaining type information and printing the object state.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for obtaining type information and printing the object state.
void SetLastCellId(vtkIdType c) override
Set the cell id cached by the last evaluation.
void SetAMRData(vtkOverlappingAMR *amr)
Specify the AMR dataset to process.
void SetLastCellId(vtkIdType c, int dataindex) override
Methods to support local caching while searching for AMR datasets.
int SelfInitialize() override
Method to initialize the velocity field.
virtual void SetLastCellId(vtkIdType c)
Get/Set the id of the cell cached from last evaluation.
abstract class to specify dataset behavior
Definition vtkDataSet.h:57
virtual int FunctionValues(double *x, double *f)
Evaluate functions at x_j.
a simple class to control print indentation
Definition vtkIndent.h:34
hierarchical dataset of vtkUniformGrids
int vtkIdType
Definition vtkType.h:332