escript  Revision_
Public Member Functions | Private Member Functions | Private Attributes | List of all members
escript::WrappedArray Class Reference

#include <WrappedArray.h>

Public Member Functions

 WrappedArray (const boost::python::object &obj_in)
 
 ~WrappedArray ()
 
unsigned int getRank () const
 
const DataTypes::ShapeTypegetShape () 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_tdat_r
 
DataTypes::cplx_tdat_c
 

Constructor & Destructor Documentation

◆ WrappedArray()

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

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

◆ ~WrappedArray()

WrappedArray::~WrappedArray ( )

References dat_c, and dat_r.

Member Function Documentation

◆ convertArray()

void WrappedArray::convertArray ( ) const

◆ convertArrayC()

void WrappedArray::convertArrayC ( ) const
private

◆ convertArrayR()

void WrappedArray::convertArrayR ( ) const
private

◆ convertNumpyArray()

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

◆ convertNumpyArrayC()

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

◆ getElt() [1/5]

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

◆ 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

◆ getElt() [4/5]

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

◆ getElt() [5/5]

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

◆ getEltC() [1/5]

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

◆ 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

◆ getEltC() [4/5]

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

◆ getEltC() [5/5]

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

◆ getRank()

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

◆ getShape()

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

◆ isComplex()

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

Member Data Documentation

◆ converted

bool escript::WrappedArray::converted
mutableprivate

Referenced by convertArrayC(), and convertArrayR().

◆ dat_c

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

◆ dat_r

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

◆ iscomplex

bool escript::WrappedArray::iscomplex
private

◆ obj

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

Referenced by getElt(), and getEltC().

◆ rank

int escript::WrappedArray::rank
private

◆ 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

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