Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

IntVect Class Reference

#include <IntVect.H>

Collaboration diagram for IntVect:

Collaboration graph
[legend]
List of all members.

Public Methods

 IntVect ()
 {\bf Constructors and Accessors}

 ~IntVect ()
 IntVect (D_DECL(int i, int j, int k))
 IntVect (const int *a)
const int * dataPtr () const
int * dataPtr ()
 IntVect (const IntVect &rhs)
IntVect copy () const
IntVect & operator= (const IntVect &rhs)
int & operator[] (int i)
int operator[] (int i) const
void setVal (int i, int val)
const int * getVect () const
bool operator== (const IntVect &p) const
 {\bf Comparison Operators}

bool operator!= (const IntVect &p) const
bool operator< (const IntVect &p) const
bool operator<= (const IntVect &p) const
bool operator> (const IntVect &p) const
bool operator>= (const IntVect &p) const
bool lexLT (const IntVect &s) const
bool lexGT (const IntVect &s) const
IntVect operator+ () const
 {\bf Arithmetic Operators}

IntVect operator- () const
IntVect & operator+= (int s)
 addition

IntVect & operator+= (const IntVect &p)
IntVect operator+ (const IntVect &p) const
IntVect operator+ (int s) const
IntVect & operator-= (int s)
 subtraction

IntVect & operator-= (const IntVect &p)
IntVect operator- (const IntVect &p) const
IntVect operator- (int s) const
IntVect & operator *= (int s)
 multiplication

IntVect & operator *= (const IntVect &p)
IntVect operator * (const IntVect &p) const
IntVect operator * (int s) const
IntVect & operator/= (int s)
 division

IntVect & operator/= (const IntVect &p)
IntVect operator/ (const IntVect &p) const
IntVect operator/ (int s) const
IntVect & min (const IntVect &p)
 other

IntVect & max (const IntVect &p)
IntVect & scale (int s)
IntVect & reflect (int ref_ix, int idir)
IntVect & shift (int coord, int s)
IntVect & shift (const IntVect &iv)
IntVect & diagShift (int s)
IntVect & coarsen (const IntVect &p)
IntVect & coarsen (int p)
void printOn (std::ostream &os) const
 {\bf I/O Functions}

void p () const
void dumpOn (std::ostream &os) const

Static Public Methods

const IntVect TheZeroVector ()
const IntVect TheUnitVector ()

Static Public Attributes

const IntVect Zero
const IntVect Unit

Protected Attributes

int vect [SpaceDim]

Static Protected Attributes

const size_t IntVectSize

Friends

class Box
class HDF5Handle
class VolIndex
class FaceIndex
IntVect operator+ (int s, const IntVect &p)
IntVect operator- (int s, const IntVect &p)
IntVect operator * (int s, const IntVect &p)
IntVect min (const IntVect &p1, const IntVect &p2)
IntVect max (const IntVect &p1, const IntVect &p2)
IntVect scale (const IntVect &p, int s)
IntVect reflect (const IntVect &a, int ref_ix, int idir)
IntVect diagShift (const IntVect &p, int s)
IntVect coarsen (const IntVect &p, int s)
IntVect coarsen (const IntVect &p1, const IntVect &p2)
std::ostream & operator<< (std::ostream &os, const IntVect &iv)
std::istream & operator>> (std::istream &os, IntVect &iv)
IntVect BASISV (int dir)
 {\bf IntVect Constants}


Constructor & Destructor Documentation

IntVect::IntVect   [inline]
 

{\bf Constructors and Accessors}

Construct an IntVect whose components are uninitialized.

IntVect::~IntVect   [inline]
 

Destructor

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

Construct an IntVect given the specific values for its coordinates. D\_DECL is a macro that sets the constructor to take CH\_SPACEDIM arguments.

IntVect::IntVect const int *    a [inline, explicit]
 

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

IntVect::IntVect const IntVect &    rhs [inline]
 

The copy constructor.


Member Function Documentation

IntVect& IntVect::coarsen int    p
 

Modify IntVect by component-wise integer projection.

IntVect& IntVect::coarsen const IntVect &    p
 

Modify IntVect by component-wise integer projection.

IntVect IntVect::copy   const [inline]
 

int * IntVect::dataPtr   [inline]
 

only for sending to fortran

const int * IntVect::dataPtr   const [inline]
 

only for sending to fortran

IntVect & IntVect::diagShift int    s [inline]
 

Modifies this IntVect by adding a scalar s to each component.

void IntVect::dumpOn std::ostream &    os const
 

Print an IntVect to the ostream a bit more verbosely.

const int * IntVect::getVect   const [inline]
 

Returns a const pointer to an array of coordinates of the IntVect. Useful for arguments to FORTRAN calls.

bool IntVect::lexGT const IntVect &    s const [inline]
 

Returns true if this IntVect is lexically greater than the argument. An IntVect MUST BE either lexically less than, lexically greater than, or equal to another IntVect.\

iv1 is lexically less than iv2 if: \

in 2-D: \ (iv1[0] > iv2[0]) || ((iv1[0] == iv2[0]) && (iv1[1] > iv2[1])); \

int 3-D: \ (iv1[0] > iv2[0]) || (iv1[0]==iv2[0] && ((iv1[1] > iv2[1] || ((iv1[1] == iv2[1]) && (iv1[2] > iv2[2]))))); \

bool IntVect::lexLT const IntVect &    s const [inline]
 

Returns true if this IntVect is lexically less than the argument. An IntVect MUST BE either lexically less than, lexically greater than, or equal to another IntVect.\

iv1 is lexically less than iv2 if: \

in 2-D: \ (iv1[0] < iv2[0]) || ((iv1[0] == iv2[0]) && (iv1[1] < iv2[1])); \

in 3-D: \ (iv1[0] < iv2[0]) || (iv1[0]==iv2[0] && ((iv1[1] < iv2[1] || ((iv1[1] == iv2[1]) && (iv1[2] < iv2[2]))))); \

IntVect & IntVect::max const IntVect &    p [inline]
 

Modifies this IntVect by taking component-wise max with //IntVect argument.

IntVect & IntVect::min const IntVect &    p [inline]
 

other

Modifies this IntVect by taking component-wise min with IntVect argument.

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

Returns an IntVect that is this IntVect with each component multiplied by a scalar.

IntVect IntVect::operator * const IntVect &    p const [inline]
 

Returns component-wise product of this IntVect and argument.

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

Modifies this IntVect by component-wise multiplication with argument.

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

multiplication

Modifies this IntVect by multiplication of a scalar to each component.

bool IntVect::operator!= const IntVect &    p const [inline]
 

Returns true if this IntVect is different from argument IntVect. All comparisons between analogous components must be satisfied.

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

Return an IntVect that is this IntVect with a scalar added to each component.

IntVect IntVect::operator+ const IntVect &    p const [inline]
 

Returns component-wise sum of this IntVect and argument.

IntVect IntVect::operator+   const [inline]
 

{\bf Arithmetic Operators}

Unary plus -- for completeness.

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

Modifies this IntVect by component-wise addition with argument.

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

addition

Modifies this IntVect by addition of a scalar to each component.

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

Returns an IntVect that is this IntVect with a scalar s subtracted from each component.

IntVect IntVect::operator- const IntVect &    p const [inline]
 

Returns component-wise difference of this IntVect and argument.

IntVect IntVect::operator-   const [inline]
 

Unary Minus -- negates all components of this IntVect.

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

Modifies this IntVect by component-wise subtraction with argument.

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

subtraction

Modifies this IntVect by subtraction of a scalar from each component.

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

Returns component-wise division of this IntVect by scalar s.

IntVect IntVect::operator/ const IntVect &    p const [inline]
 

Returns component-wise division of this IntVect by IntVect argument.

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

Modifies this IntVect by component-wise division with IntVect argument.

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

division

Modifies this IntVect by division by a scalar of each component.

bool IntVect::operator< const IntVect &    p const [inline]
 

Returns true if this IntVect is less than argument IntVect. All comparisons between analogous components must be satisfied. Note that, since the comparison is componentwise, it is possible for an IntVect to be neither greater than, less than, nor equal to another.

bool IntVect::operator<= const IntVect &    p const [inline]
 

Returns true if this IntVect is less than or equal to argument IntVect. All comparisons between analogous components must be satisfied. Note that, since the comparison is componentwise, it is possible for an IntVect to be neither greater than or equal to, less than or equal to, nor equal to another.

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

The assignment operator.

bool IntVect::operator== const IntVect &    p const [inline]
 

{\bf Comparison Operators}

Returns true if this IntVect is equivalent to argument IntVect. All comparisons between analogous components must be satisfied.

bool IntVect::operator> const IntVect &    p const [inline]
 

Returns true if this IntVect is greater than argument IntVect. All comparisons between analogous components must be satisfied. Note that, since the comparison is componentwise, it is possible for an IntVect to be neither greater than, less than, nor equal to another.

bool IntVect::operator>= const IntVect &    p const [inline]
 

Returns true if this IntVect is greater than or equal to argument IntVect. All comparisons between analogous components must be satisfied. Note that, since the comparison is componentwise, it is possible for an IntVect to be neither greater than or equal to, less than or equal to, nor equal to another.

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

Returns the i'th coordinate of the IntVect.

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

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

void IntVect::p   const
 

Print an IntVect to the pout().

void IntVect::printOn std::ostream &    os const
 

{\bf I/O Functions}

Print an IntVect to the ostream.

IntVect & IntVect::reflect int    ref_ix,
int    idir
[inline]
 

Modifies IntVect by reflecting it in the plane defined by the index ref\_ix and with normal in the direction of idir. Directions are zero-based.

IntVect & IntVect::scale int    s [inline]
 

Modifies this IntVect by multiplying each component by a scalar.

void IntVect::setVal int    i,
int    val
[inline]
 

Set i'th coordinate of IntVect to val.

IntVect & IntVect::shift const IntVect &    iv [inline]
 

Modifies this IntVect by component-wise addition with IntVect argument.

IntVect & IntVect::shift int    coord,
int    s
[inline]
 

Modifies this IntVect by adding s to component in given coordinate direction.

const IntVect IntVect::TheUnitVector   [inline, static]
 

const IntVect IntVect::TheZeroVector   [inline, static]
 


Friends And Related Function Documentation

IntVect BASISV int    dir [friend]
 

{\bf IntVect Constants}

Returns a basis vector in the given coordinate direction; eg. IntVect3d BASISV(1) == (0,1,0). Note that the coordinate directions are zero based.

friend class Box [friend]
 

IntVect coarsen const IntVect &    p1,
const IntVect &    p2
[friend]
 

Returns an IntVect which is the component-wise integer projection of IntVect p1 by IntVect p2.

IntVect coarsen const IntVect &    p,
int    s
[friend]
 

Returns an IntVect that is the component-wise integer projection of p by s.

IntVect diagShift const IntVect &    p,
int    s
[friend]
 

Returns IntVect obtained by adding a scalar to each of the components of the given IntVect.

friend class FaceIndex [friend]
 

friend class HDF5Handle [friend]
 

IntVect max const IntVect &    p1,
const IntVect &    p2
[friend]
 

Returns the IntVect that is the component-wise minimum of two argument IntVects.

IntVect min const IntVect &    p1,
const IntVect &    p2
[friend]
 

Returns the IntVect that is the component-wise minimum of two argument IntVects.

IntVect operator * int    s,
const IntVect &    p
[friend]
 

Returns and IntVect that is an IntVect p with each component multiplied by a scalar s.

IntVect operator+ int    s,
const IntVect &    p
[friend]
 

Returns an IntVect that is an IntVect p with a scalar s added to each component.

IntVect operator- int    s,
const IntVect &    p
[friend]
 

Returns -p + s.

std::ostream& operator<< std::ostream &    os,
const IntVect &    iv
[friend]
 

Print the IntVect to given output stream in ASCII.

std::istream& operator>> std::istream &    os,
IntVect &    iv
[friend]
 

Read next IntVect from given input stream.

IntVect reflect const IntVect &    a,
int    ref_ix,
int    idir
[friend]
 

Returns an IntVect that is the reflection of the given IntVect in the plane which passes through ref\_ix and normal to the coordinate direction idir.

IntVect scale const IntVect &    p,
int    s
[friend]
 

Returns an IntVect obtained by multiplying each of the components of the given IntVect by a scalar.

friend class VolIndex [friend]
 


Member Data Documentation

const size_t IntVect::IntVectSize [static, protected]
 

const IntVect IntVect::Unit [static]
 

This is an IntVect all of whose components are equal to one.

int IntVect::vect[SpaceDim] [protected]
 

const IntVect IntVect::Zero [static]
 

This is an IntVect all of whose components are equal to zero.


The documentation for this class was generated from the following file:
Generated on Wed Apr 16 14:27:40 2003 for Chombo by doxygen1.2.16