Block-Structured AMR Software Framework
amrex::IntVect Class Reference

#include <AMReX_IntVect.H>

Classes

class  shift_hasher
 

Public Types

using hasher = shift_hasher
 

Public Member Functions

constexpr IntVect () noexcept
 Construct an IntVect whose components are all zero. More...
 
constexpr AMREX_GPU_HOST_DEVICE IntVect (int i) noexcept
 Construct an IntVect given the specific values for its coordinates. AMREX_D_DECL is a macro that sets the constructor to take AMREX_SPACEDIM arguments. More...
 
AMREX_GPU_HOST_DEVICE IntVect (const int *a) noexcept
 Construct an IntVect setting the coordinates to the corresponding values in the integer array a. More...
 
 IntVect (const Vector< int > &a) noexcept
 Construct an IntVect from an Vector<int>. It is an error if the Vector<int> doesn't have the same dimension as this IntVect. More...
 
 IntVect (const Array< int, AMREX_SPACEDIM > &a) noexcept
 Construct an IntVect from an Array<int,AMREX_SPACEDIM>. More...
 
constexpr IntVect (Dim3 const &a) noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Dim3 dim3 () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int sum () const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int max () const noexcept
 maximum (no absolute values) value More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int min () const noexcept
 minimum (no absolute values) value More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int maxDir (bool a_doAbsValue) const noexcept
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE intoperator[] (int i) noexcept
 Returns a reference to the i'th coordinate of the IntVect. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const intoperator[] (int i) const noexcept
 Returns the i'th coordinate of the IntVect. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE intbegin () noexcept
 Returns a pointer to the first element of the IntVect. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const intbegin () const noexcept
 Returns a pointer to the first element of the IntVect. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE intend () noexcept
 Returns a pointer to the (last+1) element of the IntVect. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const intend () const noexcept
 Returns a pointer to the (last+1) element of the IntVect. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectsetVal (int i, int val) noexcept
 Set i'th coordinate of IntVect to val. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const intgetVect () const &noexcept
 Returns a const pointer to an array of coordinates of the IntVect. Useful for arguments to FORTRAN calls. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE intgetVect () &noexcept
 
AMREX_GPU_HOST_DEVICE intgetVect () &&=delete
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool operator== (int val) const noexcept
 Returns true if all components are equal to the argument val. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool operator!= (int val) const noexcept
 Returns true if any component is not equal to the argument val. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool operator== (const IntVect &rhs) const noexcept
 Returns true if this is equivalent to rhs. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool operator!= (const IntVect &rhs) const noexcept
 Returns true if this is different from rhs. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool operator< (const IntVect &rhs) const noexcept
 Return true if this is lexicographically less than rhs. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool operator<= (const IntVect &rhs) const noexcept
 Return true if this is lexicographically less than or equal to rhs. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool operator> (const IntVect &rhs) const noexcept
 Return true if this is lexicographically greater than rhs. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool operator>= (const IntVect &rhs) const noexcept
 Return true if this is lexicographically greater than or equal to rhs. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool allLT (const IntVect &rhs) const noexcept
 Returns true if this is less than argument for all components. NOTE: This is NOT a strict weak ordering usable by STL sorting algorithms. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool allLE (const IntVect &rhs) const noexcept
 Returns true if this is less than or equal to argument for all components. NOTE: This is NOT a strict weak ordering usable by STL sorting algorithms. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool allGT (const IntVect &rhs) const noexcept
 Returns true if this is greater than argument for all components. NOTE: This is NOT a strict weak ordering usable by STL sorting algorithms. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool allGE (const IntVect &rhs) const noexcept
 Returns true if this is greater than or equal to argument for all components. NOTE: This is NOT a strict weak ordering usable by STL sorting algorithms. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect operator+ () const noexcept
 Unary plus – for completeness. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect operator- () const noexcept
 Unary Minus – negates all components. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectoperator+= (int s) noexcept
 Modifies IntVect by addition of a scalar to each component. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectoperator+= (const IntVect &p) noexcept
 Modifies IntVect by component-wise addition with argument. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectoperator*= (int s) noexcept
 Modifies IntVect by multiplication of a scalar to each component. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectoperator*= (const IntVect &p) noexcept
 Modifies IntVect by component-wise multiplication with argument. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectoperator/= (int s) noexcept
 Modifies IntVect by division by a scalar to each component. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectoperator/= (const IntVect &p) noexcept
 Modifies IntVect by component-wise division with argument. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectoperator-= (int s) noexcept
 Modifies IntVect by subtraction of a scalar to each component. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectoperator-= (const IntVect &p) noexcept
 Modifies IntVect by component-wise subtraction with argument. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect operator+ (const IntVect &p) const noexcept
 Returns component-wise sum of IntVect and argument. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect operator+ (int s) const noexcept
 Return an IntVect that is this IntVect + s. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect operator- (const IntVect &p) const noexcept
 Returns component-wise difference of IntVect and argument. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect operator- (int s) const noexcept
 Return an IntVect that is this IntVect - s. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect operator* (const IntVect &p) const noexcept
 Returns component-wise product of IntVect and argument. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect operator* (int s) const noexcept
 Returns component-wise product of IntVect and s. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect operator/ (const IntVect &p) const noexcept
 Returns component-wise division of IntVect by argument. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect operator/ (int s) const noexcept
 Returns component-wise division of IntVect by s. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectmin (const IntVect &p) noexcept
 Modifies IntVect by taking component-wise min with argument. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectmax (const IntVect &p) noexcept
 Modifies IntVect by taking component-wise max with argument. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectscale (int s) noexcept
 Modify IntVect by multiplying each coordinate by s. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectreflect (int ref_ix, int idir) noexcept
 Modify IntVect by reflecting it in the plane defined by the index ref_ix and with normal in the direction of idir. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectshift (int coord, int s) noexcept
 Modify IntVect by adding s to given coordinate. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectshift (const IntVect &iv) noexcept
 Equivalent to shift(0,iv[0]).shift(1,iv[1]) ... More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectdiagShift (int s) noexcept
 Modify IntVect by adding s to each coordinate. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectcoarsen (const IntVect &p) noexcept
 Modify IntVect by component-wise integer projection. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectcoarsen (int p) noexcept
 Modify IntVect by component-wise integer projection. More...
 

Static Public Member Functions

AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE IntVect TheZeroVector () noexcept
 This static member function returns a reference to a constant IntVect object, all of whose AMREX_SPACEDIM arguments are set to zero (0). Figuratively, it is the zero vector in AMREX_SPACEDIM-dimensional space. It is provided as a convenient way to specify the zero vector. More...
 
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE IntVect TheUnitVector () noexcept
 This static member function returns a reference to a constant IntVect object, all of whose AMREX_SPACEDIM arguments are set to one (1). Figuratively, it is the unit vector in AMREX_SPACEDIM-dimensional space. It is provided as a convenient way to specify the unit vector. More...
 
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE IntVect TheDimensionVector (int d) noexcept
 This static member function returns a reference to a constant IntVect object, all of whose AMREX_SPACEDIM arguments are set to zero except that the d-direction is set to one. More...
 
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE IntVect TheNodeVector () noexcept
 This static member function returns a reference to a constant IntVect object, all of whose AMREX_SPACEDIM arguments are set to IndexType::NODE. It is provided as a convenience to our users when defining Boxes. More...
 
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE IntVect TheCellVector () noexcept
 This static member function returns a reference to a constant IntVect object, all of whose AMREX_SPACEDIM arguments are set to IndexType::CELL. It is provided as a convenience to our users when defining Boxes. More...
 
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE IntVect TheMaxVector () noexcept
 
AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE IntVect TheMinVector () noexcept
 

Static Public Attributes

static const IntVect Zero = IntVect::TheZeroVector()
 
static const IntVect Unit = IntVect::TheUnitVector()
 

Private Attributes

int vect [AMREX_SPACEDIM] = {AMREX_D_DECL(0,0,0)}
 

Friends

MPI_Datatype ParallelDescriptor::Mpi_typemap ()
 
std::ostream & operator<< (std::ostream &os, const IntVect &iv)
 
std::istream & operator>> (std::istream &is, IntVect &iv)
 

Detailed Description

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.

Member Typedef Documentation

◆ hasher

Constructor & Destructor Documentation

◆ IntVect() [1/6]

constexpr amrex::IntVect::IntVect ( )
inlineconstexprnoexcept

Construct an IntVect whose components are all zero.

◆ IntVect() [2/6]

constexpr AMREX_GPU_HOST_DEVICE amrex::IntVect::IntVect ( int  i)
inlineexplicitconstexprnoexcept

Construct an IntVect given the specific values for its coordinates. AMREX_D_DECL is a macro that sets the constructor to take AMREX_SPACEDIM arguments.

◆ IntVect() [3/6]

AMREX_GPU_HOST_DEVICE amrex::IntVect::IntVect ( const int a)
inlineexplicitnoexcept

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

◆ IntVect() [4/6]

amrex::IntVect::IntVect ( const Vector< int > &  a)
inlineexplicitnoexcept

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

◆ IntVect() [5/6]

amrex::IntVect::IntVect ( const Array< int, AMREX_SPACEDIM > &  a)
inlineexplicitnoexcept

Construct an IntVect from an Array<int,AMREX_SPACEDIM>.

◆ IntVect() [6/6]

constexpr amrex::IntVect::IntVect ( Dim3 const &  a)
inlineexplicitconstexprnoexcept

Member Function Documentation

◆ allGE()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::IntVect::allGE ( const IntVect rhs) const
inlinenoexcept

Returns true if this is greater than or equal to argument for all components. NOTE: This is NOT a strict weak ordering usable by STL sorting algorithms.

◆ allGT()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::IntVect::allGT ( const IntVect rhs) const
inlinenoexcept

Returns true if this is greater than argument for all components. NOTE: This is NOT a strict weak ordering usable by STL sorting algorithms.

◆ allLE()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::IntVect::allLE ( const IntVect rhs) const
inlinenoexcept

Returns true if this is less than or equal to argument for all components. NOTE: This is NOT a strict weak ordering usable by STL sorting algorithms.

◆ allLT()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::IntVect::allLT ( const IntVect rhs) const
inlinenoexcept

Returns true if this is less than argument for all components. NOTE: This is NOT a strict weak ordering usable by STL sorting algorithms.

◆ begin() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const int* amrex::IntVect::begin ( ) const
inlinenoexcept

Returns a pointer to the first element of the IntVect.

◆ begin() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int* amrex::IntVect::begin ( )
inlinenoexcept

Returns a pointer to the first element of the IntVect.

◆ coarsen() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect & amrex::IntVect::coarsen ( const IntVect p)
noexcept

Modify IntVect by component-wise integer projection.

◆ coarsen() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect & amrex::IntVect::coarsen ( int  p)
noexcept

Modify IntVect by component-wise integer projection.

◆ diagShift()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect& amrex::IntVect::diagShift ( int  s)
inlinenoexcept

Modify IntVect by adding s to each coordinate.

◆ dim3()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE Dim3 amrex::IntVect::dim3 ( ) const
inlinenoexcept

◆ end() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const int* amrex::IntVect::end ( ) const
inlinenoexcept

Returns a pointer to the (last+1) element of the IntVect.

◆ end() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int* amrex::IntVect::end ( )
inlinenoexcept

Returns a pointer to the (last+1) element of the IntVect.

◆ getVect() [1/3]

AMREX_GPU_HOST_DEVICE int* amrex::IntVect::getVect ( ) &&
delete

◆ getVect() [2/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int* amrex::IntVect::getVect ( ) &
inlinenoexcept

◆ getVect() [3/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const int* amrex::IntVect::getVect ( ) const &
inlinenoexcept

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

◆ max() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int amrex::IntVect::max ( ) const
inlinenoexcept

maximum (no absolute values) value

◆ max() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect& amrex::IntVect::max ( const IntVect p)
inlinenoexcept

Modifies IntVect by taking component-wise max with argument.

◆ maxDir()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int amrex::IntVect::maxDir ( bool  a_doAbsValue) const
noexcept

◆ min() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int amrex::IntVect::min ( ) const
inlinenoexcept

minimum (no absolute values) value

◆ min() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect& amrex::IntVect::min ( const IntVect p)
inlinenoexcept

Modifies IntVect by taking component-wise min with argument.

◆ operator!=() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::IntVect::operator!= ( const IntVect rhs) const
inlinenoexcept

Returns true if this is different from rhs.

◆ operator!=() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::IntVect::operator!= ( int  val) const
inlinenoexcept

Returns true if any component is not equal to the argument val.

◆ operator*() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect amrex::IntVect::operator* ( const IntVect p) const
inlinenoexcept

Returns component-wise product of IntVect and argument.

◆ operator*() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect amrex::IntVect::operator* ( int  s) const
inlinenoexcept

Returns component-wise product of IntVect and s.

◆ operator*=() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect& amrex::IntVect::operator*= ( const IntVect p)
inlinenoexcept

Modifies IntVect by component-wise multiplication with argument.

◆ operator*=() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect& amrex::IntVect::operator*= ( int  s)
inlinenoexcept

Modifies IntVect by multiplication of a scalar to each component.

◆ operator+() [1/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect amrex::IntVect::operator+ ( ) const
inlinenoexcept

Unary plus – for completeness.

◆ operator+() [2/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect amrex::IntVect::operator+ ( const IntVect p) const
inlinenoexcept

Returns component-wise sum of IntVect and argument.

◆ operator+() [3/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect amrex::IntVect::operator+ ( int  s) const
inlinenoexcept

Return an IntVect that is this IntVect + s.

◆ operator+=() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect& amrex::IntVect::operator+= ( const IntVect p)
inlinenoexcept

Modifies IntVect by component-wise addition with argument.

◆ operator+=() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect& amrex::IntVect::operator+= ( int  s)
inlinenoexcept

Modifies IntVect by addition of a scalar to each component.

◆ operator-() [1/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect amrex::IntVect::operator- ( ) const
inlinenoexcept

Unary Minus – negates all components.

◆ operator-() [2/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect amrex::IntVect::operator- ( const IntVect p) const
inlinenoexcept

Returns component-wise difference of IntVect and argument.

◆ operator-() [3/3]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect amrex::IntVect::operator- ( int  s) const
inlinenoexcept

Return an IntVect that is this IntVect - s.

◆ operator-=() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect& amrex::IntVect::operator-= ( const IntVect p)
inlinenoexcept

Modifies IntVect by component-wise subtraction with argument.

◆ operator-=() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect& amrex::IntVect::operator-= ( int  s)
inlinenoexcept

Modifies IntVect by subtraction of a scalar to each component.

◆ operator/() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect amrex::IntVect::operator/ ( const IntVect p) const
inlinenoexcept

Returns component-wise division of IntVect by argument.

◆ operator/() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect amrex::IntVect::operator/ ( int  s) const
inlinenoexcept

Returns component-wise division of IntVect by s.

◆ operator/=() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect& amrex::IntVect::operator/= ( const IntVect p)
inlinenoexcept

Modifies IntVect by component-wise division with argument.

◆ operator/=() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect& amrex::IntVect::operator/= ( int  s)
inlinenoexcept

Modifies IntVect by division by a scalar to each component.

◆ operator<()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::IntVect::operator< ( const IntVect rhs) const
inlinenoexcept

Return true if this is lexicographically less than rhs.

◆ operator<=()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::IntVect::operator<= ( const IntVect rhs) const
inlinenoexcept

Return true if this is lexicographically less than or equal to rhs.

◆ operator==() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::IntVect::operator== ( const IntVect rhs) const
inlinenoexcept

Returns true if this is equivalent to rhs.

◆ operator==() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::IntVect::operator== ( int  val) const
inlinenoexcept

Returns true if all components are equal to the argument val.

◆ operator>()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::IntVect::operator> ( const IntVect rhs) const
inlinenoexcept

Return true if this is lexicographically greater than rhs.

◆ operator>=()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool amrex::IntVect::operator>= ( const IntVect rhs) const
inlinenoexcept

Return true if this is lexicographically greater than or equal to rhs.

◆ operator[]() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE const int& amrex::IntVect::operator[] ( int  i) const
inlinenoexcept

Returns the i'th coordinate of the IntVect.

◆ operator[]() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int& amrex::IntVect::operator[] ( int  i)
inlinenoexcept

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

◆ reflect()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect& amrex::IntVect::reflect ( int  ref_ix,
int  idir 
)
inlinenoexcept

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

◆ scale()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect& amrex::IntVect::scale ( int  s)
inlinenoexcept

Modify IntVect by multiplying each coordinate by s.

◆ setVal()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect& amrex::IntVect::setVal ( int  i,
int  val 
)
inlinenoexcept

Set i'th coordinate of IntVect to val.

◆ shift() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect& amrex::IntVect::shift ( const IntVect iv)
inlinenoexcept

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

◆ shift() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVect& amrex::IntVect::shift ( int  coord,
int  s 
)
inlinenoexcept

Modify IntVect by adding s to given coordinate.

◆ sum()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int amrex::IntVect::sum ( ) const
inlinenoexcept

Sum of all components of this IntVect.

◆ TheCellVector()

AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE IntVect amrex::IntVect::TheCellVector ( )
inlinestaticconstexprnoexcept

This static member function returns a reference to a constant IntVect object, all of whose AMREX_SPACEDIM arguments are set to IndexType::CELL. It is provided as a convenience to our users when defining Boxes.

◆ TheDimensionVector()

AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE IntVect amrex::IntVect::TheDimensionVector ( int  d)
inlinestaticconstexprnoexcept

This static member function returns a reference to a constant IntVect object, all of whose AMREX_SPACEDIM arguments are set to zero except that the d-direction is set to one.

◆ TheMaxVector()

AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE IntVect amrex::IntVect::TheMaxVector ( )
inlinestaticconstexprnoexcept

◆ TheMinVector()

AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE IntVect amrex::IntVect::TheMinVector ( )
inlinestaticconstexprnoexcept

◆ TheNodeVector()

AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE IntVect amrex::IntVect::TheNodeVector ( )
inlinestaticconstexprnoexcept

This static member function returns a reference to a constant IntVect object, all of whose AMREX_SPACEDIM arguments are set to IndexType::NODE. It is provided as a convenience to our users when defining Boxes.

◆ TheUnitVector()

AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE IntVect amrex::IntVect::TheUnitVector ( )
inlinestaticconstexprnoexcept

This static member function returns a reference to a constant IntVect object, all of whose AMREX_SPACEDIM arguments are set to one (1). Figuratively, it is the unit vector in AMREX_SPACEDIM-dimensional space. It is provided as a convenient way to specify the unit vector.

◆ TheZeroVector()

AMREX_GPU_HOST_DEVICE static constexpr AMREX_FORCE_INLINE IntVect amrex::IntVect::TheZeroVector ( )
inlinestaticconstexprnoexcept

This static member function returns a reference to a constant IntVect object, all of whose AMREX_SPACEDIM arguments are set to zero (0). Figuratively, it is the zero vector in AMREX_SPACEDIM-dimensional space. It is provided as a convenient way to specify the zero vector.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const IntVect iv 
)
friend

◆ operator>>

std::istream& operator>> ( std::istream &  is,
IntVect iv 
)
friend

◆ ParallelDescriptor::Mpi_typemap

Member Data Documentation

◆ Unit

const IntVect amrex::IntVect::Unit = IntVect::TheUnitVector()
static

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

◆ vect

int amrex::IntVect::vect[AMREX_SPACEDIM] = {AMREX_D_DECL(0,0,0)}
private

◆ Zero

const IntVect amrex::IntVect::Zero = IntVect::TheZeroVector()
static

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


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