#include <vtkm/StaticAssert.h>
#include <vtkm/Types.h>
#include <lcl/Polygon.h>
#include <lcl/Shapes.h>
Go to the source code of this file.
|
| lcl |
|
| vtkm |
| Groups connected points that have the same field value.
|
|
|
enum | vtkm::CellShapeIdEnum {
vtkm::CELL_SHAPE_EMPTY = lcl::ShapeId::EMPTY,
vtkm::CELL_SHAPE_VERTEX = lcl::ShapeId::VERTEX,
vtkm::CELL_SHAPE_LINE = lcl::ShapeId::LINE,
vtkm::CELL_SHAPE_POLY_LINE = 4,
vtkm::CELL_SHAPE_TRIANGLE = lcl::ShapeId::TRIANGLE,
vtkm::CELL_SHAPE_POLYGON = lcl::ShapeId::POLYGON,
vtkm::CELL_SHAPE_QUAD = lcl::ShapeId::QUAD,
vtkm::CELL_SHAPE_TETRA = lcl::ShapeId::TETRA,
vtkm::CELL_SHAPE_HEXAHEDRON = lcl::ShapeId::HEXAHEDRON,
vtkm::CELL_SHAPE_WEDGE = lcl::ShapeId::WEDGE,
vtkm::CELL_SHAPE_PYRAMID = lcl::ShapeId::PYRAMID,
vtkm::NUMBER_OF_CELL_SHAPES
} |
| CellShapeId identifies the type of each cell. More...
|
|
◆ VTKM_DEFINE_CELL_TAG
#define VTKM_DEFINE_CELL_TAG |
( |
|
name, |
|
|
|
idname |
|
) |
| |
Value: struct CellShapeTag##name \
{ \
}; \
namespace internal \
{ \
template <> \
struct CellShapeTagCheck<vtkm::CellShapeTag##name> : std::true_type \
{ \
}; \
template <> \
struct CellShapeTagVtkmToVtkc<vtkm::CellShapeTag##name> \
{ \
using Type = lcl::name; \
}; \
} \
static
inline VTKM_EXEC_CONT const char* GetCellShapeName(vtkm::CellShapeTag##name) \
{ \
return #name; \
} \
template <> \
struct CellShapeIdToTag<vtkm::idname> \
{ \
using valid = std::true_type; \
using Tag = vtkm::CellShapeTag##name; \
}
◆ VTKM_IS_CELL_SHAPE_TAG
#define VTKM_IS_CELL_SHAPE_TAG |
( |
|
tag | ) |
|
Value:
"Provided type is not a valid VTK-m cell shape tag.")
Checks that the argument is a proper cell shape tag.
This is a handy concept check to make sure that a template argument is a proper cell shape tag.
◆ vtkmGenericCellShapeMacro
#define vtkmGenericCellShapeMacro |
( |
|
call | ) |
|
Value:
A macro used in a switch
statement to determine cell shape.
The vtkmGenericCellShapeMacro
is a series of case statements for all of the cell shapes supported by VTK-m. This macro is intended to be used inside of a switch statement on a cell type. For each cell shape condition, a CellShapeTag
typedef is created and the given call
is executed.
A typical use case of this class is to create the specialization of a function overloaded on a cell shape tag for the generic cell shape like as following.
template<typename WorkletType>
{
switch(cellShape.CellShapeId)
{
MyCellOperation(CellShapeTag())
);
default: worklet.
RaiseError(
"Encountered unknown cell shape.");
break
}
}
Note that vtkmGenericCellShapeMacro
does not have a default case. You should consider adding one that gives a
◆ vtkmGenericCellShapeMacroCase
#define vtkmGenericCellShapeMacroCase |
( |
|
cellShapeId, |
|
|
|
call |
|
) |
| |
Value: case vtkm::cellShapeId: \
{ \
call; \
} \
break
@ CELL_SHAPE_WEDGE
A wedge.
Definition: CellShape.h:66
#define VTKM_EXEC
Definition: ExportMacros.h:51
void RaiseError(const char *message) const
Definition: FunctorBase.h:37
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
#define vtkmGenericCellShapeMacroCase(cellShapeId, call)
Definition: CellShape.h:212
A traits-like class to get an CellShapeId known at compile time to a tag.
Definition: CellShape.h:107
@ CELL_SHAPE_EMPTY
Placeholder for empty or invalid cells.
Definition: CellShape.h:37
#define vtkmGenericCellShapeMacro(call)
A macro used in a switch statement to determine cell shape.
Definition: CellShape.h:250
@ CELL_SHAPE_POLY_LINE
A sequence of line segments.
Definition: CellShape.h:46
@ CELL_SHAPE_TETRA
A tetrahedron.
Definition: CellShape.h:59
#define VTKM_STATIC_ASSERT_MSG(condition, message)
Definition: StaticAssert.h:18
vtkm::Int64 Id
Base type to use to index arrays.
Definition: Types.h:227
@ CELL_SHAPE_HEXAHEDRON
A hexahedron.
Definition: CellShape.h:62
uint8_t UInt8
Base type to use for 8-bit unsigned integer numbers.
Definition: Types.h:169
@ CELL_SHAPE_TRIANGLE
A triangle.
Definition: CellShape.h:48
@ CELL_SHAPE_LINE
A line cell connecting two points.
Definition: CellShape.h:42
Base class for all user worklets invoked in the execution environment from a call to vtkm::cont::Devi...
Definition: FunctorBase.h:30
A special cell shape tag that holds a cell shape that is not known at compile time.
Definition: CellShape.h:170
@ CELL_SHAPE_PYRAMID
A pyramid with a quadrilateral base and four triangular faces.0.
Definition: CellShape.h:68
@ CELL_SHAPE_POLYGON
A general polygon shape.
Definition: CellShape.h:53
@ CELL_SHAPE_VERTEX
Vertex cells of a single point.
Definition: CellShape.h:39
@ CELL_SHAPE_QUAD
A four-sided polygon.
Definition: CellShape.h:56