#include <Box.H>
The class IndexType defines an index as being cell based or node (face) based in each of the CH_SPACEDIM directions. This class defines an enumerated type CellIndex to be either CELL or NODE; i.e. each of the CH_SPACEDIM dimensions must be either CELL or NODE.
Public Types | |
| enum | CellIndex { CELL = 0, NODE = 1 } |
Public Member Functions | |
| IndexType () | |
| IndexType (const IndexType &rhs) | |
| IndexType (const IntVect &iv) | |
| IndexType & | operator= (const IndexType &rhs) |
| IndexType & | operator= (const IntVect &iv) |
| IndexType (D_DECL6(CellIndex i, CellIndex j, CellIndex k, CellIndex l, CellIndex m, CellIndex n)) | |
| void | set (int dir) |
| void | unset (int dir) |
| bool | test (int dir) const |
| void | setall () |
| void | clear () |
| bool | any () const |
| bool | ok () const |
| void | flip (int i) |
| bool | operator== (const IndexType &t) const |
| bool | operator< (const IndexType &t) const |
| bool | operator!= (const IndexType &t) const |
| bool | cellCentered () const |
| bool | nodeCentered () const |
| void | setType (int dir, CellIndex t) |
| CellIndex | ixType (int dir) const |
| int | operator[] (int dir) const |
| IntVect | ixType () const |
Static Public Member Functions | |
| static IndexType | TheCellType () |
| static IndexType | TheNodeType () |
Static Private Member Functions | |
| static unsigned char | mask (int k) |
Private Attributes | |
| unsigned char | itype |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const IndexType &itype) |
| std::istream & | operator>> (std::istream &is, IndexType &itype) |
| enum IndexType::CellIndex |
| IndexType::IndexType | ( | ) | [inline] |
The default constructor.
| IndexType::IndexType | ( | const IndexType & | rhs | ) | [inline] |
The copy constructor.
| IndexType::IndexType | ( | const IntVect & | iv | ) | [inline, explicit] |
The assignment operator.
References itype.
Another assignment operator.
References itype.
| void IndexType::set | ( | int | dir | ) | [inline] |
Sets this IndexType to be NODE based in direction dir.
Referenced by Box::surroundingNodes().
| void IndexType::unset | ( | int | dir | ) | [inline] |
Sets this IndexType to be CELL based in direction dir.
Referenced by Box::enclosedCells(), and setType().
| bool IndexType::test | ( | int | dir | ) | const [inline] |
True if this IndexType is NODE based in direction dir.
Referenced by operator[]().
| void IndexType::setall | ( | ) | [inline] |
Set this IndexType to be NODE based in all directions.
References CH_SPACEDIM, and itype.
| void IndexType::clear | ( | ) | [inline] |
| bool IndexType::any | ( | ) | const [inline] |
True if this IndexType is NODE based in any direction.
References itype.
Referenced by Box::cellCentered().
| bool IndexType::ok | ( | ) | const [inline] |
True if this IndexType is valid.
References CH_SPACEDIM, and itype.
| void IndexType::flip | ( | int | i | ) | [inline] |
| bool IndexType::operator== | ( | const IndexType & | t | ) | const [inline] |
True if IndexTypes are identical.
References itype.
| bool IndexType::operator< | ( | const IndexType & | t | ) | const [inline] |
IndexTypes comparison.
References itype.
| bool IndexType::operator!= | ( | const IndexType & | t | ) | const [inline] |
True if IndexTypes are not identical.
References itype.
| bool IndexType::cellCentered | ( | ) | const [inline] |
| bool IndexType::nodeCentered | ( | ) | const [inline] |
True if this IndexType is NODE based in all directions.
References CH_SPACEDIM, and itype.
| void IndexType::setType | ( | int | dir, | |
| CellIndex | t | |||
| ) | [inline] |
| IndexType::CellIndex IndexType::ixType | ( | int | dir | ) | const [inline] |
Returns the CellIndex of this IndexType in direction dir.
References itype.
Referenced by Box::convert(), and Box::type().
| int IndexType::operator[] | ( | int | dir | ) | const [inline] |
| IntVect IndexType::ixType | ( | ) | const [inline] |
| static IndexType IndexType::TheCellType | ( | ) | [static] |
This static member function returns an IndexType object all of whose components are of value IndexType::CELL. It is provided as a convenience to our users when defining a Box all of whose faces should be of type IndexType::CELL.
| static IndexType IndexType::TheNodeType | ( | ) | [static] |
This static member function returns an IndexType object all of whose components are of value IndexType::NODE. It is provided as a convenience to our users when defining a Box all of whose faces should be of type IndexType::NODE.
| unsigned char IndexType::mask | ( | int | k | ) | [inline, static, private] |
| std::ostream& operator<< | ( | std::ostream & | os, | |
| const IndexType & | itype | |||
| ) | [friend] |
Write an IndexType to an ostream in ASCII.
| std::istream& operator>> | ( | std::istream & | is, | |
| IndexType & | itype | |||
| ) | [friend] |
Read an IndexType from an istream.
unsigned char IndexType::itype [private] |
Referenced by any(), cellCentered(), clear(), flip(), IndexType(), ixType(), nodeCentered(), ok(), operator!=(), operator<(), operator=(), operator==(), set(), setall(), test(), and unset().
1.5.5