dune-geometry
2.6-git
|
Unique label for each type of entities that can occur in DUNE grids. More...
#include <dune/geometry/type.hh>
Public Types | |
enum | BasicType { simplex, cube, pyramid, prism, extended, none } |
Each entity can be tagged by one of these basic types plus its space dimension. More... | |
Public Member Functions | |
Constructors | |
constexpr | GeometryType () |
Default constructor, not initializing anything. More... | |
GeometryType (BasicType basicType, unsigned int dim) | |
Constructor, using the basic type and the dimension. More... | |
constexpr | GeometryType (unsigned int topologyId, unsigned int dim, bool none) |
Constructor, using the topologyId (integer), the dimension and a flag for type none. More... | |
constexpr | GeometryType (unsigned int topologyId, unsigned int dim) |
Constructor, using the topologyId (integer) and the dimension. More... | |
template<class TopologyType , class = Dune::void_t<decltype(TopologyType::dimension), decltype(TopologyType::id)>> | |
GeometryType (TopologyType t) | |
Constructor from static TopologyType class. More... | |
GeometryType (unsigned int dim) | |
Constructor for vertices and segments. More... | |
GeometryType (int dim) | |
Constructor for vertices and segments. More... | |
Setup Methods | |
void | makeVertex () |
Make a vertex. More... | |
void | makeLine () |
Make a line segment. More... | |
void | makeTriangle () |
Make a triangle. More... | |
void | makeQuadrilateral () |
Make a quadrilateral. More... | |
void | makeTetrahedron () |
Make a tetrahedron. More... | |
void | makePyramid () |
Make a pyramid. More... | |
void | makePrism () |
Make a prism. More... | |
void | makeHexahedron () |
Make a hexahedron. More... | |
void | makeSimplex (unsigned int dim) |
Make a simplex of given dimension. More... | |
void | makeCube (unsigned int dim) |
Make a hypercube of given dimension. More... | |
void | makeNone (unsigned int dim) |
Make a singular of given dimension. More... | |
void | makeFromVertices (unsigned int dim, unsigned int vertices) |
Construct the correct geometry type given the dimension and the number of vertices. More... | |
Query Methods | |
constexpr bool | isVertex () const |
Return true if entity is a vertex. More... | |
constexpr bool | isLine () const |
Return true if entity is a line segment. More... | |
constexpr bool | isTriangle () const |
Return true if entity is a triangle. More... | |
constexpr bool | isQuadrilateral () const |
Return true if entity is a quadrilateral. More... | |
constexpr bool | isTetrahedron () const |
Return true if entity is a tetrahedron. More... | |
constexpr bool | isPyramid () const |
Return true if entity is a pyramid. More... | |
constexpr bool | isPrism () const |
Return true if entity is a prism. More... | |
constexpr bool | isHexahedron () const |
Return true if entity is a hexahedron. More... | |
constexpr bool | isSimplex () const |
Return true if entity is a simplex of any dimension. More... | |
constexpr bool | isCube () const |
Return true if entity is a cube of any dimension. More... | |
constexpr bool | isNone () const |
Return true if entity is a singular of any dimension. More... | |
constexpr unsigned int | dim () const |
Return dimension of the type. More... | |
constexpr unsigned int | id () const |
Return the topology id of the type. More... | |
Comparison operators | |
constexpr bool | operator== (const GeometryType &other) const |
Check for equality. This method knows that in dimension 0 and 1 all BasicTypes are equal. More... | |
constexpr bool | operator!= (const GeometryType &other) const |
Check for inequality. More... | |
constexpr bool | operator< (const GeometryType &other) const |
less-than operation for use with maps More... | |
Unique label for each type of entities that can occur in DUNE grids.
This class has to be extended if a grid implementation with new entity types is added to DUNE.
GeometryType is a C++ "literal type" and can be used in constexpr
context if created with a constexpr
constructor.
Each entity can be tagged by one of these basic types plus its space dimension.
Enumerator | |
---|---|
simplex | Simplicial element in any nonnegative dimension. |
cube | Cube element in any nonnegative dimension. |
pyramid | Four sided pyramid in three dimensions. |
prism | Prism element in three dimensions. |
extended | Other, more general topology, representable as topologyId. |
none | Even more general topology, cannot be specified by a topologyId. Two GeometryTypes with 'none' type are equal if and only if they have the same dimension. |
|
inline |
Default constructor, not initializing anything.
|
inline |
Constructor, using the basic type and the dimension.
|
inline |
Constructor, using the topologyId (integer), the dimension and a flag for type none.
|
inline |
Constructor, using the topologyId (integer) and the dimension.
|
inlineexplicit |
Constructor from static TopologyType class.
Constructs the GeometryType object from a static topology representation.
TopologyType | A class providing public static unsigned int members TopologyType::dimension and TopologyType::id. You can e.g. use the Point, Prism and Pyramid structs from the Impl namespace. |
t | Any object of type TopologyType. The object t itself is ignored. |
|
inlineexplicit |
Constructor for vertices and segments.
|
inlineexplicit |
Constructor for vertices and segments.
|
inline |
Return dimension of the type.
|
inline |
Return the topology id of the type.
|
inline |
Return true if entity is a cube of any dimension.
|
inline |
Return true if entity is a hexahedron.
|
inline |
Return true if entity is a line segment.
|
inline |
Return true if entity is a singular of any dimension.
|
inline |
Return true if entity is a prism.
|
inline |
Return true if entity is a pyramid.
|
inline |
Return true if entity is a quadrilateral.
|
inline |
Return true if entity is a simplex of any dimension.
|
inline |
Return true if entity is a tetrahedron.
|
inline |
Return true if entity is a triangle.
|
inline |
Return true if entity is a vertex.
|
inline |
Make a hypercube of given dimension.
|
inline |
Construct the correct geometry type given the dimension and the number of vertices.
|
inline |
Make a hexahedron.
|
inline |
Make a line segment.
|
inline |
Make a singular of given dimension.
|
inline |
Make a prism.
|
inline |
Make a pyramid.
|
inline |
Make a quadrilateral.
|
inline |
Make a simplex of given dimension.
|
inline |
Make a tetrahedron.
|
inline |
Make a triangle.
|
inline |
Make a vertex.
|
inline |
Check for inequality.
|
inline |
less-than operation for use with maps
|
inline |
Check for equality. This method knows that in dimension 0 and 1 all BasicTypes are equal.