22#include "vtkFiltersCellGridModule.h"
34VTK_ABI_NAMESPACE_BEGIN
40class vtkTypeFloat32Array;
41class vtkTypeInt32Array;
65 std::unordered_map<int,
102 os <<
"vtkDGCell::Source(" << &
source <<
")\n";
103 source.Connectivity->PrintValues(os);
104 os <<
"Connectivity: " <<
source.Connectivity <<
'\n';
105 os <<
"NodalGhostMarks: " <<
source.NodalGhostMarks <<
'\n';
106 os <<
"Offset: " <<
source.Offset <<
'\n';
107 os <<
"Blanked: " << (
source.Blanked ?
"T\n" :
"F\n");
108 os <<
"SourceShape: " <<
source.SourceShape <<
'\n';
109 os <<
"SideType: " <<
source.SideType <<
'\n';
110 os <<
"SelectionType: " <<
source.SelectionType <<
'\n';
133 bool Blanked{
false };
147 int SelectionType{ -1 };
413 void operator=(
const vtkDGCell&) =
delete;
A function defined over the physical domain of a vtkCellGrid.
std::unordered_map< vtkStringToken, std::unordered_set< vtkStringToken > > TagSet
A map of tag names (such as the cell's type-name) to values of the tag accepted or provided for that ...
Visualization data composed of cells of arbitrary type.
Base class for a discontinuous Galerkin cells of all shapes.
void FillSideConnectivity(vtkTypeInt32Array *arr) const
Fill the passed array with the connectivity (point IDs) of all the element's sides.
virtual const std::array< double, 3 > & GetCornerParameter(int corner) const =0
Return the coordinates of the reference element's corner vertex.
Shape
All possible shapes for DG cells.
@ Hexahedron
An eight-cornered volume; a quadrilateral prism.
@ Triangle
A three-cornered face bounded by 3 edges.
@ Tetrahedron
A four-cornered volume bounded by 4 triangular shapes.
@ Quadrilateral
A four-cornered face bounded by 4 edges.
@ Wedge
A volumetric, triangular prism.
@ Pyramid
A volumetric shape whose quadrilateral base attaches to a vertex.
@ Edge
A curve connecting two vertices.
std::vector< Source > SideSpecs
The connectivity array(s) specifying sides.
static int GetShapeDimension(Shape shape)
virtual Shape GetSideShape(int side) const =0
For a given side, return its cell shape.
void DeepCopy(vtkCellMetadata *other) override
vtkDataArray * GetCellSourceConnectivity(int sideType=-1) const
Python-accessible methods to fetch cell source information.
static int GetShapeCornerCount(Shape shape)
void FillReferencePoints(vtkTypeFloat32Array *arr) const
Fill the passed array with the parametric coordinates of all the element's corners.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIdType GetNumberOfCells() override
Return the number of cells (and sides) of this type present in this cell grid.
bool GetCellSourceIsBlanked(int sideType=-1) const
virtual Shape GetShape() const =0
Return the topological shape of this cell or side type.
std::size_t GetNumberOfCellSources() const
Python-accessible method to identify number of cell sources.
const Source & GetCellSource(int sideType=-1) const
Provide access to cell specifications in a uniform way (for both cells and sides).
virtual const std::vector< vtkIdType > & GetSideConnectivity(int side) const =0
Return the connectivity of the given side.
virtual int GetSideTypeForShape(Shape s) const
Return the side type index for the given shape (or -1).
Source CellSpec
The connectivity array specifying cells.
int * GetSideRangeForSideType(int sideType)
A python-wrapped version of GetSideRangeForType.
Source & GetCellSource(int sideType=-1)
std::unordered_map< vtkStringToken, std::unordered_map< vtkStringToken, std::unordered_map< vtkStringToken, std::unordered_map< int, std::unordered_map< vtkStringToken, vtkDGOperatorEntry > > > > > OperatorMap
A map holding operators that evaluate DG cells.
virtual vtkTypeInt32Array * GetSideConnectivity() const =0
Return a singleton array initialized with point-ids of each side's corners.
void FillSideOffsetsAndShapes(vtkTypeInt32Array *arr) const
Fill the passed array with tuples of (1) offsets into the side-connectivity and (2) shapes for each t...
virtual vtkTypeFloat32Array * GetReferencePoints() const =0
Return a singleton array initialized with the reference-cell's corner point coordinates.
vtkIdType GetCellSourceOffset(int sideType=-1) const
virtual std::pair< int, int > GetSideRangeForType(int sideType) const =0
Return the range of sides of the ii-th type, where ii is in [-2, this->GetNumberOfSideTypes()[.
virtual int GetDimension() const
Return the parametric dimension of this cell type (0, 1, 2, or 3).
virtual bool IsInside(const vtkVector3d &rst, double tolerance=1e-6)=0
Return true if the parametric coordinates (rst) lie inside the reference cell or its closure and fals...
vtkInheritanceHierarchyOverrideMacro(vtkDGCell)
virtual int GetNumberOfSideTypes() const =0
Return the number of different side shapes of this cell type.
vtkCellGridResponders::TagSet GetAttributeTags(vtkCellAttribute *attribute, bool inheritedTypes=false)
A convenience function to fetch attribute-calculator tags for an attribute.
std::vector< Source > & GetSideSpecs()
Provide access to the (cellId,sideId)-arrays used to define side-cells of this type.
void ShallowCopy(vtkCellMetadata *other) override
virtual std::pair< int, int > GetSideRangeForDimension(int dimension) const
Return the range of side IDs for all sides of the given dimension.
virtual vtkTypeInt32Array * GetSideOffsetsAndShapes() const =0
Return a singleton array initialized with 2-tuples of (offset, shape) values.
Source & GetCellSpec()
Provide access to the connectivity array used to define cells of this type.
int * GetSideRangeForSideDimension(int sideDimension)
A python-wrapped version of GetSideRangeForDimension.
vtkDGOperatorEntry GetOperatorEntry(vtkStringToken opName, const vtkCellAttribute::CellTypeInfo &attributeInfo)
Return an operator entry.
virtual vtkVector3d GetParametricCenterOfSide(int sideId) const
Return the parametric center of a cell or its side.
static OperatorMap & GetOperators()
Return a map of operators registered for vtkDGCell and its subclasses.
static vtkStringToken GetShapeName(Shape shape)
int GetCellSourceSelectionType(int sideType=-1) const
virtual int GetNumberOfSidesOfDimension(int dimension) const =0
Return the number of boundaries this type of cell has of a given dimension.
Shape GetCellSourceShape(int sideType=-1) const
vtkDataArray * GetCellSourceNodalGhostMarks(int sideType=-1) const
int GetCellSourceSideType(int sideType=-1) const
virtual int GetNumberOfCorners() const
Return the number of corner points for this cell type.
virtual const std::vector< vtkIdType > & GetSidesOfSide(int side) const =0
Return a vector of side IDs given an input side ID.
static Shape GetShapeEnum(vtkStringToken shapeName)
Given a string description of a cell shape, return the DG equivalent enum.
A record for a basis in a function space that is specific to one cell shape.
abstract superclass for arrays of numeric data
represent and manipulate attribute data in a dataset
a simple class to control print indentation
Represent a string by its integer hash.
Records describing the source arrays for cells or cell-sides.
virtual ~Source()=default
Override the destructor to de-reference Connectivity, NodalGhostMarks.
friend ostream & operator<<(ostream &os, const Source &source)
Source(vtkDataArray *conn, vtkIdType off, bool blank, Shape shape, int sideType, int selnType, vtkDataArray *nodalGhostMarks)
Source & operator=(const Source &)=default
Source(const Source &)=default
Source(vtkDataArray *conn, vtkIdType off, bool blank, Shape shape, int sideType)
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define VTK_SIZEHINT(...)