VTK  9.4.20241108
vtkDGHex.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 vtkDGHex_h
15#define vtkDGHex_h
16
17#include "vtkDeRhamCell.h"
18#include "vtkStringToken.h" // for vtkStringToken::Hash
19
20VTK_ABI_NAMESPACE_BEGIN
21class vtkCellGrid;
24
25class VTKFILTERSCELLGRID_EXPORT vtkDGHex : public vtkDeRhamCell
26{
27public:
28 static vtkDGHex* New();
29
30 vtkTypeMacro(vtkDGHex, vtkDeRhamCell);
32 void PrintSelf(ostream& os, vtkIndent indent) override;
33
40 bool IsInside(const vtkVector3d& rst, double tolerance) override;
41 Shape GetShape() const override { return Shape::Hexahedron; }
42 int GetDimension() const override { return Dimension; }
43 const std::array<double, 3>& GetCornerParameter(int corner) const override;
44 int GetNumberOfSideTypes() const override;
45 std::pair<int, int> GetSideRangeForType(int sideType) const override;
46 int GetNumberOfSidesOfDimension(int dimension) const override;
47 const std::vector<vtkIdType>& GetSideConnectivity(int side) const override;
48 const std::vector<vtkIdType>& GetSidesOfSide(int side) const override;
49 Shape GetSideShape(int side) const override;
51
52 vtkTypeFloat32Array* GetReferencePoints() const override;
53 vtkTypeInt32Array* GetSideConnectivity() const override;
54 vtkTypeInt32Array* GetSideOffsetsAndShapes() const override;
55
56 static constexpr int Dimension = 3;
57 static const std::array<std::array<double, 3>, 8> Parameters;
58 static const std::array<std::vector<vtkIdType>, 27> Sides;
59 static const std::array<std::vector<vtkIdType>, 27> SidesOfSides;
60 static const std::array<int, Dimension + 2> SideOffsets;
61 static const std::array<Shape, Dimension + 2> SideShapes;
62
63protected:
65 ~vtkDGHex() override;
66
67private:
68 vtkDGHex(const vtkDGHex&) = delete;
69 void operator=(const vtkDGHex&) = delete;
70};
71
72VTK_ABI_NAMESPACE_END
73#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
@ Hexahedron
An eight-cornered volume; a quadrilateral prism.
Definition vtkDGCell.h:77
Metadata for a discontinuous Galerkin hexahedron.
Definition vtkDGHex.h:26
bool IsInside(const vtkVector3d &rst, double tolerance) override
int GetNumberOfSidesOfDimension(int dimension) const override
vtkTypeInt32Array * GetSideConnectivity() const override
Return a singleton array initialized with point-ids of each side's corners.
static const std::array< std::vector< vtkIdType >, 27 > Sides
Definition vtkDGHex.h:58
static const std::array< Shape, Dimension+2 > SideShapes
Definition vtkDGHex.h:61
static const std::array< int, Dimension+2 > SideOffsets
Definition vtkDGHex.h:60
vtkTypeFloat32Array * GetReferencePoints() const override
Return a singleton array initialized with the reference-cell's corner point coordinates.
const std::vector< vtkIdType > & GetSideConnectivity(int side) const override
Shape GetShape() const override
Definition vtkDGHex.h:41
static const std::array< std::vector< vtkIdType >, 27 > SidesOfSides
Definition vtkDGHex.h:59
vtkTypeInt32Array * GetSideOffsetsAndShapes() const override
Return a singleton array initialized with 2-tuples of (offset, shape) values.
static const std::array< std::array< double, 3 >, 8 > Parameters
Definition vtkDGHex.h:57
std::pair< int, int > GetSideRangeForType(int sideType) const override
int GetDimension() const override
Definition vtkDGHex.h:42
vtkInheritanceHierarchyOverrideMacro(vtkDGHex)
static vtkDGHex * New()
Shape GetSideShape(int side) const override
const std::vector< vtkIdType > & GetSidesOfSide(int side) const override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int GetNumberOfSideTypes() const override
const std::array< double, 3 > & GetCornerParameter(int corner) const override
~vtkDGHex() override
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