#include <Orientation.H>
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. | |
Orientation & | operator= (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. |
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.
enum Orientation::Side |
Orientation::Orientation | ( | ) | [inline] |
Orientation::Orientation | ( | int | dir, | |
Side | side | |||
) | [inline] |
Orientation::Orientation | ( | const Orientation & | rhs | ) | [inline] |
The copy constructor.
Orientation::Orientation | ( | int | val | ) | [inline, protected] |
Orientation & Orientation::operator= | ( | const Orientation & | rhs | ) | [inline] |
bool Orientation::operator== | ( | const Orientation & | o | ) | const [inline] |
bool Orientation::operator!= | ( | const Orientation & | o | ) | const [inline] |
bool Orientation::operator< | ( | const Orientation & | o | ) | const [inline] |
bool Orientation::operator<= | ( | const Orientation & | o | ) | const [inline] |
bool Orientation::operator> | ( | const Orientation & | o | ) | const [inline] |
bool Orientation::operator>= | ( | const Orientation & | o | ) | const [inline] |
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] |
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.
friend class OrientationIter [friend] |
std::istream& operator>> | ( | std::istream & | os, | |
Orientation & | o | |||
) | [friend] |
Read from an istream.