VTK  9.3.0
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 "vtkFiltersCellGridModule.h" // for export macro
18
19#include "vtkDGCell.h"
20#include "vtkStringToken.h" // for vtkStringToken::Hash
21
22VTK_ABI_NAMESPACE_BEGIN
23class vtkCellGrid;
26
27class VTKFILTERSCELLGRID_EXPORT vtkDGHex : public vtkDGCell
28{
29public:
30 static vtkDGHex* New();
31
32 vtkTypeMacro(vtkDGHex, vtkDGCell);
33 void PrintSelf(ostream& os, vtkIndent indent) override;
34
36
37 Shape GetShape() const override { return Shape::Hexahedron; }
38 int GetDimension() const override { return vtkDGHex::Dimension; }
39 const std::array<double, 3>& GetCornerParameter(int corner) const override;
40 int GetNumberOfSideTypes() const override;
41 std::pair<int, int> GetSideRangeForType(int sideType) const override;
42 int GetNumberOfSidesOfDimension(int dimension) const override;
43 const std::vector<vtkIdType>& GetSideConnectivity(int side) const override;
44 Shape GetSideShape(int side) const override;
45
46 vtkTypeFloat32Array* GetReferencePoints() const override;
47 vtkTypeInt32Array* GetSideConnectivity() const override;
48 vtkTypeInt32Array* GetSideOffsetsAndShapes() const override;
49
50 static constexpr int Dimension = 3;
51 static const std::array<std::array<double, 3>, 8> Parameters;
52 static const std::array<std::vector<vtkIdType>, 26> Sides;
53 static const std::array<int, Dimension + 1> SideOffsets;
54 static const std::array<Shape, Dimension + 1> SideShapes;
55
56protected:
58 ~vtkDGHex() override;
59
60private:
61 vtkDGHex(const vtkDGHex&) = delete;
62 void operator=(const vtkDGHex&) = delete;
63};
64
65VTK_ABI_NAMESPACE_END
66#endif
A function defined over the physical domain of a vtkCellGrid.
Visualization data composed of cells of arbitrary type.
Definition vtkCellGrid.h:42
Base class for a discontinuous Galerkin cells of all shapes.
Definition vtkDGCell.h:37
Shape
All possible shapes for DG cells.
Definition vtkDGCell.h:44
@ Hexahedron
An eight-cornered volume; a quadrilateral prism.
Definition vtkDGCell.h:50
Metadata for a discontinuous Galerkin hexahedron.
Definition vtkDGHex.h:28
int GetNumberOfSidesOfDimension(int dimension) const override
Return the number of boundaries this type of cell has of a given dimension.
vtkTypeInt32Array * GetSideConnectivity() const override
Return a singleton array initialized with point-ids of each side's corners.
static const std::array< Shape, Dimension+1 > SideShapes
Definition vtkDGHex.h:54
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
Return the connectivity of the given side.
vtkIdType GetNumberOfCells() override
Return the number of cells of this type in the parent cell-grid object.
Shape GetShape() const override
Return the topological shape of this cell type.
Definition vtkDGHex.h:37
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:51
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()[.
int GetDimension() const override
Return the parametric dimension of this cell type (0, 1, 2, or 3).
Definition vtkDGHex.h:38
static constexpr int Dimension
Definition vtkDGHex.h:50
static vtkDGHex * New()
Shape GetSideShape(int side) const override
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.
int GetNumberOfSideTypes() const override
Return the number of different side shapes of this cell type.
static const std::array< std::vector< vtkIdType >, 26 > Sides
Definition vtkDGHex.h:52
const std::array< double, 3 > & GetCornerParameter(int corner) const override
Return the coordinates of the reference element's corner vertex.
~vtkDGHex() override
static const std::array< int, Dimension+1 > SideOffsets
Definition vtkDGHex.h:53
represent and manipulate attribute data in a dataset
a simple class to control print indentation
Definition vtkIndent.h:29
int vtkIdType
Definition vtkType.h:315