|
constexpr | operator Id () const |
| Construct an Id representing this GeometryType.
|
|
constexpr Id | toId () const |
| Create an Id representation of this GeometryType.
|
|
constexpr | GeometryType (Id id) |
| Reconstruct a Geometry type from a GeometryType::Id.
|
|
|
constexpr | GeometryType () |
| Default constructor, not initializing anything.
|
|
constexpr | GeometryType (unsigned int topologyId, unsigned int dim, bool isNone) |
| Constructor, using the topologyId (integer), the dimension and a flag for type none.
|
|
constexpr | GeometryType (unsigned int topologyId, unsigned int dim) |
| Constructor, using the topologyId (integer) and the dimension.
|
|
template<class TopologyType , class = std::void_t<decltype(TopologyType::dimension), decltype(TopologyType::id)>> |
| GeometryType (TopologyType t) |
| Constructor from static TopologyType class.
|
|
|
constexpr bool | isVertex () const |
| Return true if entity is a vertex.
|
|
constexpr bool | isLine () const |
| Return true if entity is a line segment.
|
|
constexpr bool | isTriangle () const |
| Return true if entity is a triangle.
|
|
constexpr bool | isQuadrilateral () const |
| Return true if entity is a quadrilateral.
|
|
constexpr bool | isTetrahedron () const |
| Return true if entity is a tetrahedron.
|
|
constexpr bool | isPyramid () const |
| Return true if entity is a pyramid.
|
|
constexpr bool | isPrism () const |
| Return true if entity is a prism.
|
|
constexpr bool | isHexahedron () const |
| Return true if entity is a hexahedron.
|
|
constexpr bool | isSimplex () const |
| Return true if entity is a simplex of any dimension.
|
|
constexpr bool | isCube () const |
| Return true if entity is a cube of any dimension.
|
|
constexpr bool | isConical () const |
| Return true if entity was constructed with a conical product in the last step.
|
|
constexpr bool | isConical (const int &step) const |
| Return true if entity was constructed with a conical product in the chosen step.
|
|
constexpr bool | isPrismatic () const |
| Return true if entity was constructed with a prismatic product in the last step.
|
|
constexpr bool | isPrismatic (const int &step) const |
| Return true if entity was constructed with a prismatic product in the chosen step.
|
|
constexpr bool | isNone () const |
| Return true if entity is a singular of any dimension.
|
|
constexpr unsigned int | dim () const |
| Return dimension of the type.
|
|
constexpr unsigned int | id () const |
| Return the topology id of the type.
|
|
|
constexpr bool | operator== (const GeometryType &other) const |
| Check for equality. This method knows that in dimension 0 and 1 all BasicTypes are equal.
|
|
constexpr bool | operator!= (const GeometryType &other) const |
| Check for inequality.
|
|
constexpr bool | operator< (const GeometryType &other) const |
| less-than operation for use with maps
|
|
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.
If you want to use a GeometryType as a template parameter, see GeometryType::Id.
using Dune::GeometryType::Id = IdType |
An integral id representing a GeometryType.
Id is an unspecified built-in integral type that uniquely represents a GeometryType. It mostly exists to be able to use a geometry type as a template parameter, as C++ does not let us use GeometryType directly for this purpose.
GeometryType and GeometryType::Id are implicitly convertible to each other, while the Id does not implicitly convert into other integral types. They should be used as follows:
template<GeometryType::Id gtid>
class Foo
{
};
Foo<GeometryTypes::triangle> foo;
Unique label for each type of entities that can occur in DUNE grids.
Definition type.hh:126
As you can see, the conversion between GeometryType and the id is completely transparent to the user (apart from the slightly different template parameter type).
- Note
- The Id really only exists for this template parameter workaround. Do not use it to store a more compact version of the GeometryType - GeometryType and GeometryType::Id use the same amount of storage (64 bits).