IntVect Class Reference

#include <IntVect.H>

List of all members.

Public Member Functions

 IntVect ()
 Construct an IntVect whose components are all zero.
 IntVect (D_DECL(int i, int j, int k))
 Construct an IntVect given the specific values for its coordinates.
 IntVect (const int *a)
 Construct an IntVect setting the coordinates to the corresponding values in the integer array a.
 IntVect (const Array< int > &a)
 Construct an IntVect from an Array<int>.
 IntVect (const IntVect &rhs)
 The copy constructor.
IntVectoperator= (const IntVect &rhs)
 The assignment operator.
int & operator[] (int i)
 Returns a reference to the i'th coordinate of the IntVect.
int operator[] (int i) const
 Returns the i'th coordinate of the IntVect.
IntVectsetVal (int i, int val)
 Set i'th coordinate of IntVect to val.
const int * getVect () const
 Returns a const pointer to an array of coordinates of the IntVect.
bool operator== (const IntVect &p) const
 Returns true of IntVect is equivalent to argument IntVect.
bool operator!= (const IntVect &p) const
 Returns true of IntVect is different from argument IntVect.
bool operator< (const IntVect &p) const
 Returns true if IntVect is less than argument IntVect.
bool operator<= (const IntVect &p) const
 Returns true if IntVect is less than or equal to argument IntVect.
bool operator> (const IntVect &p) const
 Returns true if IntVect is greater than argument IntVect.
bool operator>= (const IntVect &p) const
 Returns true if IntVect is greater than or equal to argument IntVect.
bool lexLT (const IntVect &s) const
 Returns true if this IntVect is lexically less than the argument.
bool lexGT (const IntVect &s) const
 Returns true if this IntVect is lexically greater than the argument.
IntVect operator+ () const
 Unary plus -- for completeness.
IntVect operator- () const
 Unary Minus -- negates all components.
IntVectoperator+= (int s)
 Modifies IntVect by addition of a scaler to each component.
IntVectoperator+= (const IntVect &p)
 Modifies IntVect by component-wise addition with argument.
IntVectoperator*= (int s)
 Modifies IntVect by multiplication of a scaler to each component.
IntVectoperator*= (const IntVect &p)
 Modifies IntVect by component-wise multiplication with argument.
IntVectoperator/= (int s)
 Modifies IntVect by division by a scaler to each component.
IntVectoperator/= (const IntVect &p)
 Modifies IntVect by component-wise division with argument.
IntVectoperator-= (int s)
 Modifies IntVect by subtraction of a scaler to each component.
IntVectoperator-= (const IntVect &p)
 Modifies IntVect by component-wise subtraction with argument.
IntVect operator+ (const IntVect &p) const
 Returns component-wise sum of IntVect and argument.
IntVect operator+ (int s) const
 Return an IntVect that is this IntVect + s.
IntVect operator- (const IntVect &p) const
 Returns component-wise difference of IntVect and argument.
IntVect operator- (int s) const
 Return an IntVect that is this IntVect - s.
IntVect operator* (const IntVect &p) const
 Returns component-wise product of IntVect and argument.
IntVect operator* (int s) const
 Returns component-wise product of IntVect and s.
IntVect operator/ (const IntVect &p) const
 Returns component-wise division of IntVect by argument.
IntVect operator/ (int s) const
 Returns component-wise division of IntVect by s.
IntVectmin (const IntVect &p)
 Modifies IntVect by taking component-wise min with argument.
IntVectmax (const IntVect &p)
 Modifies IntVect by taking component-wise max with argument.
IntVectscale (int s)
 Modify IntVect by multiplying each coordinate by s.
IntVectreflect (int ref_ix, int idir)
 Modify IntVect by reflecting it in the plane defined by the index ref and with normal in the direction of idir.
IntVectshift (int coord, int s)
 Modify IntVect by adding s to given coordinate.
IntVectshift (const IntVect &iv)
 Equivalent to shift(0,iv[0]).shift(1,iv[1]) ...
IntVectdiagShift (int s)
 Modify IntVect by adding s to each coordinate.
IntVectcoarsen (const IntVect &p)
 Modify IntVect by component-wise integer projection.
IntVectcoarsen (int p)
 Modify IntVect by component-wise integer projection.

Static Public Member Functions

static const IntVectTheZeroVector ()
 This static member function returns a reference to a constant IntVect object, all of whose BL arguments are set to zero (0).
static const IntVectTheUnitVector ()
 This static member function returns a reference to a constant IntVect object, all of whose BL arguments are set to one (1).
static const IntVectTheNodeVector ()
 This static member function returns a reference to a constant IntVect object, all of whose BL arguments are set to IndexType::NODE.
static const IntVectTheCellVector ()
 This static member function returns a reference to a constant IntVect object, all of whose BL arguments are set to IndexType::CELL.

Protected Attributes

int vect [BL_SPACEDIM]

Friends

MPI_Datatype ParallelDescriptor::Mpi_typemap ()


Constructor & Destructor Documentation

IntVect::IntVect (  )  [inline]

Construct an IntVect whose components are all zero.

References vect.

Referenced by operator*(), operator*(), operator+(), operator+(), operator-(), operator-(), and operator/().

IntVect::IntVect ( D_DECL(int i, int j, int k)   )  [inline]

Construct an IntVect given the specific values for its coordinates.

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

References vect.

IntVect::IntVect ( const int *  a  )  [explicit]

Construct an IntVect setting the coordinates to the corresponding values in the integer array a.

References vect.

IntVect::IntVect ( const Array< int > &  a  )  [explicit]

Construct an IntVect from an Array<int>.

It is an error if the Array<int> doesn' t have the same dimension as this IntVect.

References BL_ASSERT, Array< T >::size(), and vect.

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

The copy constructor.

References vect.


Member Function Documentation

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

The assignment operator.

References vect.

int & IntVect::operator[] ( int  i  )  [inline]

Returns a reference to the i'th coordinate of the IntVect.

References BL_ASSERT, and vect.

int IntVect::operator[] ( int  i  )  const [inline]

Returns the i'th coordinate of the IntVect.

References BL_ASSERT, and vect.

IntVect & IntVect::setVal ( int  i,
int  val 
) [inline]

const int * IntVect::getVect (  )  const [inline]

Returns a const pointer to an array of coordinates of the IntVect.

Useful for arguments to FORTRAN calls.

References vect.

Referenced by Box::getVect(), Box::hiVect(), BaseFab< T >::length(), Box::loVect(), and BaseFab< T >::performCopy().

bool IntVect::operator== ( const IntVect p  )  const [inline]

Returns true of IntVect is equivalent to argument IntVect.

All comparisons between analogous components must be satisfied.

References vect.

bool IntVect::operator!= ( const IntVect p  )  const [inline]

Returns true of IntVect is different from argument IntVect.

All comparisons between analogous components must be satisfied.

References vect.

bool IntVect::operator< ( const IntVect p  )  const [inline]

Returns true if IntVect is less than argument IntVect.

All comparisons between analogous components must be satisfied.

References vect.

bool IntVect::operator<= ( const IntVect p  )  const [inline]

Returns true if IntVect is less than or equal to argument IntVect.

All comparisons between analogous components must be satisfied.

References vect.

bool IntVect::operator> ( const IntVect p  )  const [inline]

Returns true if IntVect is greater than argument IntVect.

All comparisons between analogous components must be satisfied.

References vect.

bool IntVect::operator>= ( const IntVect p  )  const [inline]

Returns true if IntVect is greater than or equal to argument IntVect.

All comparisons between analogous components must be satisfied.

References vect.

bool IntVect::lexLT ( const IntVect s  )  const

Returns true if this IntVect is lexically less than the argument.

References LLT0, LLT1, LLT2, and vect.

bool IntVect::lexGT ( const IntVect s  )  const

Returns true if this IntVect is lexically greater than the argument.

References LGT0, LGT1, LGT2, and vect.

IntVect IntVect::operator+ (  )  const [inline]

Unary plus -- for completeness.

IntVect IntVect::operator- (  )  const [inline]

Unary Minus -- negates all components.

References IntVect(), and vect.

IntVect & IntVect::operator+= ( int  s  )  [inline]

Modifies IntVect by addition of a scaler to each component.

References vect.

IntVect & IntVect::operator+= ( const IntVect p  )  [inline]

Modifies IntVect by component-wise addition with argument.

References vect.

IntVect & IntVect::operator*= ( int  s  )  [inline]

Modifies IntVect by multiplication of a scaler to each component.

References vect.

IntVect & IntVect::operator*= ( const IntVect p  )  [inline]

Modifies IntVect by component-wise multiplication with argument.

References vect.

IntVect & IntVect::operator/= ( int  s  )  [inline]

Modifies IntVect by division by a scaler to each component.

References vect.

IntVect & IntVect::operator/= ( const IntVect p  )  [inline]

Modifies IntVect by component-wise division with argument.

References vect.

IntVect & IntVect::operator-= ( int  s  )  [inline]

Modifies IntVect by subtraction of a scaler to each component.

References vect.

IntVect & IntVect::operator-= ( const IntVect p  )  [inline]

Modifies IntVect by component-wise subtraction with argument.

References vect.

IntVect IntVect::operator+ ( const IntVect p  )  const [inline]

Returns component-wise sum of IntVect and argument.

References IntVect(), and vect.

IntVect IntVect::operator+ ( int  s  )  const [inline]

Return an IntVect that is this IntVect + s.

References IntVect(), and vect.

IntVect IntVect::operator- ( const IntVect p  )  const [inline]

Returns component-wise difference of IntVect and argument.

References IntVect(), and vect.

IntVect IntVect::operator- ( int  s  )  const [inline]

Return an IntVect that is this IntVect - s.

References IntVect(), and vect.

IntVect IntVect::operator* ( const IntVect p  )  const [inline]

Returns component-wise product of IntVect and argument.

References IntVect(), and vect.

IntVect IntVect::operator* ( int  s  )  const [inline]

Returns component-wise product of IntVect and s.

References IntVect(), and vect.

IntVect IntVect::operator/ ( const IntVect p  )  const [inline]

Returns component-wise division of IntVect by argument.

References IntVect(), and vect.

IntVect IntVect::operator/ ( int  s  )  const [inline]

Returns component-wise division of IntVect by s.

References IntVect(), and vect.

IntVect & IntVect::min ( const IntVect p  ) 

Modifies IntVect by taking component-wise min with argument.

References BoxLib::min(), and vect.

Referenced by BoxLib::min(), Box::minBox(), and Box::operator &=().

IntVect & IntVect::max ( const IntVect p  ) 

Modifies IntVect by taking component-wise max with argument.

References BoxLib::max(), and vect.

Referenced by BoxLib::max(), Box::minBox(), and Box::operator &=().

IntVect & IntVect::scale ( int  s  ) 

Modify IntVect by multiplying each coordinate by s.

References vect.

Referenced by Box::refine().

IntVect & IntVect::reflect ( int  ref_ix,
int  idir 
)

Modify IntVect by reflecting it in the plane defined by the index ref and with normal in the direction of idir.

References BL_ASSERT, and vect.

IntVect & IntVect::shift ( int  coord,
int  s 
)

IntVect & IntVect::shift ( const IntVect iv  ) 

Equivalent to shift(0,iv[0]).shift(1,iv[1]) ...

IntVect & IntVect::diagShift ( int  s  ) 

Modify IntVect by adding s to each coordinate.

References vect.

Referenced by Box::grow().

IntVect & IntVect::coarsen ( const IntVect p  ) 

Modify IntVect by component-wise integer projection.

References BL_ASSERT, TheZeroVector(), and vect.

Referenced by Box::coarsen().

IntVect & IntVect::coarsen ( int  p  ) 

Modify IntVect by component-wise integer projection.

References BL_ASSERT, and vect.

const IntVect & IntVect::TheZeroVector (  )  [static]

This static member function returns a reference to a constant IntVect object, all of whose BL arguments are set to zero (0).

Figuratively, it is the zero vector in BL-dimensional space. It is provided as a convenient way to specify the zero vector.

Referenced by Box::Box(), coarsen(), BoxLib::coarsen(), Box::coarsen(), Box::convert(), and Box::TheUnitBox().

const IntVect & IntVect::TheUnitVector (  )  [static]

This static member function returns a reference to a constant IntVect object, all of whose BL arguments are set to one (1).

Figuratively, it is the unit vector in BL-dimensional space. It is provided as a convenient way to specify the unit vector.

Referenced by Box::Box(), Box::convert(), and Box::refine().

const IntVect & IntVect::TheNodeVector (  )  [static]

This static member function returns a reference to a constant IntVect object, all of whose BL arguments are set to IndexType::NODE.

It is provided as a convenience to our users when defining Boxes.

References IndexType::NODE.

const IntVect & IntVect::TheCellVector (  )  [static]

This static member function returns a reference to a constant IntVect object, all of whose BL arguments are set to IndexType::CELL.

It is provided as a convenience to our users when defining Boxes.

References IndexType::CELL.


Friends And Related Function Documentation


Member Data Documentation

int IntVect::vect[BL_SPACEDIM] [protected]


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