VTK  9.4.20241108
vtkDGTri.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 vtkDGTri_h
15#define vtkDGTri_h
16
17#include "vtkFiltersCellGridModule.h" // for export macro
18
19#include "vtkDeRhamCell.h"
20#include "vtkStringToken.h" // for vtkStringToken::Hash
21
22VTK_ABI_NAMESPACE_BEGIN
23class vtkCellGrid;
26
27class VTKFILTERSCELLGRID_EXPORT vtkDGTri : public vtkDeRhamCell
28{
29public:
30 static vtkDGTri* New();
31
32 vtkTypeMacro(vtkDGTri, vtkDeRhamCell);
34 void PrintSelf(ostream& os, vtkIndent indent) override;
35
42 bool IsInside(const vtkVector3d& rst, double tolerance) override;
43 Shape GetShape() const override { return Shape::Triangle; }
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>, 3> Parameters;
60 static const std::array<std::vector<vtkIdType>, 7> Sides;
61 static const std::array<std::vector<vtkIdType>, 7> SidesOfSides;
62 static const std::array<int, Dimension + 2> SideOffsets;
63 static const std::array<Shape, Dimension + 2> SideShapes;
64
65protected:
67 ~vtkDGTri() override;
68
69private:
70 vtkDGTri(const vtkDGTri&) = delete;
71 void operator=(const vtkDGTri&) = delete;
72};
73
74VTK_ABI_NAMESPACE_END
75#endif
RealT rst
Definition TetF2Basis.h:17
A function defined over the physical domain of a vtkCellGrid.
Visualization data composed of cells of arbitrary type.
Definition vtkCellGrid.h:49
Shape
All possible shapes for DG cells.
Definition vtkDGCell.h:71
@ Triangle
A three-cornered face bounded by 3 edges.
Definition vtkDGCell.h:74
Metadata for a discontinuous Galerkin triangle.
Definition vtkDGTri.h:28
bool IsInside(const vtkVector3d &rst, double tolerance) override
static const std::array< std::array< double, 3 >, 3 > Parameters
Definition vtkDGTri.h:59
vtkTypeInt32Array * GetSideOffsetsAndShapes() const override
Return a singleton array initialized with 2-tuples of (offset, shape) values.
Shape GetShape() const override
Definition vtkDGTri.h:43
static const std::array< int, Dimension+2 > SideOffsets
Definition vtkDGTri.h:62
int GetNumberOfSidesOfDimension(int dimension) const override
~vtkDGTri() override
int GetNumberOfSideTypes() const override
Shape GetSideShape(int side) const override
int GetDimension() const override
Definition vtkDGTri.h:44
std::pair< int, int > GetSideRangeForType(int sideType) const override
static const std::array< Shape, Dimension+2 > SideShapes
Definition vtkDGTri.h:63
static const std::array< std::vector< vtkIdType >, 7 > Sides
Definition vtkDGTri.h:60
static const std::array< std::vector< vtkIdType >, 7 > SidesOfSides
Definition vtkDGTri.h:61
const std::vector< vtkIdType > & GetSideConnectivity(int side) const override
vtkInheritanceHierarchyOverrideMacro(vtkDGTri)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeFloat32Array * GetReferencePoints() const override
Return a singleton array initialized with the reference-cell's corner point coordinates.
static vtkDGTri * New()
const std::vector< vtkIdType > & GetSidesOfSide(int side) const override
const std::array< double, 3 > & GetCornerParameter(int corner) const override
vtkTypeInt32Array * GetSideConnectivity() const override
Return a singleton array initialized with point-ids of each side's corners.
represent and manipulate attribute data in a dataset
Base class for cells that form 2-d or 3-d DeRham complexes.
a simple class to control print indentation
Definition vtkIndent.h:108