internal::GridReordering3d::EdgeOrientation Struct Reference

List of all members.

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

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

A value indicating the orientation.


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

deal.II documentation generated on Sat Aug 15 16:52:37 2009 by doxygen 1.5.9