Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
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.

Author
Wolfgang Bangerth, 2014

Definition at line 243 of file geometry_info.h.

Member Enumeration Documentation

◆ Object

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.

Enumerator
vertex 

A vertex.

line 

A line.

quad 

A quadrilateral.

hex 

A hexahedron.

Definition at line 252 of file geometry_info.h.

Constructor & Destructor Documentation

◆ GeometryPrimitive() [1/2]

GeometryPrimitive::GeometryPrimitive ( const Object  object)

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

◆ GeometryPrimitive() [2/2]

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

◆ operator unsigned int()

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

Object GeometryPrimitive::object
private

The object currently represented.

Definition at line 295 of file geometry_info.h.


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