Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Public Member Functions | Public Attributes | List of all members
internal::GridReordering3d::EdgeOrientation Struct Reference

#include <grid_reordering_internal.h>

Public Member Functions

bool operator== (const EdgeOrientation &edge_orientation) const
 
bool operator!= (const EdgeOrientation &edge_orientation) const
 

Public Attributes

char orientation
 

Detailed Description

A structure indicating the direction of an edge. In the implementation file, we define three objects, unoriented_edge, forward_edge, and backward_edge, that denote whether an edge has already been oriented, whether it is in standard orientation, or whether it has reverse direction. The state that each of these objects encode is stored in the orientation member variable – we would really need only three such values, which we pick in the implementation file, and make sure when we compare such objects that only these three special values are actually used.

The reason for this way of implementing things is as follows. Usually, such a property would be implemented as an enum. However, in the previous implementation, a signed integer was used with unoriented=0, forward=+1, and backward=-1. A number of operations, such as equality of ordered edges were mapped to checking whether the product of two edge orientations equals +1. Such arithmetic isn't always portable and sometimes flagged when using -ftrapv with gcc. Using this class instead makes sure that there isn't going to be any arithmetic going on on edge orientations, just comparisons for equality or inequality.

Author
Wolfgang Bangerth, 2005

Definition at line 426 of file grid_reordering_internal.h.

Member Function Documentation

bool internal::GridReordering3d::EdgeOrientation::operator== ( const EdgeOrientation edge_orientation) const

Comparison operator.

bool internal::GridReordering3d::EdgeOrientation::operator!= ( const EdgeOrientation edge_orientation) const

Comparison operator.

Member Data Documentation

char internal::GridReordering3d::EdgeOrientation::orientation

A value indicating the orientation.

Definition at line 431 of file grid_reordering_internal.h.


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