IndexType Class Reference

: Cell-Based or Node-Based Indices More...

#include <IndexType.H>

List of all members.

Public Types

enum  CellIndex { CELL = 0, NODE = 1 }
 The cell index type: one of CELL or NODE. More...

Public Member Functions

 IndexType ()
 The default constructor.
 IndexType (const IndexType &rhs)
 The copy constructor.
 IndexType (const IntVect &iv)
 Construct an IndexType identical to an IntVect.
IndexTypeoperator= (const IndexType &rhs)
 The assignment operator.
 IndexType (D_DECL(CellIndex i, CellIndex j, CellIndex k))
 Construct an IndexType given an explicit CellIndex for each direction.
void set (int dir)
 Set IndexType to be NODE based in direction dir.
void unset (int dir)
 Set IndexType to be CELL based in direction dir.
bool test (int dir) const
 True if IndexType is NODE based in direction dir.
void setall ()
 Set NODE based in all directions.
void clear ()
 Set CELL based in all directions.
bool any () const
 True if this IndexType is NODE based in any direction.
bool ok () const
 True if IndexType is valid.
void flip (int i)
 Change from CELL to NODE or NODE to CELL in direction dir.
bool operator== (const IndexType &t) const
 True if IndexTypes are identical.
bool operator!= (const IndexType &t) const
 True if IndexTypes are not identical.
bool cellCentered () const
 True if the IndexType is CELL based in all directions.
bool nodeCentered () const
 True if the IndexType is NODE based in all directions.
void setType (int dir, CellIndex t)
 Set IndexType to CellIndex type t in direction dir.
CellIndex ixType (int dir) const
 Returns the CellIndex in direction dir.
int operator[] (int dir) const
 Return an integer representing the IndexType in direction dir.
IntVect ixType () const
 Fill an IntVect of size BL with IndexTypes.

Static Public Member Functions

static IndexType TheCellType ()
 This static member function returns an IndexType object of value IndexType::CELL.
static IndexType TheNodeType ()
 This static member function returns an IndexType object of value IndexType::NODE.
static IndexType TheUMACType ()
static IndexType TheVMACType ()
static IndexType TheWMACType ()

Friends

MPI_Datatype ParallelDescriptor::Mpi_typemap ()


Detailed Description

: Cell-Based or Node-Based Indices

The class IndexType defines an index as being cell based or node (edge) based in each of the BL directions. This class defines an enumerated type CellIndex to be either CELL or NODE; i.e. each of the BL dimensions must be either CELL or NODE.


Member Enumeration Documentation

The cell index type: one of CELL or NODE.

Enumerator:
CELL 
NODE 


Constructor & Destructor Documentation

IndexType::IndexType (  )  [inline]

The default constructor.

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

The copy constructor.

IndexType::IndexType ( const IntVect iv  )  [explicit]

Construct an IndexType identical to an IntVect.

IndexType::IndexType ( D_DECL(CellIndex i, CellIndex j, CellIndex k)   ) 

Construct an IndexType given an explicit CellIndex for each direction.

D is a macro that sets the constructor to take BL arguments.


Member Function Documentation

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

The assignment operator.

References itype.

void IndexType::set ( int  dir  )  [inline]

Set IndexType to be NODE based in direction dir.

Referenced by operator>>(), and Box::surroundingNodes().

void IndexType::unset ( int  dir  )  [inline]

Set IndexType to be CELL based in direction dir.

Referenced by Box::enclosedCells(), operator>>(), and setType().

bool IndexType::test ( int  dir  )  const [inline]

True if IndexType is NODE based in direction dir.

Referenced by operator<<(), and operator[]().

void IndexType::setall (  )  [inline]

Set NODE based in all directions.

Referenced by Box::surroundingNodes().

void IndexType::clear (  )  [inline]

Set CELL based in all directions.

Referenced by Box::enclosedCells().

bool IndexType::any (  )  const [inline]

True if this IndexType is NODE based in any direction.

Referenced by Box::cellCentered(), and Box::coarsen().

bool IndexType::ok (  )  const [inline]

True if IndexType is valid.

Referenced by Box::ok().

void IndexType::flip ( int  i  )  [inline]

Change from CELL to NODE or NODE to CELL in direction dir.

Referenced by Box::shiftHalf().

bool IndexType::operator== ( const IndexType t  )  const [inline]

True if IndexTypes are identical.

References itype.

bool IndexType::operator!= ( const IndexType t  )  const [inline]

True if IndexTypes are not identical.

References itype.

bool IndexType::cellCentered (  )  const [inline]

True if the IndexType is CELL based in all directions.

bool IndexType::nodeCentered (  )  const [inline]

True if the IndexType is NODE based in all directions.

void IndexType::setType ( int  dir,
CellIndex  t 
)

Set IndexType to CellIndex type t in direction dir.

References CELL, and unset().

Referenced by Box::convert().

IndexType::CellIndex IndexType::ixType ( int  dir  )  const

Returns the CellIndex in direction dir.

Referenced by Box::convert(), Box::refine(), BoxList::remove(), and Box::type().

int IndexType::operator[] ( int  dir  )  const [inline]

Return an integer representing the IndexType in direction dir.

References test().

IntVect IndexType::ixType (  )  const

Fill an IntVect of size BL with IndexTypes.

IndexType IndexType::TheCellType (  )  [static]

This static member function returns an IndexType object 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.

References CELL.

IndexType IndexType::TheNodeType (  )  [static]

This static member function returns an IndexType object 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.

References NODE.

IndexType IndexType::TheUMACType (  )  [static]

References CELL, and NODE.

IndexType IndexType::TheVMACType (  )  [static]

References CELL, and NODE.

IndexType IndexType::TheWMACType (  )  [static]

References CELL, and NODE.


Friends And Related Function Documentation


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

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