SAMRAI::pdat::NodeIndex< DIM > Class Template Reference

#include <source/patchdata/node/NodeIndex.h>

Inheritance diagram for SAMRAI::pdat::NodeIndex< DIM >:

Inheritance graph
[legend]
List of all members.

Public Types

enum  Corner {
  Left = 0, Right = 1, LowerLeft = 0, LowerRight = 1,
  UpperLeft = 2, UpperRight = 3, LLL = 0, ULL = 1,
  LUL = 2, UUL = 3, LLU = 4, ULU = 5,
  LUU = 6, UUU = 7
}

Public Member Functions

 NodeIndex ()
 NodeIndex (const hier::Index< DIM > &rhs, const Corner corner)
 NodeIndex (const hier::Index< DIM > &rhs, const hier::IntVector< DIM > &corner)
 NodeIndex (const NodeIndex< DIM > &rhs)
NodeIndex< DIM > & operator= (const NodeIndex< DIM > &rhs)
 ~NodeIndex ()
NodeIndex< DIM > & operator+= (const hier::IntVector< DIM > &rhs)
NodeIndex< DIM > operator+ (const hier::IntVector< DIM > &rhs) const
NodeIndex< DIM > & operator+= (const int rhs)
NodeIndex< DIM > operator+ (const int rhs) const
NodeIndex< DIM > & operator-= (const hier::IntVector< DIM > &rhs)
NodeIndex< DIM > operator- (const hier::IntVector< DIM > &rhs) const
NodeIndex< DIM > & operator-= (const int rhs)
NodeIndex< DIM > operator- (const int rhs) const
NodeIndex< DIM > & operator *= (const hier::IntVector< DIM > &rhs)
NodeIndex< DIM > operator * (const hier::IntVector< DIM > &rhs) const
NodeIndex< DIM > & operator *= (const int rhs)
NodeIndex< DIM > operator * (const int rhs) const
bool operator== (const NodeIndex< DIM > &rhs) const
bool operator!= (const NodeIndex< DIM > &rhs) const

Detailed Description

template<int DIM>
class SAMRAI::pdat::NodeIndex< DIM >

Class NodeIndex<DIM> implements a simple n-dimensional integer vector for node centered variables. Given a hier::Box in the AMR abstract index space, the index space for a node-centered variable runs from the lower corner of the box to the upper corner of the box plus one in each dimension. See the node box geometry class for more information about the mapping between the AMR index space and the node indices.

See also:
hier::Index

pdat::NodeData

pdat::NodeGeometry

pdat::NodeIterator


Member Enumeration Documentation

template<int DIM>
enum SAMRAI::pdat::NodeIndex::Corner

The Corner enumerated type is used when converting from a cell centered index to a node centered index. In 1d, use Left and Right. In 2d, use LowerLeft, LowerRight, UpperLeft, and UpperRight. In 3d, the naming is less intuitive, and use names LLL through UUU, where L means lower and U means upper. Therefore, to get the box upper in X, lower in Y, and lower in Z, use corner name ULL.

Enumerator:
Left 
Right 
LowerLeft 
LowerRight 
UpperLeft 
UpperRight 
LLL 
ULL 
LUL 
UUL 
LLU 
ULU 
LUU 
UUU 


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::pdat::NodeIndex< DIM >::NodeIndex (  )  [inline]

The default constructor for a node index creates an uninitialized index.

template<int DIM>
SAMRAI::pdat::NodeIndex< DIM >::NodeIndex ( const hier::Index< DIM > &  rhs,
const Corner  corner 
) [inline]

Construct a node index from a regular index and a corner.

The Corner enumerated type is only defined for 3D or lower, so use the next constructor with an hier::IntVector argument when using higher dimensions.

template<int DIM>
SAMRAI::pdat::NodeIndex< DIM >::NodeIndex ( const hier::Index< DIM > &  rhs,
const hier::IntVector< DIM > &  corner 
) [inline]

Construct a node index from a regular index and an hier::IntVector. The hier::IntVector is binary--an assertion failure will result if it contains any values other than 0 or 1. For each dimension, if the hier::IntVector contains a 0, the node index will represent a lower bound in that dimensional direction, and if 1 will represent an upper bound in that direction.

template<int DIM>
SAMRAI::pdat::NodeIndex< DIM >::NodeIndex ( const NodeIndex< DIM > &  rhs  )  [inline]

The copy constructor creates a node index equal to the argument.

template<int DIM>
SAMRAI::pdat::NodeIndex< DIM >::~NodeIndex (  )  [inline]

The node index destructor does nothing interesting.


Member Function Documentation

template<int DIM>
NodeIndex< DIM > & SAMRAI::pdat::NodeIndex< DIM >::operator= ( const NodeIndex< DIM > &  rhs  )  [inline]

The assignment operator sets the node index equal to the argument.

template<int DIM>
NodeIndex< DIM > & SAMRAI::pdat::NodeIndex< DIM >::operator+= ( const hier::IntVector< DIM > &  rhs  )  [inline]

Plus-equals operator for a node index and an integer vector.

Reimplemented from SAMRAI::hier::Index< DIM >.

template<int DIM>
NodeIndex< DIM > SAMRAI::pdat::NodeIndex< DIM >::operator+ ( const hier::IntVector< DIM > &  rhs  )  const [inline]

Plus operator for a node index and an integer vector.

Reimplemented from SAMRAI::hier::Index< DIM >.

template<int DIM>
NodeIndex< DIM > & SAMRAI::pdat::NodeIndex< DIM >::operator+= ( const int  rhs  )  [inline]

Plus-equals operator for a node index and an integer.

Reimplemented from SAMRAI::hier::Index< DIM >.

template<int DIM>
NodeIndex< DIM > SAMRAI::pdat::NodeIndex< DIM >::operator+ ( const int  rhs  )  const [inline]

Plus operator for a node index and an integer.

Reimplemented from SAMRAI::hier::Index< DIM >.

template<int DIM>
NodeIndex< DIM > & SAMRAI::pdat::NodeIndex< DIM >::operator-= ( const hier::IntVector< DIM > &  rhs  )  [inline]

Minus-equals operator for a node index and an integer vector.

Reimplemented from SAMRAI::hier::Index< DIM >.

template<int DIM>
NodeIndex< DIM > SAMRAI::pdat::NodeIndex< DIM >::operator- ( const hier::IntVector< DIM > &  rhs  )  const [inline]

Minus operator for a node index and an integer vector.

Reimplemented from SAMRAI::hier::Index< DIM >.

template<int DIM>
NodeIndex< DIM > & SAMRAI::pdat::NodeIndex< DIM >::operator-= ( const int  rhs  )  [inline]

Minus-equals operator for a node index and an integer.

Reimplemented from SAMRAI::hier::Index< DIM >.

template<int DIM>
NodeIndex< DIM > SAMRAI::pdat::NodeIndex< DIM >::operator- ( const int  rhs  )  const [inline]

Minus operator for a node index and an integer.

Reimplemented from SAMRAI::hier::Index< DIM >.

template<int DIM>
NodeIndex< DIM > & SAMRAI::pdat::NodeIndex< DIM >::operator *= ( const hier::IntVector< DIM > &  rhs  )  [inline]

Times-equals operator for a node index and an integer vector.

Reimplemented from SAMRAI::hier::Index< DIM >.

template<int DIM>
NodeIndex< DIM > SAMRAI::pdat::NodeIndex< DIM >::operator * ( const hier::IntVector< DIM > &  rhs  )  const [inline]

Times operator for a node index and an integer vector.

Reimplemented from SAMRAI::hier::Index< DIM >.

template<int DIM>
NodeIndex< DIM > & SAMRAI::pdat::NodeIndex< DIM >::operator *= ( const int  rhs  )  [inline]

Times-equals operator for a node index and an integer.

Reimplemented from SAMRAI::hier::Index< DIM >.

template<int DIM>
NodeIndex< DIM > SAMRAI::pdat::NodeIndex< DIM >::operator * ( const int  rhs  )  const [inline]

Times operator for a node index and an integer.

Reimplemented from SAMRAI::hier::Index< DIM >.

template<int DIM>
bool SAMRAI::pdat::NodeIndex< DIM >::operator== ( const NodeIndex< DIM > &  rhs  )  const [inline]

Returns true if two node index objects are equal. All components must be the same for equality.

template<int DIM>
bool SAMRAI::pdat::NodeIndex< DIM >::operator!= ( const NodeIndex< DIM > &  rhs  )  const [inline]

Returns true if two node index objects are not equal. Any of the components may be different for inequality.


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:28:47 2009 for SAMRAI by  doxygen 1.5.1