Orientation Class Reference

: Encapsulation of the Orientation of the Faces of a Box More...

#include <Orientation.H>

List of all members.

Public Types

enum  Side { low = 0, high = 1 }
 In each dimension a face is either low or high. More...

Public Member Functions

 Orientation ()
 The default constructor.
 Orientation (int dir, Side side)
 Set the orientation of a side.
 Orientation (const Orientation &rhs)
 The copy constructor.
Orientationoperator= (const Orientation &rhs)
 The assignment operator.
bool operator== (const Orientation &o) const
 Logical equality.
bool operator!= (const Orientation &o) const
 Logical inequality.
bool operator< (const Orientation &o) const
 Less-than.
bool operator<= (const Orientation &o) const
 Less-than or equal.
bool operator> (const Orientation &o) const
 Greater-than.
bool operator>= (const Orientation &o) const
 Greater-than or equal.
 operator int () const
 This conversion operator maps an orientation into a unique integer in the range [0 .
Orientation flip () const
 Return opposite orientation.
int coordDir () const
 Returns the coordinate direction.
Side faceDir () const
 Returns the orientation of the face -- low or high.
bool isLow () const
 Returns true if Orientation is low.
bool isHigh () const
 Returns true if Orientation is high.

Protected Member Functions

 Orientation (int val)

Friends

class OrientationIter
std::istream & operator>> (std::istream &os, Orientation &o)
 Read from an istream.


Detailed Description

: Encapsulation of the Orientation of the Faces of a Box

This class encapsulates the orientation of the faces of a Box by providing an ordering of each of the faces of a Box in BL dimensions. This allows iterating over all the faces of a Box. The ordering first traverses the BL low sides from direction 0 .. BL-1 and then the BL high sides from direction 0 .. BL-1.


Member Enumeration Documentation

In each dimension a face is either low or high.

Enumerator:
low 
high 


Constructor & Destructor Documentation

Orientation::Orientation (  )  [inline]

The default constructor.

Referenced by flip().

Orientation::Orientation ( int  dir,
Side  side 
) [inline]

Set the orientation of a side.

References BL_ASSERT.

Orientation::Orientation ( const Orientation rhs  )  [inline]

The copy constructor.

Orientation::Orientation ( int  val  )  [inline, protected]


Member Function Documentation

Orientation & Orientation::operator= ( const Orientation rhs  )  [inline]

The assignment operator.

References val.

bool Orientation::operator== ( const Orientation o  )  const [inline]

Logical equality.

References val.

bool Orientation::operator!= ( const Orientation o  )  const [inline]

Logical inequality.

References val.

bool Orientation::operator< ( const Orientation o  )  const [inline]

Less-than.

References val.

bool Orientation::operator<= ( const Orientation o  )  const [inline]

Less-than or equal.

References val.

bool Orientation::operator> ( const Orientation o  )  const [inline]

Greater-than.

References val.

bool Orientation::operator>= ( const Orientation o  )  const [inline]

Greater-than or equal.

References val.

Orientation::operator int (  )  const [inline]

This conversion operator maps an orientation into a unique integer in the range [0 .

. 2*BL-1] according to the above ordering.

Orientation Orientation::flip (  )  const [inline]

Return opposite orientation.

References Orientation().

int Orientation::coordDir (  )  const [inline]

Returns the coordinate direction.

Referenced by BoxLib::adjCell(), BoxLib::bdryNode(), Box::grow(), and Box::operator[]().

Orientation::Side Orientation::faceDir (  )  const [inline]

Returns the orientation of the face -- low or high.

bool Orientation::isLow (  )  const [inline]

Returns true if Orientation is low.

Referenced by BoxLib::adjCell(), BoxLib::bdryNode(), Box::grow(), and Box::operator[]().

bool Orientation::isHigh (  )  const [inline]

Returns true if Orientation is high.


Friends And Related Function Documentation

friend class OrientationIter [friend]

std::istream& operator>> ( std::istream &  os,
Orientation o 
) [friend]

Read from an istream.


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

Generated on Fri Nov 21 10:11:02 2008 for AMRParticlePaths by  doxygen 1.5.5