IBAMR  IBAMR version 0.19.
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
SAMRAI::pdat::NodeIndex< DIM > Class Template Reference

#include <NodeIndex.h>

Inheritance diagram for SAMRAI::pdat::NodeIndex< DIM >:
Inheritance graph
[legend]

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< 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
 
Index< DIM > & operator+= (const IntVector< DIM > &rhs)
 
Index< DIM > operator+ (const IntVector< DIM > &rhs) const
 
Index< DIM > & operator-= (const IntVector< DIM > &rhs)
 
Index< DIM > operator- (const IntVector< DIM > &rhs) const
 
IntVector< DIM > operator- () const
 
Index< DIM > & operator*= (const IntVector< DIM > &rhs)
 
Index< DIM > operator* (const IntVector< DIM > &rhs) const
 
Index< DIM > & operator/= (const IntVector< DIM > &rhs)
 
Index< DIM > & operator/= (const int rhs)
 
Index< DIM > operator/ (const IntVector< DIM > &rhs) const
 
Index< DIM > operator/ (const int rhs) const
 
intoperator() (const int i)
 
const intoperator() (const int i) const
 
 operator int * ()
 
 operator const int * () const
 
bool operator== (const IntVector< DIM > &rhs) const
 
bool operator!= (const IntVector< DIM > &rhs) const
 
bool operator< (const IntVector< DIM > &rhs) const
 
bool operator<= (const IntVector< DIM > &rhs) const
 
bool operator> (const IntVector< DIM > &rhs) const
 
bool operator>= (const IntVector< DIM > &rhs) const
 
void min (const IntVector< DIM > &rhs)
 
int min () const
 
void max (const IntVector< DIM > &rhs)
 
int max () const
 
int getProduct () const
 

Static Public Member Functions

static IntVector< DIM > min (const IntVector< DIM > &a, const IntVector< DIM > &b)
 
static IntVector< DIM > max (const IntVector< DIM > &a, const IntVector< DIM > &b)
 

Private Member Functions

void setOffsets ()
 

Private Attributes

int d_vector [DIM]
 

Static Private Attributes

static hier::IntVector< DIM > s_offsets [2<< DIM]
 
static bool s_offsets_are_set
 

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

◆ Corner

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

◆ NodeIndex() [1/4]

template<int DIM>
SAMRAI::pdat::NodeIndex< DIM >::NodeIndex ( )

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

◆ NodeIndex() [2/4]

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

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.

◆ NodeIndex() [3/4]

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

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.

◆ NodeIndex() [4/4]

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

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

Member Function Documentation

◆ operator=()

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

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

◆ operator+=() [1/3]

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

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

◆ operator+() [1/3]

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

Plus operator for a node index and an integer vector.

◆ operator+=() [2/3]

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

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

◆ operator+() [2/3]

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

Plus operator for a node index and an integer.

◆ operator-=() [1/3]

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

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

◆ operator-() [1/4]

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

Minus operator for a node index and an integer vector.

◆ operator-=() [2/3]

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

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

◆ operator-() [2/4]

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

Minus operator for a node index and an integer.

◆ operator*=() [1/3]

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

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

◆ operator*() [1/3]

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

Times operator for a node index and an integer vector.

◆ operator*=() [2/3]

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

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

◆ operator*() [2/3]

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

Times operator for a node index and an integer.

◆ operator==() [1/2]

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

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

◆ operator!=() [1/2]

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

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

◆ setOffsets()

template<int DIM>
void SAMRAI::pdat::NodeIndex< DIM >::setOffsets ( )
private

◆ operator+=() [3/3]

template<int DIM>
Index<DIM>& SAMRAI::hier::Index< DIM >::operator+= ( const IntVector< DIM > &  rhs)
inherited

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

◆ operator+() [3/3]

template<int DIM>
Index<DIM> SAMRAI::hier::Index< DIM >::operator+ ( const IntVector< DIM > &  rhs) const
inherited

Plus operator for an index and an integer vector.

◆ operator-=() [3/3]

template<int DIM>
Index<DIM>& SAMRAI::hier::Index< DIM >::operator-= ( const IntVector< DIM > &  rhs)
inherited

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

◆ operator-() [3/4]

template<int DIM>
Index<DIM> SAMRAI::hier::Index< DIM >::operator- ( const IntVector< DIM > &  rhs) const
inherited

Minus operator for an index and an integer vector.

◆ operator-() [4/4]

template<int DIM>
IntVector<DIM> SAMRAI::hier::IntVector< DIM >::operator- ( ) const
inherited

Unary minus to negate an integer vector.

◆ operator*=() [3/3]

template<int DIM>
Index<DIM>& SAMRAI::hier::Index< DIM >::operator*= ( const IntVector< DIM > &  rhs)
inherited

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

◆ operator*() [3/3]

template<int DIM>
Index<DIM> SAMRAI::hier::Index< DIM >::operator* ( const IntVector< DIM > &  rhs) const
inherited

Times operator for an index and an integer vector.

◆ operator/=() [1/2]

template<int DIM>
Index<DIM>& SAMRAI::hier::Index< DIM >::operator/= ( const IntVector< DIM > &  rhs)
inherited

Assign-quotient operator for an index and an integer vector.

◆ operator/=() [2/2]

template<int DIM>
Index<DIM>& SAMRAI::hier::Index< DIM >::operator/= ( const int  rhs)
inherited

Assign-quotient operator for an index and an integer.

◆ operator/() [1/2]

template<int DIM>
Index<DIM> SAMRAI::hier::Index< DIM >::operator/ ( const IntVector< DIM > &  rhs) const
inherited

Quotient operator for an index and an integer vector.

◆ operator/() [2/2]

template<int DIM>
Index<DIM> SAMRAI::hier::Index< DIM >::operator/ ( const int  rhs) const
inherited

Quotient operator for an index and an integer.

◆ operator()() [1/2]

template<int DIM>
int& SAMRAI::hier::IntVector< DIM >::operator() ( const int  i)
inherited

Return the specified component of the vector. No bounds checking.

◆ operator()() [2/2]

template<int DIM>
const int& SAMRAI::hier::IntVector< DIM >::operator() ( const int  i) const
inherited

Return the specified component of the vector as a const integer. No bounds checking.

◆ operator int *()

template<int DIM>
SAMRAI::hier::IntVector< DIM >::operator int * ( )
inherited

Return a pointer to the beginning of the vector data values.

◆ operator const int *()

template<int DIM>
SAMRAI::hier::IntVector< DIM >::operator const int * ( ) const
inherited

Return a const pointer to the beginning of the vector data values.

◆ operator==() [2/2]

template<int DIM>
bool SAMRAI::hier::IntVector< DIM >::operator== ( const IntVector< DIM > &  rhs) const
inherited

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

◆ operator!=() [2/2]

template<int DIM>
bool SAMRAI::hier::IntVector< DIM >::operator!= ( const IntVector< DIM > &  rhs) const
inherited

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

◆ operator<()

template<int DIM>
bool SAMRAI::hier::IntVector< DIM >::operator< ( const IntVector< DIM > &  rhs) const
inherited

Returns true if each integer in vector is less than corresponding integer in comparison vector.

◆ operator<=()

template<int DIM>
bool SAMRAI::hier::IntVector< DIM >::operator<= ( const IntVector< DIM > &  rhs) const
inherited

Returns true if each integer in vector is less or equal to corresponding integer in comparison vector.

◆ operator>()

template<int DIM>
bool SAMRAI::hier::IntVector< DIM >::operator> ( const IntVector< DIM > &  rhs) const
inherited

Returns true if each integer in vector is greater than corresponding integer in comparison vector.

◆ operator>=()

template<int DIM>
bool SAMRAI::hier::IntVector< DIM >::operator>= ( const IntVector< DIM > &  rhs) const
inherited

Returns true if each integer in vector is greater or equal to corresponding integer in comparison vector.

◆ min() [1/3]

template<int DIM>
void SAMRAI::hier::IntVector< DIM >::min ( const IntVector< DIM > &  rhs)
inherited

Return the component-wise minimum of two integer vector objects.

◆ min() [2/3]

template<int DIM>
int SAMRAI::hier::IntVector< DIM >::min ( ) const
inherited

Return the minimum entry in an integer vector.

◆ min() [3/3]

template<int DIM>
static IntVector<DIM> SAMRAI::hier::IntVector< DIM >::min ( const IntVector< DIM > &  a,
const IntVector< DIM > &  b 
)
staticinherited

Utility function to take the minimum of two integer vector objects.

◆ max() [1/3]

template<int DIM>
void SAMRAI::hier::IntVector< DIM >::max ( const IntVector< DIM > &  rhs)
inherited

Return the component-wise maximum of two integer vector objects.

◆ max() [2/3]

template<int DIM>
int SAMRAI::hier::IntVector< DIM >::max ( ) const
inherited

Return the maximum entry in an integer vector.

◆ max() [3/3]

template<int DIM>
static IntVector<DIM> SAMRAI::hier::IntVector< DIM >::max ( const IntVector< DIM > &  a,
const IntVector< DIM > &  b 
)
staticinherited

Utility function to take the maximum of two integer vector objects.

◆ getProduct()

template<int DIM>
int SAMRAI::hier::IntVector< DIM >::getProduct ( ) const
inherited

Return the product of the entries in the integer vector.

Member Data Documentation

◆ s_offsets

template<int DIM>
hier::IntVector<DIM> SAMRAI::pdat::NodeIndex< DIM >::s_offsets[2<< DIM]
staticprivate

◆ s_offsets_are_set

template<int DIM>
bool SAMRAI::pdat::NodeIndex< DIM >::s_offsets_are_set
staticprivate

◆ d_vector

template<int DIM>
int SAMRAI::hier::IntVector< DIM >::d_vector[DIM]
privateinherited

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