Chombo + EB
3.2
|
An integer Vector in SpaceDim-dimensional space. More...
#include <CHArray.H>
Public Member Functions | |
IntVect (D_DECL6(const int i0, const int i1, const int i2, const int i3, const int i4, const int i5)) | |
IntVect (const IntVect &iv) | |
int & | operator[] (const int i) |
const int & | operator[] (const int i) const |
int | product () const |
uint64_t | hash (const IntVect &origin, const IntVect &blockingFactor) const |
Constructors and Accessors | |
IntVect () | |
IntVect (const Vector< int > &vi) | |
IntVect (D_DECL6(int i, int j, int k, int l, int m, int n)) | |
IntVect (const int *a) | |
IntVect (const IndexTM< int, CH_SPACEDIM > &a_tm) | |
IntVect | copy () const |
int & | operator[] (int i) |
int | operator[] (int i) const |
void | setVal (int i, int val) |
Data pointer functions | |
const int * | getVect () const |
const int * | dataPtr () const |
int * | dataPtr () |
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 | operator>= (const IntVect &p) const |
bool | lexLT (const IntVect &s) const |
bool | lexGT (const IntVect &s) const |
Unary operators | |
IntVect | operator+ () const |
IntVect | operator- () const |
int | sum () const |
int | product () const |
Division operators | |
IntVect & | operator/= (int s) |
IntVect & | operator/= (const IntVect &p) |
IntVect | operator/ (const IntVect &p) const |
IntVect | operator/ (int s) const |
Public Attributes | |
int | vec [SpaceDim] |
Static Public Attributes | |
static size_t | io_offset |
Protected Attributes | |
int | vect [CH_SPACEDIM] |
Static Protected Attributes | |
static const size_t | IntVectSize |
static const uint32_t | morton256_x [256] |
static const uint32_t | morton256_y [256] |
static const uint32_t | morton256_z [256] |
Friends | |
class | Box |
class | HDF5Handle |
class | VolIndex |
class | FaceIndex |
class | BLfacade::IntVect |
Addition operators | |
IntVect | operator+ (int s, const IntVect &p) |
IntVect & | operator+= (int s) |
IntVect & | operator+= (const IntVect &p) |
IntVect | operator+ (const IntVect &p) const |
IntVect | operator+ (int s) const |
Subtraction operators | |
IntVect | operator- (int s, const IntVect &p) |
IntVect & | operator-= (int s) |
IntVect & | operator-= (const IntVect &p) |
IntVect | operator- (const IntVect &p) const |
IntVect | operator- (int s) const |
Multiplication operators | |
IntVect | operator* (int s, const IntVect &p) |
IntVect & | operator*= (int s) |
IntVect & | operator*= (const IntVect &p) |
IntVect | operator* (const IntVect &p) const |
IntVect | operator* (int s) const |
Other arithmetic operators | |
IntVect | min (const IntVect &p1, const IntVect &p2) |
IntVect | max (const IntVect &p1, const IntVect &p2) |
IntVect | scale (const IntVect &p, int s) |
const IntVect | absolute (const IntVect &p) |
Returns the componentwise absolute value of the given IntVect. More... | |
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) |
IntVect & | min (const IntVect &p) |
IntVect & | max (const IntVect &p) |
int | max () const |
return the maximum value in the intvect More... | |
int | min () const |
return the minimum value in the intvect More... | |
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) |
I/O Functions | |
std::ostream & | operator<< (std::ostream &os, const IntVect &iv) |
std::istream & | operator>> (std::istream &os, IntVect &iv) |
void | printOn (std::ostream &os) const |
void | p () const |
void | dumpOn (std::ostream &os) const |
Constants | |
static const IntVect | Zero |
static const IntVect | Unit |
IntVect | BASISV (int dir) |
static int | InitStatics () |
An integer Vector in SpaceDim-dimensional space.
The class IntVect is an implementation of an integer vector in a SpaceDim-dimensional space. It represents a point in a discrete space. IntVect values are accessed using the operator[] function, as for a normal C++ array. In addition, the basic arithmetic operators have been overloaded to implement scaling and translation operations.
|
inline |
|
inline |
Construct an IntVect whose components are uninitialized.
Referenced by Box::size().
|
inlineexplicit |
Destructor. Let the compiler build the default destructor (bvs) Construct an IntVect given the specific values for its coordinates. D_DECL6 is a macro that sets the constructor to take CH_SPACEDIM arguments.
|
inlineexplicit |
Construct an IntVect setting the coordinates to the corresponding values in the integer array a.
References CH_assert, operator[](), and SpaceDim.
IntVect::IntVect | ( | const IndexTM< int, CH_SPACEDIM > & | a_tm | ) |
The copy constructor. let compiler build default copy constructor (bvs)
|
inline |
References vec.
|
inline |
Referenced by CHArray< T, Rank, ArConf, Alloc >::define(), and sum().
|
inline |
References max(), min(), operator*(), operator+(), operator-(), operator/(), and operator<().
|
inline |
The assignment operator. Let compiler build default assign operator Returns a modifiable lvalue reference to the i'th coordinate of the IntVect.
|
inline |
Returns the i'th coordinate of the IntVect.
|
inline |
|
inline |
Returns a const pointer to an array of coordinates of the IntVect. Useful for arguments to FORTRAN calls.
Referenced by IVSFAB< T >::hiVect(), and IVSFAB< T >::loVect().
|
inline |
Only for sending to Fortran
|
inline |
Only for sending to Fortran
|
inline |
|
inline |
|
inline |
|
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 component-wise, it is possible for an IntVect to be neither greater than or equal to, less than or equal to, nor equal to another.
References D_TERM6.
|
inline |
|
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 component-wise, it is possible for an IntVect to be neither greater than or equal to, less than or equal to, nor equal to another.
References D_TERM6.
|
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])))));
Referenced by lex_compare_iv::operator()(), VolIndex::operator<(), and operator<().
|
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]));
in 3-D:
(iv1[0] > iv2[0]) || (iv1[0]==iv2[0] && ((iv1[1] > iv2[1] || ((iv1[1] == iv2[1]) && (iv1[2] > iv2[2])))));
|
inline |
Unary plus – for completeness.
|
inline |
|
inline |
int IntVect::product | ( | ) | const |
Product of all components of this IntVect.
|
inline |
Modifies this IntVect by addition of a scalar to each component.
Modifies this IntVect by component-wise addition with argument.
|
inline |
|
inline |
Modifies this IntVect by subtraction of a scalar from each component.
Modifies this IntVect by component-wise subtraction by argument.
|
inline |
|
inline |
Modifies this IntVect by multiplication of each component by a scalar.
Modifies this IntVect by component-wise multiplication by argument.
|
inline |
|
inline |
Modifies this IntVect by division of each component by a scalar.
|
inline |
|
inline |
|
inline |
return the minimum value in the intvect
References absolute(), BASISV(), coarsen(), diagShift(), max(), Min(), operator<<(), operator>>(), reflect(), scale(), and SpaceDim.
|
inline |
Modifies this IntVect by multiplying each component by a scalar.
|
inline |
|
inline |
|
inline |
Modifies this IntVect by adding a scalar s to each component.
|
inline |
void IntVect::printOn | ( | std::ostream & | os | ) | const |
Print an IntVect to the ostream.
void IntVect::p | ( | ) | const |
Print an IntVect to the pout().
Referenced by ArSp::DefaultArrayAlloc< T >::allocate(), ArSp::NewArrayAlloc< T >::allocate(), ArSp::DefaultArrayAlloc< T >::deallocate(), ArSp::NewArrayAlloc< T >::deallocate(), ArSp::ArrayOfVectorAlloc::deallocate(), ArSp::ArrayOfMatrixAlloc::deallocate(), operator<<(), and CHArray< T, Rank, ArConf, Alloc >::operator=().
void IntVect::dumpOn | ( | std::ostream & | os | ) | const |
Print an IntVect to the ostream a bit more verbosely.
|
static |
Initializes Zero and Unit.
References CH_SPACEDIM.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Returns the IntVect that is the component-wise minimum of two argument IntVects.
Returns the IntVect that is the component-wise maximum of two argument IntVects.
Returns the componentwise absolute value of the given IntVect.
Returns an IntVect that is the component-wise integer projection of p by s.
|
friend |
Print the IntVect to given output stream in ASCII.
|
friend |
Read next IntVect from given input stream.
|
friend |
Returns a basis vector in the given coordinate direction.
In 3-D: BASISV(0) == (1,0,0); BASISV(1) == (0,1,0); BASISV(2) == (0,0,1).
In 2-D: BASISV(0) == (1,0); BASISV(1) == (0,1).
Note that the coordinate directions are based at zero.
int IntVect::vec[SpaceDim] |
Referenced by IntVect(), operator[](), and product().
|
static |
This is an IntVect all of whose components are equal to zero.
Referenced by BoxLayoutData< BaseFab< int > >::addTo(), BaseFab< Real >::BaseFab(), BASISV(), BoxIterator::BoxIterator(), NormalDerivativeNew< dim >::calculateAll(), NormalDerivativeNew< dim >::calculatePhiDerivs(), coarsen(), coarsen(), Box::convert(), Copier::Copier(), LevelData< BaseFab< int > >::copyTo(), PetscSolver< LevelData< FArrayBox > >::create_mat_vec(), IVSFAB< T >::define(), BaseFab< Real >::define(), LevelData< BaseFab< int > >::exchange(), FortranArrayIndex(), FourthOrderInterpStencil::FourthOrderInterpStencil(), BoxLayoutData< BaseFab< int > >::generalCopyTo(), ImageIterator::ok(), read(), EBFastFR::reflux(), BaseFab< Real >::resize(), BaseFab< Real >::shift(), BaseFab< Real >::shiftHalf(), BaseFab< Real >::testBoxAndComp(), EBAMRDataOps::~EBAMRDataOps(), and EBLevelDataOps::~EBLevelDataOps().
|
static |
This is an IntVect all of whose components are equal to one.
Referenced by BoxIterator::BoxIterator(), NormalDerivativeNew< dim >::calculateAll(), NormalDerivativeNew< dim >::calculatePhiDerivs(), CoDimCopier::CoDimCopier(), Box::convert(), CornerCopier::CornerCopier(), BaseIF::corners(), IVSFAB< T >::define(), PetscCompGridPois::getGhostVect(), PetscCompGridVTO::getGhostVect(), readLevel(), and BaseFab< Real >::testBoxAndComp().
|
static |
|
protected |
|
staticprotected |
Number of bytes of storage used by this IntVect.
|
staticprotected |
|
staticprotected |
|
staticprotected |