VTK  9.4.20241108
vtkDGInterpolateCalculator.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 vtkDGInterpolateCalculator_h
12#define vtkDGInterpolateCalculator_h
13
14#include "vtkCellAttribute.h" // For CellTypeInfo.
15#include "vtkDGArrayOutputAccessor.h" // For ivars.
16#include "vtkDGArraysInputAccessor.h" // For ivars.
17#include "vtkDGCell.h" // For ivar.
18#include "vtkDGOperation.h" // For ivars.
20#include "vtkSmartPointer.h" // For ivar.
21#include "vtkStringToken.h" // For ivar.
22
23VTK_ABI_NAMESPACE_BEGIN
24
27class vtkDataArray;
28class vtkTypeInt64Array;
29
33class VTKFILTERSCELLGRID_EXPORT vtkDGInterpolateCalculator : public vtkInterpolateCalculator
34{
35public:
38 void PrintSelf(ostream& os, vtkIndent indent) override;
39
40 void Evaluate(vtkIdType cellId, const vtkVector3d& rst, std::vector<double>& value) override;
41 void Evaluate(vtkIdTypeArray* cellIds, vtkDataArray* rst, vtkDataArray* result) override;
42
43 bool AnalyticDerivative() const override;
44 void EvaluateDerivative(vtkIdType cellId, const vtkVector3d& rst, std::vector<double>& jacobian,
45 double neighborhood) override;
47 vtkIdTypeArray* cellIds, vtkDataArray* rst, vtkDataArray* result) override;
48
50 vtkCellMetadata* cell, vtkCellAttribute* field) override;
51
52protected:
53 friend class vtkDGRangeResponder;
55 ~vtkDGInterpolateCalculator() override = default;
56
57 template <bool UseShape>
59 vtkIdType cellId, const vtkVector3d& rst, std::vector<double>& jacobian, double neighborhood);
60
64 vtkDGCell* CellType{ nullptr };
68 vtkCellAttribute* Field{ nullptr };
69
74
81
83 int Dimension{ 3 };
86
91
92private:
94 void operator=(const vtkDGInterpolateCalculator&) = delete;
95};
96
97VTK_ABI_NAMESPACE_END
98#endif // vtkDGInterpolateCalculator_h
RealT rst
Definition TetF2Basis.h:17
A function defined over the physical domain of a vtkCellGrid.
Metadata for a particular type of cell (finite element).
Base class for a discontinuous Galerkin cells of all shapes.
Definition vtkDGCell.h:44
Shape
All possible shapes for DG cells.
Definition vtkDGCell.h:71
@ None
A placeholder for an indeterminate or invalid shape.
Definition vtkDGCell.h:81
Calculate field values at a point in a cell's parametric space.
void EvaluateDerivative(vtkIdTypeArray *cellIds, vtkDataArray *rst, vtkDataArray *result) override
Subclasses may override this method to perform multiple derivative-evaluations at a time.
void EvaluateDerivative(vtkIdType cellId, const vtkVector3d &rst, std::vector< double > &jacobian, double neighborhood) override
Return the derivative of the function at rst.
bool AnalyticDerivative() const override
Return true if the function has an analytic derivative.
vtkDGOperation< vtkDGArraysInputAccessor, vtkDGArrayOutputAccessor > FieldDerivative
Used to compute a field derivative for a cell.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkDGInterpolateCalculator * New()
vtkDGInterpolateCalculator()=default
void Evaluate(vtkIdTypeArray *cellIds, vtkDataArray *rst, vtkDataArray *result) override
Subclasses may override this method to perform multiple evaluations at a time.
void InternalDerivative(vtkIdType cellId, const vtkVector3d &rst, std::vector< double > &jacobian, double neighborhood)
vtkNew< vtkDoubleArray > LocalField
Used when an array passed to Evaluate()/EvaluateDerivative() is not a double-array.
void Evaluate(vtkIdType cellId, const vtkVector3d &rst, std::vector< double > &value) override
Subclasses may override this method to perform multiple evaluations at a time.
vtkCellAttribute::CellTypeInfo FieldCellInfo
The function space, basis, etc.
~vtkDGInterpolateCalculator() override=default
vtkDGOperation< vtkDGArraysInputAccessor, vtkDGArrayOutputAccessor > FieldEvaluator
Used to compute a field value for a cell.
vtkSmartPointer< vtkCellAttributeCalculator > PrepareForGrid(vtkCellMetadata *cell, vtkCellAttribute *field) override
Invoke an operator on DG cells/sides.
Compute the range of a cell-attribute over any vtkDGCell.
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.
Allocate and hold a VTK object.
Definition vtkNew.h:167
Hold a reference to a vtkObjectBase instance.
int vtkIdType
Definition vtkType.h:315