VTK  9.4.20241108
vtkDGWdg.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 vtkDGWdg_h
15#define vtkDGWdg_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 vtkDGWdg : public vtkDeRhamCell
28{
29public:
30 static vtkDGWdg* New();
31
32 vtkTypeMacro(vtkDGWdg, 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::Wedge; }
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 = 3;
59 static const std::array<std::array<double, 3>, 6> Parameters;
60 static const std::array<std::vector<vtkIdType>, 21> Sides;
61 static const std::array<std::vector<vtkIdType>, 21> SidesOfSides;
62 static const std::array<int, Dimension + 3> SideOffsets;
63 static const std::array<Shape, Dimension + 3> SideShapes;
64 // Because wedges have sides of different types but the same dimension,
65 // we store a table of the number of sides by dimension rather than computing
66 // these values based on SideOffsets/SideShapes entries:
67 static const std::array<int, Dimension + 1> SidesOfDimension;
68
69protected:
71 ~vtkDGWdg() override;
72
73private:
74 vtkDGWdg(const vtkDGWdg&) = delete;
75 void operator=(const vtkDGWdg&) = delete;
76};
77
78VTK_ABI_NAMESPACE_END
79#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
@ Wedge
A volumetric, triangular prism.
Definition vtkDGCell.h:78
Metadata for a discontinuous Galerkin wedge.
Definition vtkDGWdg.h:28
static const std::array< int, Dimension+3 > SideOffsets
Definition vtkDGWdg.h:62
vtkInheritanceHierarchyOverrideMacro(vtkDGWdg)
const std::vector< vtkIdType > & GetSideConnectivity(int side) const override
static const std::array< std::vector< vtkIdType >, 21 > SidesOfSides
Definition vtkDGWdg.h:61
static const std::array< std::array< double, 3 >, 6 > Parameters
Definition vtkDGWdg.h:59
const std::vector< vtkIdType > & GetSidesOfSide(int side) const override
static vtkDGWdg * New()
int GetDimension() const override
Definition vtkDGWdg.h:44
Shape GetShape() const override
Definition vtkDGWdg.h:43
static const std::array< std::vector< vtkIdType >, 21 > Sides
Definition vtkDGWdg.h:60
static const std::array< int, Dimension+1 > SidesOfDimension
Definition vtkDGWdg.h:67
std::pair< int, int > GetSideRangeForType(int sideType) const override
const std::array< double, 3 > & GetCornerParameter(int corner) const override
int GetNumberOfSidesOfDimension(int dimension) const override
vtkTypeFloat32Array * GetReferencePoints() const override
Return a singleton array initialized with the reference-cell's corner point coordinates.
static const std::array< Shape, Dimension+3 > SideShapes
Definition vtkDGWdg.h:63
Shape GetSideShape(int side) const override
int GetNumberOfSideTypes() const override
~vtkDGWdg() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool IsInside(const vtkVector3d &rst, double tolerance) override
vtkTypeInt32Array * GetSideOffsetsAndShapes() const override
Return a singleton array initialized with 2-tuples of (offset, shape) values.
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