#include <RectMDArray.H>
Contains an array of data of type T on a domain defined by a Box. Each data point is associated with a Point in the Box. C, D, and E provide the dimensionality of the data: C,D,E = 1: Data is scalar C = 3, D,E = 1: Data is vector valued with 3 components C,D = 3, E = 1: Data is 3x3 matrix valued
T | Type of data in array | |
C | Number of components in first data index. Defaults to 1. | |
D | Number of components in second data index. Defaults to 1. | |
E | Number of components in third data index. Defaults to 1. |
Public Member Functions | |
RectMDArray () | |
Default constructor. | |
RectMDArray (const Box &a_box) | |
Constructs a RectMDArray over the Box a_box. Data is USUALLY initialized as zero. | |
void | define (const Box &a_box) |
Defines a default-constructed RectMDArray. | |
RectMDArray (const RectMDArray< T, C, D, E > &a_srcArray) | |
Copy constructor. This is a deep copy, *this and a_srcArray are not sharing data. | |
RectMDArray (RectMDArray< T, C, D, E > &&a_srcArray) | |
Move constructor. Good for cases were we return RectMDArray by value, but don't want an actual deep copy. | |
RectMDArray (std::shared_ptr< T > a_data, T *a_ptr, const Box &a_box) | |
Slice constructor for RectMDArray, used by the slice functions. | |
~RectMDArray () | |
Destructor. | |
void | setVal (const T &a_val) const |
Sets all values in a RectMDArray to a constant value. | |
RectMDArray & | operator= (const RectMDArray< T, C, D, E > &a_srcArray) |
Assignment operator. | |
Box | getBox () const |
Gets box over which array is defined. | |
void | copyTo (RectMDArray< T, C, D, E > &a_dest) const |
Copy on Intersection. | |
void | copyTo (RectMDArray< T, C, D, E > &a_dest, const Box &a_validBoxSrc, const Point &a_shift) const |
Copy on Intersection with a shift. | |
void | copyTo (RectMDArray< T, C, D, E > &a_dest, const Point &a_shift) const |
Copy with a shift. | |
void | shift (const Point a_pt) |
Shift in place. | |
T & | operator[] (const Point &a_iv) |
Indexing operator. only works for scalar RectMDArray objects. | |
const T & | operator[] (const Point &a_iv) const |
Indexing operator for const RectMDArrays. only works for scalar RectMDArray objects. | |
T & | operator() (const Point &a_iv, unsigned int a_comp) |
Indexing operator for vector-valued RectMDArray objects with a single index. Assertion failure if returned type is not scalar. | |
const T & | operator() (const Point &a_iv, unsigned int a_comp) const |
Indexing operator for constant vector-valued RectMDArray objects with a single index. Assertion failure if returned type is not scalar. | |
T & | operator() (const Point &a_iv, unsigned int a_comp, unsigned char a_d) |
Indexing operator for vector-valued RectMDArray objects with two indices. Assertion failure if returned type is not scalar. | |
const T & | operator() (const Point &a_iv, unsigned int a_comp, unsigned char a_d) const |
Indexing operator for constant vector-valued RectMDArray objects with two indices. Assertion failure if returned type is not scalar. | |
T & | operator() (const Point &a_iv, unsigned int a_comp, unsigned char a_d, unsigned char a_e) |
Indexing operator for vector-valued RectMDArray objects with three indices. Assertion failure if returned type is not scalar. | |
const T & | operator() (const Point &a_iv, unsigned int a_comp, unsigned char a_d, unsigned char a_e) const |
Indexing operator for constant vector-valued RectMDArray objects with three indices. Assertion failure if returned type is not scalar. | |
T & | operator[] (int a_index) const |
Index with integer. Assertion failure if a_index is out of bounds. | |
T & | index (int a_index) const |
Index with integer. Assertion failure if a_index is out of bounds. | |
RectMDArray< T, C, D, E > & | plus (const RectMDArray< T, C, D, E > &a_rhs) |
Addition in place of two RectMDArrays. Defined on the intersection. | |
RectMDArray< T, C, D, E > & | minus (const RectMDArray< T, C, D, E > &a_rhs) |
Subtraction in place of two RectMDArrays. Defined on the intersection. | |
RectMDArray< T, C, D, E > & | times (const RectMDArray< T, C, D, E > &a_rhs) |
Multiplication in place of two RectMDArrays. Defined on the intersection. | |
RectMDArray< T, C, D, E > & | divide (const RectMDArray< T, C, D, E > &a_rhs) |
Division in place of two RectMDArrays. Defined on the intersection. | |
RectMDArray< T, C, D, E > & | operator+= (const RectMDArray< T, C, D, E > &a_rhs) |
Same as RectMDArray::plus(). Defines the "+=" operator on RectMDArrays. Defined on the intersection. | |
RectMDArray< T, C, D, E > & | operator-= (const RectMDArray< T, C, D, E > &a_rhs) |
Same as RectMDArray::minus(). Defines the "-=" operator on RectMDArrays. Defined on the intersection. | |
RectMDArray< T, C, D, E > & | operator*= (const RectMDArray< T, C, D, E > &a_rhs) |
Same as RectMDArray::times(). Defines the "*=" operator on RectMDArrays. Defined on the intersection. | |
RectMDArray< T, C, D, E > & | operator/= (const RectMDArray< T, C, D, E > &a_rhs) |
Same as RectMDArray::divide(). Defines the "/=" operator on RectMDArrays. Defined on the intersection. | |
RectMDArray< T, C, D, E > & | operator+= (T scale) |
Componentwise addition in place by scale. | |
RectMDArray< T, C, D, E > & | operator-= (T scale) |
Componentwise subtraction in place by scale. | |
RectMDArray< T, C, D, E > & | operator*= (T scale) |
Componentwise multiplication in place by scale. | |
RectMDArray< T, C, D, E > & | operator/= (T scale) |
Componentwise division in place by scale. | |
void | print () |
Prints the domain box and the data in m_data. | |
void | print () const |
Prints the domain box and the data in m_data for constant RectMDArray. | |
size_t | dataSize () const |
Returns the number of values stored in *this. | |
bool | defined () const |
Returns true if *this has been defined. | |
T & | get (const Point &a_iv, unsigned int a_comp=0) |
Return the data associated with the Point a_iv. For use with scalar or vector valued data. | |
T & | get2 (const Point &a_iv, unsigned int a_comp, unsigned char a_d) |
Return the data associated with the Point a_iv. For use with data with two indices. | |
T & | get3 (const Point &a_iv, unsigned int a_comp, unsigned char a_d, unsigned char a_e) |
Return the data associated with the Point a_iv. For use with data with three indices. | |
const T & | getConst (const Point &a_iv, unsigned int a_comp=0) const |
Same as RectMDArray::get() for constant RectMDArrays. | |
const T & | getConst2 (const Point &a_iv, unsigned int a_comp, unsigned char a_d) const |
Same as RectMDArray::get2() for constant RectMDArrays. | |
const T & | getConst3 (const Point &a_iv, unsigned int a_comp, unsigned char a_d, unsigned char a_e) const |
Same as RectMDArray::get3() for constant RectMDArrays. | |
std::shared_ptr< T > | m_sliceData () |
Not for Public use. DO NOT USE. | |
T * | m_slicePtr () |
Not for Public use. DO NOT USE. | |
bool | isSlice () const |
Check if *this is a slice of another array. | |
Private Attributes | |
std::shared_ptr< T > | m_data |
Data array. | |
T * | m_rawPtr |
Raw pointer to the data. | |
Box | m_box |
Box defining the domain of *this. | |
bool | m_isSlice |
Flag which is true if *this is a slice of another RectMDArray (and is thus sharing data). |
RectMDArray< T, C, D, E >::RectMDArray | ( | ) | [inline] |
Default constructor.
RectMDArray< T, C, D, E >::RectMDArray | ( | const Box & | a_box | ) | [inline] |
Constructs a RectMDArray over the Box a_box. Data is USUALLY initialized as zero.
When using this constructor, it is recommended that the user initialize the data manually:
Box B = Box(getZeros(),getOnes()*7); //Domain RectMDArray<double> R = RectMDArray<double>(B); //Construct array R.setVal(0); //Initialize array values as 0.
References RectMDArray< T, C, D, E >::define(), and RectMDArray< T, C, D, E >::m_isSlice.
RectMDArray< T, C, D, E >::RectMDArray | ( | const RectMDArray< T, C, D, E > & | a_srcArray | ) | [inline] |
Copy constructor. This is a deep copy, *this and a_srcArray are not sharing data.
References RectMDArray< T, C, D, E >::dataSize(), RectMDArray< T, C, D, E >::define(), RectMDArray< T, C, D, E >::m_box, RectMDArray< T, C, D, E >::m_isSlice, and RectMDArray< T, C, D, E >::m_rawPtr.
RectMDArray< T, C, D, E >::RectMDArray | ( | RectMDArray< T, C, D, E > && | a_srcArray | ) | [inline] |
Move constructor. Good for cases were we return RectMDArray by value, but don't want an actual deep copy.
RectMDArray< T, C, D, E >::RectMDArray | ( | std::shared_ptr< T > | a_data, | |
T * | a_ptr, | |||
const Box & | a_box | |||
) | [inline] |
Slice constructor for RectMDArray, used by the slice functions.
Produces a RectMDArray whose data points to a slice of another RectMDArray's data. The data itself is not copied.
a_data | Pointer to the first index of the full array of data. | |
a_ptr | Pointer to the first index of the data slice. | |
a_box | Domain of the data slice. |
RectMDArray< T, C, D, E >::~RectMDArray | ( | ) | [inline] |
Destructor.
References RectMDArray< T, C, D, E >::dataSize(), RectMDArray< T, C, D, E >::m_data, memory, and reportMemory.
void RectMDArray< T, C, D, E >::define | ( | const Box & | a_box | ) | [inline] |
Defines a default-constructed RectMDArray.
Called by Constructor RectMDArray(const Box& a_box)
References RectMDArray< T, C, D, E >::dataSize(), RectMDArray< T, C, D, E >::m_box, RectMDArray< T, C, D, E >::m_data, RectMDArray< T, C, D, E >::m_rawPtr, memory, and reportMemory.
Referenced by RectMDArray< T, C, D, E >::operator=(), and RectMDArray< T, C, D, E >::RectMDArray().
void RectMDArray< T, C, D, E >::setVal | ( | const T & | a_val | ) | const [inline] |
Sets all values in a RectMDArray to a constant value.
a_val | A constant value. |
References RectMDArray< T, C, D, E >::dataSize(), RectMDArray< T, C, D, E >::m_data, and RectMDArray< T, C, D, E >::m_rawPtr.
Referenced by LevelData< T, C, D, E >::setVal().
RectMDArray< T, C, D, E > & RectMDArray< T, C, D, E >::operator= | ( | const RectMDArray< T, C, D, E > & | a_srcArray | ) | [inline] |
Assignment operator.
This is USUALLY a deep copy; *this and a_srcArray are not sharing data. The exception is when a slice is being stored in a RectMDArray that has already been constructed.
References RectMDArray< T, C, D, E >::dataSize(), RectMDArray< T, C, D, E >::define(), RectMDArray< T, C, D, E >::isSlice(), RectMDArray< T, C, D, E >::m_box, RectMDArray< T, C, D, E >::m_data, RectMDArray< T, C, D, E >::m_isSlice, and RectMDArray< T, C, D, E >::m_rawPtr.
Box RectMDArray< T, C, D, E >::getBox | ( | ) | const [inline] |
Gets box over which array is defined.
Includes it's ghost cells if LevelData built it that way.
References RectMDArray< T, C, D, E >::m_box.
Referenced by Stencil< T >::apply(), RectMDArray< T, C, D, E >::copyTo(), LevelData< T, C, D, E >::exchange(), LevelData< T, C, D, E >::getNeighbor(), LevelData< T, C, D, E >::getPeriodicCornerNeighborInfo(), LevelData< T, C, D, E >::getPeriodicEdgeNeighborInfo(), LevelData< T, C, D, E >::getPeriodicFlapNeighborInfo(), and slice().
void RectMDArray< T, C, D, E >::copyTo | ( | RectMDArray< T, C, D, E > & | a_dest | ) | const [inline] |
Copy on Intersection.
Copy the part of *this's data which intersects with the domain of a_dest's domain.
References RectMDArray< T, C, D, E >::getConst(), Box::getLowCorner(), Box::increment(), RectMDArray< T, C, D, E >::m_box, and Box::notDone().
Referenced by LevelData< T, C, D, E >::copyTo(), and LevelData< T, C, D, E >::exchangeSingleBox().
void RectMDArray< T, C, D, E >::copyTo | ( | RectMDArray< T, C, D, E > & | a_dest, | |
const Box & | a_validBoxSrc, | |||
const Point & | a_shift | |||
) | const [inline] |
Copy on Intersection with a shift.
Copy with shift. only copy from cells in validBoxSrc validBoxSrc comes in unshifted. Used internally by LevelData. Not recommended for public use. shift = destBox - srcBox (the lower left corner of the array holders)
a_dest | Destination RectMDArray | |
a_validBoxSrc | Source domain. Must be a subset of the domain of *this. | |
a_shift | The shift that will be applied to a_dest.m_box. |
References CH_TIMERS, RectMDArray< T, C, D, E >::getBox(), RectMDArray< T, C, D, E >::getConst(), Box::getLowCorner(), Box::increment(), Box::notDone(), and Box::shift().
void RectMDArray< T, C, D, E >::copyTo | ( | RectMDArray< T, C, D, E > & | a_dest, | |
const Point & | a_shift | |||
) | const [inline] |
Copy with a shift.
For each point p in the intersection of *this and a_dest, copy the data at p+shift in *this to a_dest. Used internally by LevelData. Not recommended for public use.
a_dest | Destination RectMDArray. | |
a_shift | A Point interpreted as a shift vector. |
References RectMDArray< T, C, D, E >::getConst(), Box::getLowCorner(), Box::increment(), RectMDArray< T, C, D, E >::m_box, and Box::notDone().
void RectMDArray< T, C, D, E >::shift | ( | const Point | a_pt | ) | [inline] |
Shift in place.
Shift the domain of *this using a_pt
a_pt | A Point interpreted as a shift vector. |
References RectMDArray< T, C, D, E >::m_box, and Box::shift().
T & RectMDArray< T, C, D, E >::operator[] | ( | const Point & | a_iv | ) | [inline] |
Indexing operator. only works for scalar RectMDArray objects.
Returns the data stored in *this corresponding to Point a_iv. Assertion error if a_iv is not in the domain of *this.
a_iv | A Point in the domain of *this |
const T & RectMDArray< T, C, D, E >::operator[] | ( | const Point & | a_iv | ) | const [inline] |
Indexing operator for const RectMDArrays. only works for scalar RectMDArray objects.
Returns the data stored in *this corresponding to Point a_iv. Assertion error if a_iv is not in the domain of *this.
a_iv | A Point in the domain of *this |
References RectMDArray< T, C, D, E >::getConst().
T & RectMDArray< T, C, D, E >::operator() | ( | const Point & | a_iv, | |
unsigned int | a_comp | |||
) | [inline] |
Indexing operator for vector-valued RectMDArray objects with a single index. Assertion failure if returned type is not scalar.
a_iv | A Point in the domain of *this | |
a_comp | Integer corresponding to the desired component of the data at a_iv. |
const T & RectMDArray< T, C, D, E >::operator() | ( | const Point & | a_iv, | |
unsigned int | a_comp | |||
) | const [inline] |
Indexing operator for constant vector-valued RectMDArray objects with a single index. Assertion failure if returned type is not scalar.
a_iv | A Point in the domain of *this | |
a_comp | Integer corresponding to the desired component of the data at a_iv. |
References RectMDArray< T, C, D, E >::getConst().
T & RectMDArray< T, C, D, E >::operator() | ( | const Point & | a_iv, | |
unsigned int | a_comp, | |||
unsigned char | a_d | |||
) | [inline] |
Indexing operator for vector-valued RectMDArray objects with two indices. Assertion failure if returned type is not scalar.
a_iv | A Point in the domain of *this | |
a_comp | First index of the desired component of the data at a_iv. | |
a_d | Second index of the desired component of the data at a_iv |
References RectMDArray< T, C, D, E >::get2().
const T & RectMDArray< T, C, D, E >::operator() | ( | const Point & | a_iv, | |
unsigned int | a_comp, | |||
unsigned char | a_d | |||
) | const [inline] |
Indexing operator for constant vector-valued RectMDArray objects with two indices. Assertion failure if returned type is not scalar.
a_iv | A Point in the domain of *this | |
a_comp | First index of the desired component of the data at a_iv. | |
a_d | Second index of the desired component of the data at a_iv |
References RectMDArray< T, C, D, E >::getConst2().
T & RectMDArray< T, C, D, E >::operator() | ( | const Point & | a_iv, | |
unsigned int | a_comp, | |||
unsigned char | a_d, | |||
unsigned char | a_e | |||
) | [inline] |
Indexing operator for vector-valued RectMDArray objects with three indices. Assertion failure if returned type is not scalar.
a_iv | A Point in the domain of *this | |
a_comp | First index of the desired component of the data at a_iv. | |
a_d | Second index of the desired component of the data at a_iv | |
a_e | Third index of the desired component of the data at a_iv |
References RectMDArray< T, C, D, E >::get3().
const T & RectMDArray< T, C, D, E >::operator() | ( | const Point & | a_iv, | |
unsigned int | a_comp, | |||
unsigned char | a_d, | |||
unsigned char | a_e | |||
) | const [inline] |
Indexing operator for constant vector-valued RectMDArray objects with three indices. Assertion failure if returned type is not scalar.
a_iv | A Point in the domain of *this | |
a_comp | First index of the desired component of the data at a_iv. | |
a_d | Second index of the desired component of the data at a_iv | |
a_e | Third index of the desired component of the data at a_iv |
References RectMDArray< T, C, D, E >::getConst3().
T & RectMDArray< T, C, D, E >::operator[] | ( | int | a_index | ) | const [inline] |
Index with integer. Assertion failure if a_index is out of bounds.
a_index | Integer valued index between 0 and *this.m_box.sizeOf()-1. |
References RectMDArray< T, C, D, E >::dataSize(), and RectMDArray< T, C, D, E >::m_rawPtr.
T & RectMDArray< T, C, D, E >::index | ( | int | a_index | ) | const [inline] |
Index with integer. Assertion failure if a_index is out of bounds.
a_index | Integer valued index between 0 and *this.m_box.sizeOf()-1. |
References RectMDArray< T, C, D, E >::dataSize(), and RectMDArray< T, C, D, E >::m_rawPtr.
Referenced by Stencil< T >::apply().
RectMDArray< T, C, D, E > & RectMDArray< T, C, D, E >::plus | ( | const RectMDArray< T, C, D, E > & | a_rhs | ) | [inline] |
Addition in place of two RectMDArrays. Defined on the intersection.
References RectMDArray< T, C, D, E >::dataSize(), Box::getHighCorner(), Box::getIndex(), Box::getLowCorner(), Box::increment(), RectMDArray< T, C, D, E >::m_box, RectMDArray< T, C, D, E >::m_rawPtr, Box::notDone(), and Box::sizeOf().
Referenced by RectMDArray< T, C, D, E >::operator+=().
RectMDArray< T, C, D, E > & RectMDArray< T, C, D, E >::minus | ( | const RectMDArray< T, C, D, E > & | a_rhs | ) | [inline] |
Subtraction in place of two RectMDArrays. Defined on the intersection.
References RectMDArray< T, C, D, E >::dataSize(), Box::getHighCorner(), Box::getIndex(), Box::getLowCorner(), Box::increment(), RectMDArray< T, C, D, E >::m_box, RectMDArray< T, C, D, E >::m_rawPtr, Box::notDone(), and Box::sizeOf().
Referenced by RectMDArray< T, C, D, E >::operator-=().
RectMDArray< T, C, D, E > & RectMDArray< T, C, D, E >::times | ( | const RectMDArray< T, C, D, E > & | a_rhs | ) | [inline] |
Multiplication in place of two RectMDArrays. Defined on the intersection.
References RectMDArray< T, C, D, E >::dataSize(), Box::getHighCorner(), Box::getIndex(), Box::getLowCorner(), Box::increment(), RectMDArray< T, C, D, E >::m_box, RectMDArray< T, C, D, E >::m_rawPtr, Box::notDone(), and Box::sizeOf().
Referenced by RectMDArray< T, C, D, E >::operator*=().
RectMDArray< T, C, D, E > & RectMDArray< T, C, D, E >::divide | ( | const RectMDArray< T, C, D, E > & | a_rhs | ) | [inline] |
Division in place of two RectMDArrays. Defined on the intersection.
Assertion error if division by 0 would occur.
References RectMDArray< T, C, D, E >::dataSize(), Box::getHighCorner(), Box::getIndex(), Box::getLowCorner(), Box::increment(), RectMDArray< T, C, D, E >::m_box, RectMDArray< T, C, D, E >::m_rawPtr, Box::notDone(), and Box::sizeOf().
Referenced by RectMDArray< T, C, D, E >::operator/=().
RectMDArray<T,C,D,E>& RectMDArray< T, C, D, E >::operator+= | ( | const RectMDArray< T, C, D, E > & | a_rhs | ) | [inline] |
Same as RectMDArray::plus(). Defines the "+=" operator on RectMDArrays. Defined on the intersection.
References RectMDArray< T, C, D, E >::plus().
RectMDArray<T,C,D,E>& RectMDArray< T, C, D, E >::operator-= | ( | const RectMDArray< T, C, D, E > & | a_rhs | ) | [inline] |
Same as RectMDArray::minus(). Defines the "-=" operator on RectMDArrays. Defined on the intersection.
References RectMDArray< T, C, D, E >::minus().
RectMDArray<T,C,D,E>& RectMDArray< T, C, D, E >::operator*= | ( | const RectMDArray< T, C, D, E > & | a_rhs | ) | [inline] |
Same as RectMDArray::times(). Defines the "*=" operator on RectMDArrays. Defined on the intersection.
References RectMDArray< T, C, D, E >::times().
RectMDArray<T,C,D,E>& RectMDArray< T, C, D, E >::operator/= | ( | const RectMDArray< T, C, D, E > & | a_rhs | ) | [inline] |
Same as RectMDArray::divide(). Defines the "/=" operator on RectMDArrays. Defined on the intersection.
Assertion error if division by 0 is attempted.
References RectMDArray< T, C, D, E >::divide().
RectMDArray< T, C, D, E > & RectMDArray< T, C, D, E >::operator+= | ( | T | scale | ) | [inline] |
Componentwise addition in place by scale.
References RectMDArray< T, C, D, E >::dataSize(), and RectMDArray< T, C, D, E >::m_rawPtr.
RectMDArray< T, C, D, E > & RectMDArray< T, C, D, E >::operator-= | ( | T | scale | ) | [inline] |
Componentwise subtraction in place by scale.
References RectMDArray< T, C, D, E >::dataSize(), and RectMDArray< T, C, D, E >::m_rawPtr.
RectMDArray< T, C, D, E > & RectMDArray< T, C, D, E >::operator*= | ( | T | scale | ) | [inline] |
Componentwise multiplication in place by scale.
References RectMDArray< T, C, D, E >::dataSize(), and RectMDArray< T, C, D, E >::m_rawPtr.
RectMDArray< T, C, D, E > & RectMDArray< T, C, D, E >::operator/= | ( | T | scale | ) | [inline] |
Componentwise division in place by scale.
Assertion error if scale = 0.
References RectMDArray< T, C, D, E >::dataSize(), and RectMDArray< T, C, D, E >::m_rawPtr.
void RectMDArray< T, C, D, E >::print | ( | ) | [inline] |
Prints the domain box and the data in m_data.
param a Scale multiplying x param x A RectMDArray param b Scale multiplying y aram y A RectMDArray param scale A scale factor. param a_rhs A RectMDArray
References BLOCKSIZE, RectMDArray< T, C, D, E >::dataSize(), RectMDArray< T, C, D, E >::m_box, RectMDArray< T, C, D, E >::m_data, RectMDArray< T, C, D, E >::m_rawPtr, and Box::print().
void RectMDArray< T, C, D, E >::print | ( | ) | const [inline] |
Prints the domain box and the data in m_data for constant RectMDArray.
References BLOCKSIZE, RectMDArray< T, C, D, E >::dataSize(), RectMDArray< T, C, D, E >::m_box, RectMDArray< T, C, D, E >::m_data, RectMDArray< T, C, D, E >::m_rawPtr, and Box::print().
size_t RectMDArray< T, C, D, E >::dataSize | ( | ) | const [inline] |
Returns the number of values stored in *this.
Output is equal to m_box.sizeOf()*C*D*E
References RectMDArray< T, C, D, E >::m_box, and Box::sizeOf().
Referenced by RectMDArray< T, C, D, E >::define(), RectMDArray< T, C, D, E >::divide(), RectMDArray< T, C, D, E >::index(), RectMDArray< T, C, D, E >::minus(), RectMDArray< T, C, D, E >::operator*=(), RectMDArray< T, C, D, E >::operator+=(), RectMDArray< T, C, D, E >::operator-=(), RectMDArray< T, C, D, E >::operator/=(), RectMDArray< T, C, D, E >::operator=(), RectMDArray< T, C, D, E >::operator[](), RectMDArray< T, C, D, E >::plus(), RectMDArray< T, C, D, E >::print(), RectMDArray< T, C, D, E >::RectMDArray(), RectMDArray< T, C, D, E >::setVal(), RectMDArray< T, C, D, E >::times(), and RectMDArray< T, C, D, E >::~RectMDArray().
bool RectMDArray< T, C, D, E >::defined | ( | ) | const [inline] |
T & RectMDArray< T, C, D, E >::get | ( | const Point & | a_iv, | |
unsigned int | a_comp = 0 | |||
) | [inline] |
Return the data associated with the Point a_iv. For use with scalar or vector valued data.
a_iv | A Point in the domain of *this. | |
a_comp | Desired component of the data. Defaults to 0 (for scalar data) |
References Box::getIndex(), RectMDArray< T, C, D, E >::m_box, RectMDArray< T, C, D, E >::m_rawPtr, and Box::sizeOf().
Referenced by forall(), forall_CToF(), forall_max_scal(), forall_scal(), and forall_stride().
T & RectMDArray< T, C, D, E >::get2 | ( | const Point & | a_iv, | |
unsigned int | a_comp, | |||
unsigned char | a_d | |||
) | [inline] |
Return the data associated with the Point a_iv. For use with data with two indices.
a_iv | A Point in the domain of *this. | |
a_comp | First index of the desired component of the data | |
a_comp | Second index of the desired component of the data |
References Box::getIndex(), RectMDArray< T, C, D, E >::m_box, RectMDArray< T, C, D, E >::m_rawPtr, and Box::sizeOf().
Referenced by RectMDArray< T, C, D, E >::operator()().
T & RectMDArray< T, C, D, E >::get3 | ( | const Point & | a_iv, | |
unsigned int | a_comp, | |||
unsigned char | a_d, | |||
unsigned char | a_e | |||
) | [inline] |
Return the data associated with the Point a_iv. For use with data with three indices.
a_iv | A Point in the domain of *this. | |
a_comp | First index of the desired component of the data | |
a_comp | Second index of the desired component of the data | |
a_comp | Third index of the desired component of the data |
References Box::getIndex(), RectMDArray< T, C, D, E >::m_box, RectMDArray< T, C, D, E >::m_rawPtr, and Box::sizeOf().
Referenced by RectMDArray< T, C, D, E >::operator()().
const T & RectMDArray< T, C, D, E >::getConst | ( | const Point & | a_iv, | |
unsigned int | a_comp = 0 | |||
) | const [inline] |
Same as RectMDArray::get() for constant RectMDArrays.
References Box::getIndex(), RectMDArray< T, C, D, E >::m_box, RectMDArray< T, C, D, E >::m_rawPtr, and Box::sizeOf().
Referenced by RectMDArray< T, C, D, E >::copyTo(), forall_CToF(), forall_max_scal(), forall_scal(), forall_stride(), RectMDArray< T, C, D, E >::operator()(), and RectMDArray< T, C, D, E >::operator[]().
const T & RectMDArray< T, C, D, E >::getConst2 | ( | const Point & | a_iv, | |
unsigned int | a_comp, | |||
unsigned char | a_d | |||
) | const [inline] |
Same as RectMDArray::get2() for constant RectMDArrays.
References Box::getIndex(), RectMDArray< T, C, D, E >::m_box, RectMDArray< T, C, D, E >::m_rawPtr, and Box::sizeOf().
Referenced by RectMDArray< T, C, D, E >::operator()().
const T & RectMDArray< T, C, D, E >::getConst3 | ( | const Point & | a_iv, | |
unsigned int | a_comp, | |||
unsigned char | a_d, | |||
unsigned char | a_e | |||
) | const [inline] |
Same as RectMDArray::get3() for constant RectMDArrays.
References Box::getIndex(), RectMDArray< T, C, D, E >::m_box, RectMDArray< T, C, D, E >::m_rawPtr, and Box::sizeOf().
Referenced by RectMDArray< T, C, D, E >::operator()().
std::shared_ptr<T> RectMDArray< T, C, D, E >::m_sliceData | ( | ) | [inline] |
Not for Public use. DO NOT USE.
References RectMDArray< T, C, D, E >::m_data.
Referenced by slice().
T* RectMDArray< T, C, D, E >::m_slicePtr | ( | ) | [inline] |
Not for Public use. DO NOT USE.
References RectMDArray< T, C, D, E >::m_rawPtr.
Referenced by slice().
bool RectMDArray< T, C, D, E >::isSlice | ( | ) | const [inline] |
Check if *this is a slice of another array.
References RectMDArray< T, C, D, E >::m_isSlice.
Referenced by RectMDArray< T, C, D, E >::operator=().
std::shared_ptr<T> RectMDArray< T, C, D, E >::m_data [private] |
Data array.
Referenced by RectMDArray< T, C, D, E >::define(), RectMDArray< T, C, D, E >::defined(), RectMDArray< T, C, D, E >::m_sliceData(), RectMDArray< T, C, D, E >::operator=(), RectMDArray< T, C, D, E >::print(), RectMDArray< T, C, D, E >::setVal(), and RectMDArray< T, C, D, E >::~RectMDArray().
T* RectMDArray< T, C, D, E >::m_rawPtr [private] |
Raw pointer to the data.
Referenced by RectMDArray< T, C, D, E >::define(), RectMDArray< T, C, D, E >::divide(), RectMDArray< T, C, D, E >::get(), RectMDArray< T, C, D, E >::get2(), RectMDArray< T, C, D, E >::get3(), RectMDArray< T, C, D, E >::getConst(), RectMDArray< T, C, D, E >::getConst2(), RectMDArray< T, C, D, E >::getConst3(), RectMDArray< T, C, D, E >::index(), RectMDArray< T, C, D, E >::m_slicePtr(), RectMDArray< T, C, D, E >::minus(), RectMDArray< T, C, D, E >::operator*=(), RectMDArray< T, C, D, E >::operator+=(), RectMDArray< T, C, D, E >::operator-=(), RectMDArray< T, C, D, E >::operator/=(), RectMDArray< T, C, D, E >::operator=(), RectMDArray< T, C, D, E >::operator[](), RectMDArray< T, C, D, E >::plus(), RectMDArray< T, C, D, E >::print(), RectMDArray< T, C, D, E >::RectMDArray(), RectMDArray< T, C, D, E >::setVal(), and RectMDArray< T, C, D, E >::times().
Box RectMDArray< T, C, D, E >::m_box [private] |
Box defining the domain of *this.
Referenced by RectMDArray< T, C, D, E >::copyTo(), RectMDArray< T, C, D, E >::dataSize(), RectMDArray< T, C, D, E >::define(), RectMDArray< T, C, D, E >::divide(), RectMDArray< T, C, D, E >::get(), RectMDArray< T, C, D, E >::get2(), RectMDArray< T, C, D, E >::get3(), RectMDArray< T, C, D, E >::getBox(), RectMDArray< T, C, D, E >::getConst(), RectMDArray< T, C, D, E >::getConst2(), RectMDArray< T, C, D, E >::getConst3(), RectMDArray< T, C, D, E >::minus(), RectMDArray< T, C, D, E >::operator=(), RectMDArray< T, C, D, E >::plus(), RectMDArray< T, C, D, E >::print(), RectMDArray< T, C, D, E >::RectMDArray(), RectMDArray< T, C, D, E >::shift(), and RectMDArray< T, C, D, E >::times().
bool RectMDArray< T, C, D, E >::m_isSlice [private] |
Flag which is true if *this is a slice of another RectMDArray (and is thus sharing data).
Referenced by RectMDArray< T, C, D, E >::isSlice(), RectMDArray< T, C, D, E >::operator=(), and RectMDArray< T, C, D, E >::RectMDArray().