VTK  9.6.20260626
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
10
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 "vtkSMPThreadLocal.h" // For thread-local data
21#include "vtkSmartPointer.h" // For ivar.
22#include "vtkStringToken.h" // For ivar.
23
24VTK_ABI_NAMESPACE_BEGIN
25
28class vtkDoubleArray;
29class vtkDataArray;
30class vtkIdTypeArray;
31class vtkTypeInt64Array;
32
36class VTKFILTERSCELLGRID_EXPORT vtkDGInterpolateCalculator : public vtkInterpolateCalculator
37{
38public:
41 void PrintSelf(ostream& os, vtkIndent indent) override;
42
43 void Evaluate(vtkIdType cellId, const vtkVector3d& rst, std::vector<double>& value) override;
44 void Evaluate(vtkIdTypeArray* cellIds, vtkDataArray* rst, vtkDataArray* result) override;
45
46 bool AnalyticDerivative() const override;
47 void EvaluateDerivative(vtkIdType cellId, const vtkVector3d& rst, std::vector<double>& jacobian,
48 double neighborhood) override;
50 vtkIdTypeArray* cellIds, vtkDataArray* rst, vtkDataArray* result) override;
51
53 vtkCellMetadata* cell, vtkCellAttribute* field) override;
54
55protected:
56 friend class vtkDGRangeResponder;
58 ~vtkDGInterpolateCalculator() override = default;
59
60 template <bool UseShape>
62 vtkIdType cellId, const vtkVector3d& rst, std::vector<double>& jacobian, double neighborhood);
63
67 vtkDGCell* CellType{ nullptr };
72
109
111
113 int Dimension{ 3 };
116
121
122private:
124 void operator=(const vtkDGInterpolateCalculator&) = delete;
125};
126
127VTK_ABI_NAMESPACE_END
128#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).
Store values interpolated from DG cells into a vtkDoubleArray instance.
Evaluate DG cells whose indices and parameters are provided by vtkDataArray instances.
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
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.
int Dimension
The parametric dimension of the current cell-type.
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)
vtkDGCell::Shape CellShape
The shape of the current cell type.
vtkCellAttribute * Field
The cell-attribute for which interpolation will be performed.
vtkSMPThreadLocal< ThreadLocalData > LocalData
void Evaluate(vtkIdType cellId, const vtkVector3d &rst, std::vector< double > &value) override
vtkCellAttribute::CellTypeInfo FieldCellInfo
The function space, basis, etc.
~vtkDGInterpolateCalculator() override=default
vtkSmartPointer< vtkCellAttributeCalculator > PrepareForGrid(vtkCellMetadata *cell, vtkCellAttribute *field) override
Subclasses should override this to create an instance of their class with member variables set to per...
vtkDGCell * CellType
The cell-type for which interpolation will be performed.
Invoke an operator on DG cells/sides.
Compute the range of a cell-attribute over any vtkDGCell.
dynamic, self-adjusting array of double
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition vtkIndent.h:108
vtkInterpolateCalculator()=default
Thread local storage for VTK objects.
Hold a reference to a vtkObjectBase instance.
void Swap(ThreadLocalData &other)
void EnsureInitialized(vtkDGCell *cellType, vtkCellAttribute *field)
ThreadLocalData & operator=(ThreadLocalData other)
vtkSmartPointer< vtkDoubleArray > LocalField
Used when an array passed to Evaluate()/EvaluateDerivative() is not a double-array.
vtkDGOperation< vtkDGArraysInputAccessor, vtkDGArrayOutputAccessor > FieldEvaluator
Used to compute a field value for a cell.
vtkDGOperation< vtkDGArraysInputAccessor, vtkDGArrayOutputAccessor > FieldDerivative
Used to compute a field derivative for a cell.
ThreadLocalData(const ThreadLocalData &other)
#define vtkDataArray
int vtkIdType
Definition vtkType.h:363