VTK: Filters/CellGrid/vtkDGTet.h Source File

| VTK 9.3.1

vtkDGTet.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 vtkDGTet_h
15 #define vtkDGTet_h
16
17 #include "vtkFiltersCellGridModule.h" // for export macro
18
19 #include "vtkDGCell.h"
20 #include "vtkStringToken.h" // for vtkStringToken::Hash
21
22 VTK_ABI_NAMESPACE_BEGIN
23 class vtkCellGrid;
24 class vtkDataSetAttributes;
25 class vtkCellAttribute;
26
27 class VTKFILTERSCELLGRID_EXPORT vtkDGTet : public vtkDGCell
28 {
29 public:
30 using CellTypeId = std::size_t;
31 using DOFType = vtkStringToken;
32 static vtkDGTet* New();
33
34 vtkTypeMacro(vtkDGTet, vtkDGCell);
35 void PrintSelf(ostream& os, vtkIndent indent) override;
36
37 vtkIdType GetNumberOfCells() override;
38
39 Shape GetShape() const override { return Shape::Tetrahedron; }
40 int GetDimension() const override { return this->Dimension; }
41 int GetNumberOfCorners() const override { return 4; }
42 const std::array<double, 3>& GetCornerParameter(int corner) const override;
43 int GetNumberOfSideTypes() const override;
44 std::pair<int, int> GetSideRangeForType(int sideType) const override;
45 int GetNumberOfSidesOfDimension(int dimension) const override;
46 const std::vector<vtkIdType>& GetSideConnectivity(int side) const override;
47 Shape GetSideShape(int side) const override;
48
49 vtkTypeFloat32Array* GetReferencePoints() const override;
50 vtkTypeInt32Array* GetSideConnectivity() const override;
51 vtkTypeInt32Array* GetSideOffsetsAndShapes() const override;
52
53 static constexpr int Dimension = 3;
54 static const std::array<std::array<double, 3>, 4> Parameters;
55 static const std::array<std::vector<vtkIdType>, 14> Sides;
56 static const std::array<int, vtkDGTet::Dimension + 1> SideOffsets;
57 static const std::array<Shape, Dimension + 1> SideShapes;
58
59 protected:
60 vtkDGTet();
61 ~vtkDGTet() override;
62
63 private:
64 vtkDGTet(const vtkDGTet&) = delete;
65 void operator=(const vtkDGTet&) = delete;
66 };
67
68 VTK_ABI_NAMESPACE_END
69 #endif
vtkCellAttribute
A function defined over the physical domain of a vtkCellGrid.
Definition: vtkCellAttribute.h:32
vtkCellGrid
Visualization data composed of cells of arbitrary type.
Definition: vtkCellGrid.h:42
vtkCellMetadata::CellTypeId
vtkStringToken::Hash CellTypeId
Definition: vtkCellMetadata.h:48
vtkDGCell
Base class for a discontinuous Galerkin cells of all shapes.
Definition: vtkDGCell.h:37
vtkDGCell::Shape
Shape
All possible shapes for DG cells.
Definition: vtkDGCell.h:44
vtkDGTet
Metadata for a discontinuous Galerkin tetrahedron.
Definition: vtkDGTet.h:28
vtkDGTet::SideOffsets
static const std::array< int, vtkDGTet::Dimension+1 > SideOffsets
Definition: vtkDGTet.h:56
vtkDGTet::GetSideOffsetsAndShapes
vtkTypeInt32Array * GetSideOffsetsAndShapes() const override
Return a singleton array initialized with 2-tuples of (offset, shape) values.
vtkDGTet::Parameters
static const std::array< std::array< double, 3 >, 4 > Parameters
Definition: vtkDGTet.h:54
vtkDGTet::GetSideConnectivity
vtkTypeInt32Array * GetSideConnectivity() const override
Return a singleton array initialized with point-ids of each side's corners.
vtkDGTet::GetSideShape
Shape GetSideShape(int side) const override
For a given side, return its cell shape.
vtkDGTet::Sides
static const std::array< std::vector< vtkIdType >, 14 > Sides
Definition: vtkDGTet.h:55
vtkDGTet::GetShape
Shape GetShape() const override
Return the topological shape of this cell type.
Definition: vtkDGTet.h:39
vtkDGTet::GetNumberOfSidesOfDimension
int GetNumberOfSidesOfDimension(int dimension) const override
Return the number of boundaries this type of cell has of a given dimension.
vtkDGTet::New
static vtkDGTet * New()
vtkDGTet::~vtkDGTet
~vtkDGTet() override
vtkDGTet::GetNumberOfCells
vtkIdType GetNumberOfCells() override
Return the number of cells of this type in the parent cell-grid object.
vtkDGTet::GetDimension
int GetDimension() const override
Return the parametric dimension of this cell type (0, 1, 2, or 3).
Definition: vtkDGTet.h:40
vtkDGTet::vtkDGTet
vtkDGTet()
vtkDGTet::GetSideConnectivity
const std::vector< vtkIdType > & GetSideConnectivity(int side) const override
Return the connectivity of the given side.
vtkDGTet::GetReferencePoints
vtkTypeFloat32Array * GetReferencePoints() const override
Return a singleton array initialized with the reference-cell's corner point coordinates.
vtkDGTet::GetCornerParameter
const std::array< double, 3 > & GetCornerParameter(int corner) const override
Return the coordinates of the reference element's corner vertex.
vtkDGTet::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDGTet::SideShapes
static const std::array< Shape, Dimension+1 > SideShapes
Definition: vtkDGTet.h:57
vtkDGTet::GetNumberOfSideTypes
int GetNumberOfSideTypes() const override
Return the number of different side shapes of this cell type.
vtkDGTet::GetSideRangeForType
std::pair< int, int > GetSideRangeForType(int sideType) const override
Return the range of sides of the ii-th type, where ii is in [0, this->GetNumberOfSideTypes()[.
vtkDGTet::GetNumberOfCorners
int GetNumberOfCorners() const override
Return the number of corner points for this cell type.
Definition: vtkDGTet.h:41
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:65
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkStringToken
Represent a string by its integer hash.
Definition: vtkStringToken.h:34
vtkX3D::side
@ side
Definition: vtkX3D.h:475
vtkDGCell.h
vtkStringToken.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315