VTK  9.7.1
vtkDGAttributeInformation.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
27 #ifndef vtkDGAttributeInformation_h
28 #define vtkDGAttributeInformation_h
29 
31 #include "vtkVector.h" // For API.
32 
33 VTK_ABI_NAMESPACE_BEGIN
34 
35 class vtkDGCell;
36 
37 class VTKFILTERSCELLGRID_EXPORT vtkDGAttributeInformation : public vtkCellAttributeInformation
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45  int GetBasisOrder() const override { return this->BasisOrder; }
46 
52  int GetBasisValueSize() const override { return this->BasisValueSize; }
53 
55  int GetNumberOfBasisFunctions() const override { return this->NumberOfBasisFunctions; }
56 
66  int GetDegreeOfFreedomSize() const override { return this->DegreeOfFreedomSize; }
67 
74  bool GetSharedDegreesOfFreedom() const override { return this->SharedDegreesOfFreedom; }
75 
78  std::string GetBasisName() const override { return this->BasisName; }
79 
83  static std::string BasisShapeName(vtkDGCell* cellType);
84 
86  vtkCellMetadata* cell, vtkCellAttribute* attribute) override;
87 
88 protected:
89  vtkDGAttributeInformation() = default;
90  ~vtkDGAttributeInformation() override = default;
91 
92  int BasisOrder{ 0 };
93  int BasisValueSize{ 1 };
94  int NumberOfBasisFunctions{ 1 };
95  int DegreeOfFreedomSize{ 1 };
96  bool SharedDegreesOfFreedom{ true };
98 
99 private:
101  void operator=(const vtkDGAttributeInformation&) = delete;
102 };
103 
104 VTK_ABI_NAMESPACE_END
105 #endif // vtkDGAttributeInformation_h
virtual vtkSmartPointer< vtkCellAttributeCalculator > PrepareForGrid(vtkCellMetadata *cell, vtkCellAttribute *field)
Subclasses should override this to create an instance of their class with member variables set to per...
int GetBasisOrder() const override
Return the polynomial order of the interpolant.
Provide information about a cell attribute's basis functions on one cell type.
bool GetSharedDegreesOfFreedom() const override
Return whether degrees of freedom are shared by multiple cells or not.
static vtkCellAttributeCalculator * New()
int GetNumberOfBasisFunctions() const override
Return the number of basis functions for the cell type in question.
Metadata for a particular type of cell (finite element).
int GetDegreeOfFreedomSize() const override
Return the number of times each basis function should be applied to obtain an attribute value...
int GetBasisValueSize() const override
Return the number of components of each basis function.
a simple class to control print indentation
Definition: vtkIndent.h:28
A function defined over the physical domain of a vtkCellGrid.
Base class for a discontinuous Galerkin cells of all shapes.
Definition: vtkDGCell.h:43
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Provide information about a cell attribute's basis functions on one cell type.
std::string GetBasisName() const override
Return the name of a basis function specific to the cell-metadata and cell-attribute.