Reference documentation for deal.II version Git 3e8fd02 2017-09-22 11:37:14 +0200
Public Types | Public Member Functions | Private Attributes | List of all members
GeometryPrimitive Class Reference

#include <deal.II/base/geometry_info.h>

Public Types

enum  Object { vertex = 0, line = 1, quad = 2, hex = 3 }

Public Member Functions

 GeometryPrimitive (const Object object)
 GeometryPrimitive (const unsigned int object_dimension)
 operator unsigned int () const

Private Attributes

Object object

Detailed Description

A class that can represent the kinds of objects a triangulation is made up of: vertices, lines, quads and hexes.

The class is rather primitive: it only stores a single integer that represents the dimensionality of the object represented. In other words, this class is useful primarily as a way to pass around an object whose data type explains what it does (unlike just passing around an integer), and for providing symbolic names for these objects such as GeometryPrimitive::vertex instead of an integer zero.

Since the ability to identify such objects with the integral dimension of the object represented, this class provides conversion operators to and from unsigned integers.

Wolfgang Bangerth, 2014

Definition at line 44 of file geometry_info.h.

Member Enumeration Documentation

An enumeration providing symbolic names for the objects that can be represented by this class. The numeric values of these symbolic names equal the geometric dimensionality of the represented objects to make conversion from and to integer variables simpler.


A vertex.


A line.


A quadrilateral.


A hexahedron.

Definition at line 53 of file geometry_info.h.

Constructor & Destructor Documentation

GeometryPrimitive::GeometryPrimitive ( const Object  object)

Constructor. Initialize the object with the given argument representing a vertex, line, etc.

GeometryPrimitive::GeometryPrimitive ( const unsigned int  object_dimension)

Constructor. Initialize the object with an integer that should represent the dimensionality of the geometric object in question. This will usually be a number between zero (a vertex) and three (a hexahedron).

Member Function Documentation

GeometryPrimitive::operator unsigned int ( ) const

Return the integral dimension of the object currently represented, i.e. zero for a vertex, one for a line, etc.

Member Data Documentation

Object GeometryPrimitive::object

The object currently represented.

Definition at line 96 of file geometry_info.h.

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