dune-geometry
2.2.0
|
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... | |
enum | Binary { b0001 = 1, b0011 = 3, b0101 = 5, b0111 = 7 } |
A few binary constants. More... | |
Public Member Functions | |
GeometryType () | |
Default constructor, not initializing anything. | |
GeometryType (BasicType basicType, unsigned int dim) | |
Constructor. | |
GeometryType (unsigned int topologyId, unsigned int dim) | |
Constructor. | |
template<class TopologyType > | |
GeometryType (TopologyType t) | |
Constructor from static TopologyType class. | |
GeometryType (unsigned int dim) | |
Constructor for vertices and segments. | |
GeometryType (int dim) | |
Constructor for vertices and segments. | |
bool | operator== (const GeometryType &other) const |
Check for equality. This method knows that in dimension 0 and 1 all BasicTypes are equal. | |
bool | operator!= (const GeometryType &other) const |
Check for inequality. | |
bool | operator< (const GeometryType &other) const |
less-than operation for use with maps | |
Setup Methods | |
void | makeVertex () |
Make a vertex. | |
void | makeLine () |
Make a line segment. | |
void | makeTriangle () |
Make a triangle. | |
void | makeQuadrilateral () |
Make a quadrilateral. | |
void | makeTetrahedron () |
Make a tetrahedron. | |
void | makePyramid () |
Make a pyramid. | |
void | makePrism () |
Make a prism. | |
void | makeHexahedron () |
Make a hexahedron. | |
void | makeSimplex (unsigned int dim) |
Make a simplex of given dimension. | |
void | makeCube (unsigned int dim) |
Make a hypercube of given dimension. | |
void | makeNone (unsigned int dim) |
Make a singular of given dimension. | |
Query Methods | |
bool | isVertex () const |
Return true if entity is a vertex. | |
bool | isLine () const |
Return true if entity is a line segment. | |
bool | isTriangle () const |
Return true if entity is a triangle. | |
bool | isQuadrilateral () const |
Return true if entity is a quadrilateral. | |
bool | isTetrahedron () const |
Return true if entity is a tetrahedron. | |
bool | isPyramid () const |
Return true if entity is a pyramid. | |
bool | isPrism () const |
Return true if entity is a prism. | |
bool | isHexahedron () const |
Return true if entity is a hexahedron. | |
bool | isSimplex () const |
Return true if entity is a simplex of any dimension. | |
bool | isCube () const |
Return true if entity is a cube of any dimension. | |
bool | isNone () const |
Return true if entity is a singular of any dimension. | |
unsigned int | dim () const |
Return dimension of the type. | |
BasicType | basicType () const |
Return the basic type of the type. | |
unsigned int | id () const |
Return the topology id the type. |
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.
Each entity can be tagged by one of these basic types plus its space dimension.
Dune::GeometryType::GeometryType | ( | ) | [inline] |
Default constructor, not initializing anything.
Dune::GeometryType::GeometryType | ( | BasicType | basicType, |
unsigned int | dim | ||
) | [inline] |
Constructor.
References cube, makeCube(), makeNone(), makePrism(), makePyramid(), makeSimplex(), none, prism, pyramid, and simplex.
Dune::GeometryType::GeometryType | ( | unsigned int | topologyId, |
unsigned int | dim | ||
) | [inline] |
Constructor.
Dune::GeometryType::GeometryType | ( | TopologyType | t | ) | [inline, explicit] |
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 topologytypes.hh in dune-grid. |
t | Any object of type TopologyType. The object t itself is ignored. |
Dune::GeometryType::GeometryType | ( | unsigned int | dim | ) | [inline, explicit] |
Constructor for vertices and segments.
Dune::GeometryType::GeometryType | ( | int | dim | ) | [inline, explicit] |
Constructor for vertices and segments.
BasicType Dune::GeometryType::basicType | ( | ) | const [inline] |
unsigned int Dune::GeometryType::dim | ( | ) | const [inline] |
Return dimension of the type.
Referenced by makeCube(), makeNone(), makeSimplex(), Dune::GenericReferenceElementContainer< ctype, dim >::operator()(), and Dune::operator<<().
unsigned int Dune::GeometryType::id | ( | ) | const [inline] |
Return the topology id the type.
Referenced by Dune::GenericGeometry::BasicGeometry< mydim, GenericGeometry::DefaultGeometryTraits< ctype, coorddim, coorddim > >::BasicGeometry(), Dune::TopologyFactory< Traits >::create(), Dune::TopologySingletonFactory< Factory >::create(), Dune::GenericReferenceElementContainer< ctype, dim >::operator()(), Dune::operator<<(), Dune::GenericGeometry::HybridMapping< Topology::dimension, GeometryTraits >::topologyId(), Dune::GenericGeometry::NonHybridMapping< Topology, GeometryTraits >::topologyId(), and Dune::GenericGeometry::topologyId().
bool Dune::GeometryType::isCube | ( | ) | const [inline] |
Return true if entity is a cube of any dimension.
Referenced by basicType(), and Dune::operator<<().
bool Dune::GeometryType::isHexahedron | ( | ) | const [inline] |
Return true if entity is a hexahedron.
References b0111.
bool Dune::GeometryType::isLine | ( | ) | const [inline] |
Return true if entity is a line segment.
bool Dune::GeometryType::isNone | ( | ) | const [inline] |
Return true if entity is a singular of any dimension.
Referenced by basicType(), and Dune::operator<<().
bool Dune::GeometryType::isPrism | ( | ) | const [inline] |
Return true if entity is a prism.
References b0101.
Referenced by basicType(), and Dune::operator<<().
bool Dune::GeometryType::isPyramid | ( | ) | const [inline] |
Return true if entity is a pyramid.
References b0011.
Referenced by basicType(), and Dune::operator<<().
bool Dune::GeometryType::isQuadrilateral | ( | ) | const [inline] |
Return true if entity is a quadrilateral.
References b0011.
bool Dune::GeometryType::isSimplex | ( | ) | const [inline] |
Return true if entity is a simplex of any dimension.
Referenced by basicType(), and Dune::operator<<().
bool Dune::GeometryType::isTetrahedron | ( | ) | const [inline] |
Return true if entity is a tetrahedron.
References b0001.
bool Dune::GeometryType::isTriangle | ( | ) | const [inline] |
Return true if entity is a triangle.
References b0001.
bool Dune::GeometryType::isVertex | ( | ) | const [inline] |
Return true if entity is a vertex.
void Dune::GeometryType::makeCube | ( | unsigned int | dim | ) | [inline] |
Make a hypercube of given dimension.
References dim().
Referenced by GeometryType(), makeHexahedron(), and makeQuadrilateral().
void Dune::GeometryType::makeHexahedron | ( | ) | [inline] |
Make a hexahedron.
References makeCube().
void Dune::GeometryType::makeLine | ( | ) | [inline] |
Make a line segment.
void Dune::GeometryType::makeNone | ( | unsigned int | dim | ) | [inline] |
void Dune::GeometryType::makePrism | ( | ) | [inline] |
void Dune::GeometryType::makePyramid | ( | ) | [inline] |
void Dune::GeometryType::makeQuadrilateral | ( | ) | [inline] |
Make a quadrilateral.
References makeCube().
void Dune::GeometryType::makeSimplex | ( | unsigned int | dim | ) | [inline] |
Make a simplex of given dimension.
References dim().
Referenced by GeometryType(), makeTetrahedron(), and makeTriangle().
void Dune::GeometryType::makeTetrahedron | ( | ) | [inline] |
Make a tetrahedron.
References makeSimplex().
void Dune::GeometryType::makeTriangle | ( | ) | [inline] |
Make a triangle.
References makeSimplex().
void Dune::GeometryType::makeVertex | ( | ) | [inline] |
Make a vertex.
bool Dune::GeometryType::operator!= | ( | const GeometryType & | other | ) | const [inline] |
Check for inequality.
bool Dune::GeometryType::operator< | ( | const GeometryType & | other | ) | const [inline] |
less-than operation for use with maps
bool Dune::GeometryType::operator== | ( | const GeometryType & | other | ) | const [inline] |
Check for equality. This method knows that in dimension 0 and 1 all BasicTypes are equal.