VTK  9.7.1
vtkDGOperationState.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
3 #ifndef vtkDGOperationState_h
4 #define vtkDGOperationState_h
5 
6 #include "vtkDGCell.h"
7 #include "vtkFiltersCellGridModule.h" // For export macro.
8 
9 #include <array>
10 
11 VTK_ABI_NAMESPACE_BEGIN
12 
14 
25 class VTKFILTERSCELLGRID_EXPORT vtkDGOperationState
26 {
27 public:
29  // Attribute arrays/operation
30  vtkDGOperatorEntry& op, vtkDataArray* connectivity, vtkDataArray* values,
31  vtkDataArray* sideConn, vtkTypeUInt64 offset,
32  // Shape arrays/operation
33  vtkDGOperatorEntry shapeGradient = vtkDGOperatorEntry(),
34  vtkDataArray* shapeConnectivity = nullptr, vtkDataArray* shapeValues = nullptr)
35  : OpEntry(op)
36  , CellConnectivity(connectivity)
37  , CellValues(values)
38  , SideConnectivity(sideConn)
39  , Offset(offset)
40  , ShapeGradientEntry(shapeGradient)
41  , ShapeConnectivity(shapeConnectivity)
42  , ShapeValues(shapeValues)
43  {
44  }
45  vtkDGOperationState(const vtkDGOperationState& other) = default;
46  virtual ~vtkDGOperationState() = default;
47 
48  virtual void CloneInto(vtkDGOperationStateEntryBase& entry) const = 0;
49 
54  vtkTypeUInt64 Offset;
55  mutable std::array<vtkTypeUInt64, 2> SideTuple;
56  mutable std::array<double, 3> RST{ { 0, 0, 0 } };
57  mutable std::vector<vtkTypeUInt64> ConnTuple;
58  mutable std::vector<double> ValueTuple;
59  mutable std::vector<double> BasisTuple;
60  mutable vtkTypeUInt64 LastCellId{ ~0ULL };
61  mutable int NumberOfValuesPerFunction{ 0 };
62 
66  mutable std::vector<vtkTypeUInt64> ShapeConnTuple;
67  mutable std::vector<double> ShapeValueTuple;
68  mutable std::vector<double> ShapeBasisTuple;
69  mutable std::vector<double> Jacobian;
70  mutable int NumberOfShapeValuesPerFunction{ 0 };
71  mutable vtkTypeUInt64 LastShapeCellId{ ~0ULL };
72 };
73 
74 VTK_ABI_NAMESPACE_END
75 
76 #endif // vtkDGOperationState_h
77 // VTK-HeaderTest-Exclude: vtkDGOperationState.h
vtkDGOperatorEntry OpEntry
std::vector< double > BasisTuple
std::vector< double > ShapeValueTuple
vtkDataArray * CellConnectivity
std::vector< double > Jacobian
vtkDataArray * CellValues
std::vector< vtkTypeUInt64 > ConnTuple
This is a base class that exists so that vtkDGOperationState can provide a virtual CloneInto method t...
vtkDGOperationState(vtkDGOperatorEntry &op, vtkDataArray *connectivity, vtkDataArray *values, vtkDataArray *sideConn, vtkTypeUInt64 offset, vtkDGOperatorEntry shapeGradient=vtkDGOperatorEntry(), vtkDataArray *shapeConnectivity=nullptr, vtkDataArray *shapeValues=nullptr)
vtkDataArray * ShapeConnectivity
std::vector< double > ShapeBasisTuple
Encapsulate the state required to evaluate DG cell-attributes.
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
vtkDataArray * SideConnectivity
std::vector< double > ValueTuple
A record for a basis in a function space that is specific to one cell shape.
std::vector< vtkTypeUInt64 > ShapeConnTuple
vtkDGOperatorEntry ShapeGradientEntry
std::array< vtkTypeUInt64, 2 > SideTuple
vtkDataArray * ShapeValues