VTK  9.7.1
vtkDGQuad.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
14 #ifndef vtkDGQuad_h
15 #define vtkDGQuad_h
16 
17 #include "vtkFiltersCellGridModule.h" // for export macro
18 
19 #include "vtkDeRhamCell.h"
20 #include "vtkStringToken.h" // for vtkStringToken::Hash
21 
22 VTK_ABI_NAMESPACE_BEGIN
23 class vtkCellGrid;
25 class vtkCellAttribute;
26 
27 class VTKFILTERSCELLGRID_EXPORT vtkDGQuad : public vtkDeRhamCell
28 {
29 public:
30  static vtkDGQuad* New();
31 
32  vtkTypeMacro(vtkDGQuad, vtkDeRhamCell);
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
42  double GetSignedParametricDistance(const vtkVector3d& rst) const override;
43  Shape GetShape() const override { return Shape::Quadrilateral; }
44  int GetDimension() const override { return Dimension; }
45  const std::array<double, 3>& GetCornerParameter(int corner) const override;
46  int GetNumberOfSideTypes() const override;
47  std::pair<int, int> GetSideRangeForType(int sideType) const override;
48  int GetNumberOfSidesOfDimension(int dimension) const override;
49  const std::vector<vtkIdType>& GetSideConnectivity(int side) const override;
50  const std::vector<vtkIdType>& GetSidesOfSide(int side) const override;
51  Shape GetSideShape(int side) const override;
53 
54  vtkTypeFloat32Array* GetReferencePoints() const override;
55  vtkTypeInt32Array* GetSideConnectivity() const override;
56  vtkTypeInt32Array* GetSideOffsetsAndShapes() const override;
57 
58  static constexpr int Dimension = 2;
59  static const std::array<std::array<double, 3>, 4> Parameters;
60  static const std::array<std::vector<vtkIdType>, 9> Sides;
61  static const std::array<std::vector<vtkIdType>, 9> SidesOfSides;
62  static const std::array<int, Dimension + 2> SideOffsets;
63  static const std::array<Shape, Dimension + 2> SideShapes;
64 
65 protected:
66  vtkDGQuad();
67  ~vtkDGQuad() override;
68 
69 private:
70  vtkDGQuad(const vtkDGQuad&) = delete;
71  void operator=(const vtkDGQuad&) = delete;
72 };
73 
74 VTK_ABI_NAMESPACE_END
75 #endif
vtkInheritanceHierarchyOverrideMacro(vtkDeRhamCell)
virtual std::pair< int, int > GetSideRangeForType(int sideType) const =0
Return the range of sides of the ii-th type, where ii is in [-2, this->GetNumberOfSideTypes()[.
virtual double GetSignedParametricDistance(const vtkVector3d &rst) const =0
Return the signed parametric distance of rst from the reference element boundary. ...
virtual int GetNumberOfSidesOfDimension(int dimension) const =0
Return the number of boundaries this type of cell has of a given dimension.
static const std::array< Shape, Dimension+2 > SideShapes
Definition: vtkDGQuad.h:63
RealT rst
Definition: TetF2Basis.h:17
static const std::array< int, Dimension+2 > SideOffsets
Definition: vtkDGQuad.h:62
virtual vtkTypeInt32Array * GetSideOffsetsAndShapes() const =0
Return a singleton array initialized with 2-tuples of (offset, shape) values.
Metadata for a discontinuous Galerkin quadrilateral.
Definition: vtkDGQuad.h:27
Visualization data composed of cells of arbitrary type.
Definition: vtkCellGrid.h:48
Shape GetShape() const override
Definition: vtkDGQuad.h:43
static const std::array< std::vector< vtkIdType >, 9 > SidesOfSides
Definition: vtkDGQuad.h:61
virtual vtkTypeInt32Array * GetSideConnectivity() const =0
Return a singleton array initialized with point-ids of each side's corners.
a simple class to control print indentation
Definition: vtkIndent.h:28
A function defined over the physical domain of a vtkCellGrid.
virtual Shape GetSideShape(int side) const =0
For a given side, return its cell shape.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int GetNumberOfSideTypes() const =0
Return the number of different side shapes of this cell type.
represent and manipulate attribute data in a dataset
static const std::array< std::array< double, 3 >, 4 > Parameters
Definition: vtkDGQuad.h:59
static const std::array< std::vector< vtkIdType >, 9 > Sides
Definition: vtkDGQuad.h:60
virtual const std::vector< vtkIdType > & GetSidesOfSide(int side) const =0
Return a vector of side IDs given an input side ID.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Base class for cells that form 2-d or 3-d DeRham complexes.
Definition: vtkDeRhamCell.h:25
virtual const std::array< double, 3 > & GetCornerParameter(int corner) const =0
Return the coordinates of the reference element's corner vertex.
virtual vtkTypeFloat32Array * GetReferencePoints() const =0
Return a singleton array initialized with the reference-cell's corner point coordinates.
int GetDimension() const override
Definition: vtkDGQuad.h:44
Shape
All possible shapes for DG cells.
Definition: vtkDGCell.h:70