dune-geometry  2.2.0
Public Types | Public Member Functions
Dune::GeometryType Class Reference

Unique label for each type of entities that can occur in DUNE grids. More...

#include <dune/geometry/type.hh>

List of all members.

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.

Detailed Description

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.


Member Enumeration Documentation

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 geometry, representable as topologyId.

none 

Generic element in any nonnegative dimension.

A few binary constants.

Enumerator:
b0001 
b0011 
b0101 
b0111 

Constructor & Destructor Documentation

Default constructor, not initializing anything.

Dune::GeometryType::GeometryType ( BasicType  basicType,
unsigned int  dim 
) [inline]
Dune::GeometryType::GeometryType ( unsigned int  topologyId,
unsigned int  dim 
) [inline]

Constructor.

template<class TopologyType >
Dune::GeometryType::GeometryType ( TopologyType  t) [inline, explicit]

Constructor from static TopologyType class.

Constructs the GeometryType object from a static topology representation.

Template Parameters:
TopologyTypeA 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.
Parameters:
tAny 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.


Member Function Documentation

Return the basic type of the type.

Deprecated:

References cube, extended, isCube(), isNone(), isPrism(), isPyramid(), isSimplex(), none, prism, pyramid, and simplex.

unsigned int Dune::GeometryType::dim ( ) const [inline]
unsigned int Dune::GeometryType::id ( ) const [inline]
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().

Make a hexahedron.

References makeCube().

void Dune::GeometryType::makeLine ( ) [inline]

Make a line segment.

void Dune::GeometryType::makeNone ( unsigned int  dim) [inline]

Make a singular of given dimension.

References dim().

Referenced by GeometryType().

void Dune::GeometryType::makePrism ( ) [inline]

Make a prism.

References b0101.

Referenced by GeometryType().

Make a pyramid.

References b0011.

Referenced by GeometryType().

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().

Make a tetrahedron.

References makeSimplex().

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.


The documentation for this class was generated from the following file: