escript::WrappedArray Class Reference

`#include <WrappedArray.h>`

## Public Member Functions

| WrappedArray (const boost::python::object &obj_in)
| ~WrappedArray ()
unsigned int | getRank () const
const DataTypes::ShapeType & | getShape () const
bool | isComplex () const
DataTypes::real_t | getElt () const
DataTypes::real_t | getElt (unsigned int i) const
DataTypes::real_t | getElt (unsigned int i, unsigned int j) const
DataTypes::real_t | getElt (unsigned int i, unsigned int j, unsigned int k) const
DataTypes::real_t | getElt (unsigned int i, unsigned int j, unsigned int k, unsigned int m) const
DataTypes::cplx_t | getEltC () const
DataTypes::cplx_t | getEltC (unsigned int i) const
DataTypes::cplx_t | getEltC (unsigned int i, unsigned int j) const
DataTypes::cplx_t | getEltC (unsigned int i, unsigned int j, unsigned int k) const
DataTypes::cplx_t | getEltC (unsigned int i, unsigned int j, unsigned int k, unsigned int m) const
void | convertArray () const

## Private Member Functions

void | convertArrayR () const
void | convertArrayC () const
template<typename T >
void | convertNumpyArray (const T *array, const std::vector< int > &strides) const
template<typename T >
void | convertNumpyArrayC (const T *array, const std::vector< int > &strides) const

## Private Attributes

const boost::python::object & | obj
int | rank
bool | converted
bool | iscomplex
escript::DataTypes::ShapeType | shape
DataTypes::real_t | scalar_r
DataTypes::cplx_t | scalar_c
DataTypes::real_t * | dat_r
DataTypes::cplx_t * | dat_c

## Constructor & Destructor Documentation

## WrappedArray()

WrappedArray::WrappedArray | ( | const boost::python::object & | obj_in | ) |

References dat_c, dat_r, iscomplex, obj, rank, scalar_c, scalar_r, and shape.

## ~WrappedArray()

WrappedArray::~WrappedArray | ( |  | ) |

References dat_c, and dat_r.

## Member Function Documentation

## convertArray()

void WrappedArray::convertArray | ( |  | ) | const

References convertArrayC(), convertArrayR(), and iscomplex.

## convertArrayC()

void WrappedArray::convertArrayC | ( |  | ) | const

private

References converted, dat_c, getElt(), escript::DataTypes::getRelIndex(), escript::DataTypes::noValues(), rank, and shape.

Referenced by convertArray().

## convertArrayR()

void WrappedArray::convertArrayR | ( |  | ) | const

private

References converted, dat_r, getElt(), escript::DataTypes::getRelIndex(), escript::DataTypes::noValues(), rank, and shape.

Referenced by convertArray().

## convertNumpyArray()

template<typename T >

void WrappedArray::convertNumpyArray | ( | const T * | array,
|  | const std::vector< int > & | strides
| ) |  | const

private

References dat_r, escript::DataTypes::getRelIndex(), escript::DataTypes::noValues(), rank, and shape.

## convertNumpyArrayC()

template<typename T >

void WrappedArray::convertNumpyArrayC | ( | const T * | array,
|  | const std::vector< int > & | strides
| ) |  | const

private

References dat_c, escript::DataTypes::getRelIndex(), escript::DataTypes::noValues(), rank, and shape.

## getElt() [1/5]

DataTypes::real_t escript::WrappedArray::getElt | ( |  | ) | const

inline

References iscomplex, and scalar_r.

Referenced by convertArrayC(), convertArrayR(), escript::DataTypes::DataVectorTaipan::copyFromArrayToOffset(), escript::DataTypes::DataVectorAlt< cplx_t >::operator!=(), and escript::DataTypes::DataVectorAlt< cplx_t >::operator==().

## getElt() [2/5]

DataTypes::real_t escript::WrappedArray::getElt | ( | unsigned int | i | ) | const

inline

References dat_r, iscomplex, and obj.

## getElt() [3/5]

DataTypes::real_t escript::WrappedArray::getElt | ( | unsigned int | i,
|  | unsigned int | j
| ) |  | const

inline

References dat_r, escript::DataTypes::getRelIndex(), iscomplex, obj, and shape.

## getElt() [4/5]

DataTypes::real_t escript::WrappedArray::getElt | ( | unsigned int | i,
|  | unsigned int | j,
|  | unsigned int | k
| ) |  | const

inline

References dat_r, escript::DataTypes::getRelIndex(), iscomplex, obj, and shape.

## getElt() [5/5]

DataTypes::real_t escript::WrappedArray::getElt | ( | unsigned int | i,
|  | unsigned int | j,
|  | unsigned int | k,
|  | unsigned int | m
| ) |  | const

inline

References dat_r, escript::DataTypes::getRelIndex(), iscomplex, obj, and shape.

## getEltC() [1/5]

DataTypes::cplx_t escript::WrappedArray::getEltC | ( |  | ) | const

inline

References iscomplex, scalar_c, and scalar_r.

Referenced by escript::DataTypes::DataVectorAlt< cplx_t >::copyFromArrayToOffset().

## getEltC() [2/5]

DataTypes::cplx_t escript::WrappedArray::getEltC | ( | unsigned int | i | ) | const

inline

References dat_c, dat_r, iscomplex, and obj.

## getEltC() [3/5]

DataTypes::cplx_t escript::WrappedArray::getEltC | ( | unsigned int | i,
|  | unsigned int | j
| ) |  | const

inline

References dat_c, dat_r, escript::DataTypes::getRelIndex(), iscomplex, obj, and shape.

## getEltC() [4/5]

DataTypes::cplx_t escript::WrappedArray::getEltC | ( | unsigned int | i,
|  | unsigned int | j,
|  | unsigned int | k
| ) |  | const

inline

References dat_c, dat_r, escript::DataTypes::getRelIndex(), iscomplex, obj, and shape.

## getEltC() [5/5]

DataTypes::cplx_t escript::WrappedArray::getEltC | ( | unsigned int | i,
|  | unsigned int | j,
|  | unsigned int | k,
|  | unsigned int | m
| ) |  | const

inline

References dat_c, dat_r, escript::DataTypes::getRelIndex(), iscomplex, obj, and shape.

## getRank()

unsigned int escript::WrappedArray::getRank | ( |  | ) | const

inline

References rank.

Referenced by escript::DataTypes::DataVectorAlt< cplx_t >::copyFromArrayToOffset(), escript::DataTypes::DataVectorTaipan::copyFromArrayToOffset(), escript::DataExpanded::copyToDataPoint(), and escript::DataTypes::DataVectorAlt< cplx_t >::operator==().

## getShape()

const DataTypes::ShapeType & escript::WrappedArray::getShape | ( |  | ) | const

inline

References shape.

Referenced by escript::DataExpanded::copy(), escript::DataTypes::DataVectorTaipan::copyFromArray(), escript::DataTypes::DataVectorAlt< cplx_t >::copyFromArrayToOffset(), escript::DataTypes::DataVectorTaipan::copyFromArrayToOffset(), and escript::DataTypes::DataVectorAlt< cplx_t >::operator==().

## isComplex()

bool escript::WrappedArray::isComplex | ( |  | ) | const

inline

References iscomplex.

Referenced by escript::DataConstant::DataConstant(), and escript::DataExpanded::DataExpanded().

## Member Data Documentation

## converted

bool escript::WrappedArray::converted

mutable private

Referenced by convertArrayC(), and convertArrayR().

## dat_c

DataTypes::cplx_t* escript::WrappedArray::dat_c

mutable private

Referenced by convertArrayC(), convertNumpyArrayC(), getEltC(), WrappedArray(), and ~WrappedArray().

## dat_r

DataTypes::real_t* escript::WrappedArray::dat_r

mutable private

Referenced by convertArrayR(), convertNumpyArray(), getElt(), getEltC(), WrappedArray(), and ~WrappedArray().

## iscomplex

bool escript::WrappedArray::iscomplex

private

Referenced by convertArray(), getElt(), getEltC(), isComplex(), and WrappedArray().

## obj

const boost::python::object& escript::WrappedArray::obj

private

Referenced by getElt(), getEltC(), and WrappedArray().

## rank

int escript::WrappedArray::rank

private

Referenced by convertArrayC(), convertArrayR(), convertNumpyArray(), convertNumpyArrayC(), getRank(), and WrappedArray().

## scalar_c

DataTypes::cplx_t escript::WrappedArray::scalar_c

private

Referenced by getEltC(), and WrappedArray().

## scalar_r

DataTypes::real_t escript::WrappedArray::scalar_r

private

Referenced by getElt(), getEltC(), and WrappedArray().

## shape

escript::DataTypes::ShapeType escript::WrappedArray::shape

private

Referenced by convertArrayC(), convertArrayR(), convertNumpyArray(), convertNumpyArrayC(), getElt(), getEltC(), getShape(), and WrappedArray().

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

- WrappedArray.h
- WrappedArray.cpp