VTK  9.4.20241103
vtkInterpolateCalculator.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
11#ifndef vtkInterpolateCalculator_h
12#define vtkInterpolateCalculator_h
13
15#include "vtkFiltersCellGridModule.h" // For export macro.
16#include "vtkVector.h" // For API.
17
18#include <array>
19#include <string>
20
21VTK_ABI_NAMESPACE_BEGIN
22
23class vtkDataArray;
24class vtkIdTypeArray;
25
29class VTKFILTERSCELLGRID_EXPORT vtkInterpolateCalculator : public vtkCellAttributeCalculator
30{
31public:
33 void PrintSelf(ostream& os, vtkIndent indent) override;
34
41 virtual void Evaluate(vtkIdType cellId, const vtkVector3d& rst, std::vector<double>& value) = 0;
42
44 virtual void Evaluate(vtkIdTypeArray* cellIds, vtkDataArray* rst, vtkDataArray* result) = 0;
45
47 virtual bool AnalyticDerivative() const { return false; }
48
59 virtual void EvaluateDerivative(vtkIdType cellId, const vtkVector3d& rst,
60 std::vector<double>& jacobian, double neighborhood = 1e-3);
61
63 virtual void EvaluateDerivative(
64 vtkIdTypeArray* cellIds, vtkDataArray* rst, vtkDataArray* result) = 0;
65
66#if 0
71 virtual bool IsInside(vtkIdType cellId, const vtkVector3d& rst) = 0;
72#endif
73
74protected:
76 ~vtkInterpolateCalculator() override = default;
77
78private:
80 void operator=(const vtkInterpolateCalculator&) = delete;
81};
82
83VTK_ABI_NAMESPACE_END
84#endif // vtkInterpolateCalculator_h
RealT rst
Definition TetF2Basis.h:17
Perform a per-cell calculation on a vtkCellAttribute.
abstract superclass for arrays of numeric data
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition vtkIndent.h:108
Calculate field values at a point in a cell's parametric space.
virtual void Evaluate(vtkIdTypeArray *cellIds, vtkDataArray *rst, vtkDataArray *result)=0
Subclasses may override this method to perform multiple evaluations at a time.
virtual void Evaluate(vtkIdType cellId, const vtkVector3d &rst, std::vector< double > &value)=0
Subclasses may override this method to perform multiple evaluations at a time.
virtual bool AnalyticDerivative() const
Return true if the function has an analytic derivative.
~vtkInterpolateCalculator() override=default
Subclasses may override this method to perform multiple evaluations at a time.
virtual void EvaluateDerivative(vtkIdTypeArray *cellIds, vtkDataArray *rst, vtkDataArray *result)=0
Subclasses may override this method to perform multiple derivative-evaluations at a time.
vtkInterpolateCalculator()=default
Subclasses may override this method to perform multiple evaluations at a time.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void EvaluateDerivative(vtkIdType cellId, const vtkVector3d &rst, std::vector< double > &jacobian, double neighborhood=1e-3)
Return the derivative of the function at rst.
int vtkIdType
Definition vtkType.h:315