Chombo + EB
3.2
|
Cell-Based or Node-Based Indices. More...
#include <Box.H>
Public Types | |
enum | CellIndex { CELL = 0, NODE = 1 } |
Public Member Functions | |
IndexType () | |
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) |
Cell-Based or Node-Based Indices.
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.
enum IndexType::CellIndex |
|
inline |
The default constructor.
Referenced by Box::convert().
|
inlineexplicit |
The assignment operator.
References itype.
|
inline |
|
inline |
|
inline |
True if this IndexType is NODE based in direction dir.
Referenced by Box::coarsenable(), and operator[]().
|
inline |
Set this IndexType to be NODE based in all directions.
References CH_SPACEDIM, and itype.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
True if IndexTypes are identical.
References itype.
Referenced by Box::copy(), and Box::operator!=().
|
inline |
|
inline |
|
inline |
True if this IndexType is CELL based in all directions.
References itype.
Referenced by Box::copy().
|
inline |
True if this IndexType is NODE based in all directions.
References CH_SPACEDIM, and itype.
|
inline |
|
inline |
|
inline |
|
inline |
Convert this IndexType to an IntVect via component-wise conversion of enum CellIndex to int.
References D_DECL6, and itype.
Referenced by Box::copy().
|
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 |
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.
|
inlinestaticprivate |
|
friend |
Write an IndexType to an ostream in ASCII.
Referenced by Box::coarsenable().
|
friend |
Read an IndexType from an istream.
Referenced by Box::coarsenable().
|
private |
Referenced by any(), cellCentered(), clear(), flip(), IndexType(), ixType(), nodeCentered(), ok(), operator!=(), operator<(), operator=(), operator==(), set(), setall(), test(), and unset().