RectMDArray< T, C, D, E > Class Template Reference

#include <RectMDArray.H>

List of all members.


Detailed Description

template<class T = double, unsigned int C = 1, unsigned char D = 1, unsigned char E = 1>
class RectMDArray< T, C, D, E >

Multidimensional Rectangular Array of data.

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

Template Parameters:
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.
RectMDArrayoperator= (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).

Constructor & Destructor Documentation

template<class T, unsigned int C, unsigned char D, unsigned char E>
RectMDArray< T, C, D, E >::RectMDArray (  )  [inline]

Default constructor.

template<class T, unsigned int C, unsigned char D, unsigned char E>
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.

template<class T, unsigned int C, unsigned char D, unsigned char E>
RectMDArray< T, C, D, E >::RectMDArray ( const RectMDArray< T, C, D, E > &  a_srcArray  )  [inline]

template<class T, unsigned int C, unsigned char D, unsigned char E>
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.

template<class T, unsigned int C, unsigned char D, unsigned char E>
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.

Parameters:
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.

template<class T, unsigned int C, unsigned char D, unsigned char E>
RectMDArray< T, C, D, E >::~RectMDArray (  )  [inline]


Member Function Documentation

template<class T, unsigned int C, unsigned char D, unsigned char E>
void RectMDArray< T, C, D, E >::define ( const Box a_box  )  [inline]

template<class T, unsigned int C, unsigned char D, unsigned char E>
void RectMDArray< T, C, D, E >::setVal ( const T &  a_val  )  const [inline]

Sets all values in a RectMDArray to a constant value.

Parameters:
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().

template<class T, unsigned int C, unsigned char D, unsigned char E>
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.

template<class T = double, unsigned int C = 1, unsigned char D = 1, unsigned char E = 1>
Box RectMDArray< T, C, D, E >::getBox (  )  const [inline]

template<class T, unsigned int C, unsigned char D, unsigned char E>
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().

template<class T, unsigned int C, unsigned char D, unsigned char E>
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)

Parameters:
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().

template<class T, unsigned int C, unsigned char D, unsigned char E>
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.

Parameters:
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().

template<class T = double, unsigned int C = 1, unsigned char D = 1, unsigned char E = 1>
void RectMDArray< T, C, D, E >::shift ( const Point  a_pt  )  [inline]

Shift in place.

Shift the domain of *this using a_pt

Parameters:
a_pt A Point interpreted as a shift vector.

References RectMDArray< T, C, D, E >::m_box, and Box::shift().

template<class T, unsigned int C, unsigned char D, unsigned char E>
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.

Parameters:
a_iv A Point in the domain of *this

template<class T, unsigned int C, unsigned char D, unsigned char E>
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.

Parameters:
a_iv A Point in the domain of *this

References RectMDArray< T, C, D, E >::getConst().

template<class T, unsigned int C, unsigned char D, unsigned char E>
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.

Parameters:
a_iv A Point in the domain of *this
a_comp Integer corresponding to the desired component of the data at a_iv.

template<class T, unsigned int C, unsigned char D, unsigned char E>
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.

Parameters:
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().

template<class T, unsigned int C, unsigned char D, unsigned char E>
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.

Parameters:
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().

template<class T, unsigned int C, unsigned char D, unsigned char E>
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.

Parameters:
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().

template<class T, unsigned int C, unsigned char D, unsigned char E>
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.

Parameters:
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().

template<class T, unsigned int C, unsigned char D, unsigned char E>
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.

Parameters:
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().

template<class T, unsigned int C, unsigned char D, unsigned char E>
T & RectMDArray< T, C, D, E >::operator[] ( int  a_index  )  const [inline]

Index with integer. Assertion failure if a_index is out of bounds.

Parameters:
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.

template<class T, unsigned int C, unsigned char D, unsigned char E>
T & RectMDArray< T, C, D, E >::index ( int  a_index  )  const [inline]

Index with integer. Assertion failure if a_index is out of bounds.

Parameters:
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().

template<class T, unsigned int C, unsigned char D, unsigned char E>
RectMDArray< T, C, D, E > & RectMDArray< T, C, D, E >::plus ( const RectMDArray< T, C, D, E > &  a_rhs  )  [inline]

template<class T, unsigned int C, unsigned char D, unsigned char E>
RectMDArray< T, C, D, E > & RectMDArray< T, C, D, E >::minus ( const RectMDArray< T, C, D, E > &  a_rhs  )  [inline]

template<class T, unsigned int C, unsigned char D, unsigned char E>
RectMDArray< T, C, D, E > & RectMDArray< T, C, D, E >::times ( const RectMDArray< T, C, D, E > &  a_rhs  )  [inline]

template<class T, unsigned int C, unsigned char D, unsigned char E>
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/=().

template<class T = double, unsigned int C = 1, unsigned char D = 1, unsigned char E = 1>
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().

template<class T = double, unsigned int C = 1, unsigned char D = 1, unsigned char E = 1>
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().

template<class T = double, unsigned int C = 1, unsigned char D = 1, unsigned char E = 1>
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().

template<class T = double, unsigned int C = 1, unsigned char D = 1, unsigned char E = 1>
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().

template<class T, unsigned int C, unsigned char D, unsigned char E>
RectMDArray< T, C, D, E > & RectMDArray< T, C, D, E >::operator+= ( scale  )  [inline]

Componentwise addition in place by scale.

References RectMDArray< T, C, D, E >::dataSize(), and RectMDArray< T, C, D, E >::m_rawPtr.

template<class T, unsigned int C, unsigned char D, unsigned char E>
RectMDArray< T, C, D, E > & RectMDArray< T, C, D, E >::operator-= ( scale  )  [inline]

Componentwise subtraction in place by scale.

References RectMDArray< T, C, D, E >::dataSize(), and RectMDArray< T, C, D, E >::m_rawPtr.

template<class T, unsigned int C, unsigned char D, unsigned char E>
RectMDArray< T, C, D, E > & RectMDArray< T, C, D, E >::operator*= ( scale  )  [inline]

Componentwise multiplication in place by scale.

References RectMDArray< T, C, D, E >::dataSize(), and RectMDArray< T, C, D, E >::m_rawPtr.

template<class T, unsigned int C, unsigned char D, unsigned char E>
RectMDArray< T, C, D, E > & RectMDArray< T, C, D, E >::operator/= ( 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.

template<class T, unsigned int C, unsigned char D, unsigned char E>
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().

template<class T, unsigned int C, unsigned char D, unsigned char E>
void RectMDArray< T, C, D, E >::print (  )  const [inline]

template<class T, unsigned int C, unsigned char D, unsigned char E>
size_t RectMDArray< T, C, D, E >::dataSize (  )  const [inline]

template<class T, unsigned int C, unsigned char D, unsigned char E>
bool RectMDArray< T, C, D, E >::defined (  )  const [inline]

Returns true if *this has been defined.

References RectMDArray< T, C, D, E >::m_data.

template<class T, unsigned int C, unsigned char D, unsigned char E>
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.

Parameters:
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().

template<class T, unsigned int C, unsigned char D, unsigned char E>
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.

Parameters:
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()().

template<class T, unsigned int C, unsigned char D, unsigned char E>
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.

Parameters:
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()().

template<class T, unsigned int C, unsigned char D, unsigned char E>
const T & RectMDArray< T, C, D, E >::getConst ( const Point a_iv,
unsigned int  a_comp = 0 
) const [inline]

template<class T, unsigned int C, unsigned char D, unsigned char E>
const T & RectMDArray< T, C, D, E >::getConst2 ( const Point a_iv,
unsigned int  a_comp,
unsigned char  a_d 
) const [inline]

template<class T, unsigned int C, unsigned char D, unsigned char E>
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]

template<class T = double, unsigned int C = 1, unsigned char D = 1, unsigned char E = 1>
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().

template<class T = double, unsigned int C = 1, unsigned char D = 1, unsigned char E = 1>
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().

template<class T = double, unsigned int C = 1, unsigned char D = 1, unsigned char E = 1>
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=().


Member Data Documentation

template<class T = double, unsigned int C = 1, unsigned char D = 1, unsigned char E = 1>
std::shared_ptr<T> RectMDArray< T, C, D, E >::m_data [private]

template<class T = double, unsigned int C = 1, unsigned char D = 1, unsigned char E = 1>
T* RectMDArray< T, C, D, E >::m_rawPtr [private]

template<class T = double, unsigned int C = 1, unsigned char D = 1, unsigned char E = 1>
Box RectMDArray< T, C, D, E >::m_box [private]

template<class T = double, unsigned int C = 1, unsigned char D = 1, unsigned char E = 1>
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().


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

Generated on Fri Mar 11 12:53:44 2016 for AMRStencil by  doxygen 1.5.5