#include <IntVect.H>
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. | |
IntVect & | operator= (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. | |
IntVect & | setVal (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. | |
IntVect & | operator+= (int s) |
Modifies IntVect by addition of a scaler to each component. | |
IntVect & | operator+= (const IntVect &p) |
Modifies IntVect by component-wise addition with argument. | |
IntVect & | operator*= (int s) |
Modifies IntVect by multiplication of a scaler to each component. | |
IntVect & | operator*= (const IntVect &p) |
Modifies IntVect by component-wise multiplication with argument. | |
IntVect & | operator/= (int s) |
Modifies IntVect by division by a scaler to each component. | |
IntVect & | operator/= (const IntVect &p) |
Modifies IntVect by component-wise division with argument. | |
IntVect & | operator-= (int s) |
Modifies IntVect by subtraction of a scaler to each component. | |
IntVect & | operator-= (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. | |
IntVect & | min (const IntVect &p) |
Modifies IntVect by taking component-wise min with argument. | |
IntVect & | max (const IntVect &p) |
Modifies IntVect by taking component-wise max with argument. | |
IntVect & | scale (int s) |
Modify IntVect by multiplying each coordinate by s. | |
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. | |
IntVect & | shift (int coord, int s) |
Modify IntVect by adding s to given coordinate. | |
IntVect & | shift (const IntVect &iv) |
Equivalent to shift(0,iv[0]).shift(1,iv[1]) ... | |
IntVect & | diagShift (int s) |
Modify IntVect by adding s to each coordinate. | |
IntVect & | coarsen (const IntVect &p) |
Modify IntVect by component-wise integer projection. | |
IntVect & | coarsen (int p) |
Modify IntVect by component-wise integer projection. | |
Static Public Member Functions | |
static const IntVect & | TheZeroVector () |
This static member function returns a reference to a constant IntVect object, all of whose BL arguments are set to zero (0). | |
static const IntVect & | TheUnitVector () |
This static member function returns a reference to a constant IntVect object, all of whose BL arguments are set to one (1). | |
static const IntVect & | TheNodeVector () |
This static member function returns a reference to a constant IntVect object, all of whose BL arguments are set to IndexType::NODE. | |
static const IntVect & | TheCellVector () |
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 () |
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] |
IntVect::IntVect | ( | const int * | a | ) | [explicit] |
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.
int & IntVect::operator[] | ( | int | i | ) | [inline] |
int IntVect::operator[] | ( | int | i | ) | const [inline] |
IntVect & IntVect::setVal | ( | int | i, | |
int | val | |||
) | [inline] |
Set i'th coordinate of IntVect to val.
References BL_ASSERT, and vect.
Referenced by BoxLib::adjCell(), BoxLib::adjCellHi(), BoxLib::bdryHi(), BoxLib::bdryNode(), Box::chop(), Box::coarsen(), Box::next(), Box::setBig(), Box::setRange(), and Box::setSmall().
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] |
bool IntVect::operator!= | ( | const IntVect & | p | ) | const [inline] |
bool IntVect::operator< | ( | const IntVect & | p | ) | const [inline] |
bool IntVect::operator<= | ( | const IntVect & | p | ) | const [inline] |
bool IntVect::operator> | ( | const IntVect & | p | ) | const [inline] |
bool IntVect::operator>= | ( | const IntVect & | p | ) | const [inline] |
bool IntVect::lexLT | ( | const IntVect & | s | ) | const |
bool IntVect::lexGT | ( | const IntVect & | s | ) | const |
IntVect IntVect::operator+ | ( | ) | const [inline] |
Unary plus -- for completeness.
IntVect IntVect::operator- | ( | ) | const [inline] |
IntVect & IntVect::operator+= | ( | int | s | ) | [inline] |
IntVect & IntVect::operator*= | ( | int | s | ) | [inline] |
IntVect & IntVect::operator/= | ( | int | s | ) | [inline] |
IntVect & IntVect::operator-= | ( | int | s | ) | [inline] |
IntVect IntVect::operator+ | ( | int | s | ) | const [inline] |
IntVect IntVect::operator- | ( | int | s | ) | const [inline] |
IntVect IntVect::operator* | ( | int | s | ) | const [inline] |
IntVect IntVect::operator/ | ( | int | s | ) | const [inline] |
Modifies IntVect by taking component-wise min with argument.
References BoxLib::min(), and vect.
Referenced by BoxLib::min(), Box::minBox(), and Box::operator &=().
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 | ) |
IntVect & IntVect::reflect | ( | int | ref_ix, | |
int | idir | |||
) |
IntVect & IntVect::shift | ( | int | coord, | |
int | s | |||
) |
Modify IntVect by adding s to given coordinate.
References BL_ASSERT, and vect.
Referenced by Box::convert(), Box::enclosedCells(), Box::grow(), Box::growHi(), Box::growLo(), Box::next(), Box::shift(), Box::shiftHalf(), and Box::surroundingNodes().
IntVect & IntVect::diagShift | ( | int | s | ) |
Modify IntVect by component-wise integer projection.
References BL_ASSERT, TheZeroVector(), and vect.
Referenced by Box::coarsen().
IntVect & IntVect::coarsen | ( | int | p | ) |
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.
MPI_Datatype ParallelDescriptor::Mpi_typemap | ( | ) | [friend] |
int IntVect::vect[BL_SPACEDIM] [protected] |
Referenced by coarsen(), diagShift(), getVect(), IntVect(), lexGT(), lexLT(), max(), min(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), operator[](), reflect(), scale(), setVal(), and shift().