escript::DataAbstract Class Referenceabstract

`#include <DataAbstract.h>`

Inheritance diagram for escript::DataAbstract:

## Public Types

typedef DataTypes::ShapeType | ShapeType

## Public Member Functions

DataAbstract_ptr | getPtr ()
| Return shared pointer managing this object. More...
const_DataAbstract_ptr | getPtr () const
| DataAbstract (const FunctionSpace &what, const ShapeType &shape, bool isDataEmpty=false, bool isCplx=false)
| Constructor for DataAbstract. More...
virtual | ~DataAbstract ()
| Destructor for DataAbstract. More...
virtual std::string | toString () const =0
| Write the data as a string. More...
virtual DataAbstract * | deepCopy () const =0
| Return a deep copy of the current object. More...
virtual DataAbstract * | zeroedCopy () const =0
| Return an object with the same type, domain (and tags if appropriate) as this, but all values are zeroed. More...
virtual DataReady_ptr | resolve ()=0
| Return a data object with all points resolved. More...
virtual void | dump (const std::string fileName) const
| dumps the object into a netCDF file More...
int | getNumDPPSample () const
| Return the number of data points per sample. More...
int | getNumSamples () const
| Return the number of samples. More...
bool | hasNoSamples () const
const DataTypes::ShapeType & | getShape () const
| Return the shape information for the point data. More...
unsigned int | getRank () const
| Return the rank information for the point data. More...
virtual DataTypes::RealVectorType::size_type | getPointOffset (int sampleNo, int dataPointNo) const =0
| Return the offset for the given sample. This returns the offset for the given point into the container holding the point data. More...
virtual DataTypes::RealVectorType::size_type | getLength () const =0
| Return the number of doubles stored for this Data object. More...
virtual DataTypes::real_t * | getSampleDataByTag (int tag, DataTypes::real_t dummy=0)
| Return the real sample data for the given tag key. NB: If the data isn't tagged an exception will be thrown. More...
virtual DataTypes::cplx_t * | getSampleDataByTag (int tag, DataTypes::cplx_t dummy)
| Return the complex sample data for the given tag key. NB: If the data isn't tagged an exception will be thrown. More...
virtual size_t | getTagCount () const
| Return number of tagged values stored in the data object. More...
void | operandCheck (const DataAbstract &right) const
| Check this and the given RHS operands are compatible. Throws an exception if they aren't. More...
bool | validSamplePointNo (int samplePointNo) const
| Return true if a valid sample point number. More...
bool | validSampleNo (int sampleNo) const
| Return true if a valid sample number. More...
const FunctionSpace & | getFunctionSpace () const
| Return the function space associated with this Data object. More...
virtual DataAbstract * | getSlice (const DataTypes::RegionType &region) const =0
| Return the given slice from this object. More...
virtual void | setTaggedValue (int tagKey, const DataTypes::ShapeType &pointshape, const DataTypes::RealVectorType &value, int dataOffset=0)
| setTaggedValue More...
virtual void | setTaggedValue (int tagKey, const DataTypes::ShapeType &pointshape, const DataTypes::CplxVectorType &value, int dataOffset=0)
virtual void | copyToDataPoint (const int sampleNo, const int dataPointNo, const DataTypes::real_t value)
| Copy a double value to the data point dataPointNo of sample sampleNo in this object. More...
virtual void | copyToDataPoint (const int sampleNo, const int dataPointNo, const DataTypes::cplx_t value)
virtual void | copyToDataPoint (const int sampleNo, const int dataPointNo, const WrappedArray &value)
| Copy the array object to the data point dataPointNo of sample sampleNo in this object. More...
virtual int | getTagNumber (int dpno)
| Return the tag number associated with the given data-point number. More...
virtual void | symmetric (DataAbstract *ev)
| Computes a symmetric matrix (A + AT) / 2. More...
virtual void | antisymmetric (DataAbstract *ev)
| Computes a antisymmetric matrix (A - AT) / 2. More...
virtual void | hermitian (DataAbstract *ev)
| Computes a symmetric matrix (A + A*) / 2. More...
virtual void | antihermitian (DataAbstract *ev)
| Computes a antisymmetric matrix (A - A*) / 2. More...
virtual void | trace (DataAbstract *ev, int axis_offset)
| Computes the trace of a matrix. More...
virtual void | transpose (DataAbstract *ev, int axis_offset)
| Transpose each data point of this Data object around the given axis. More...
virtual void | swapaxes (DataAbstract *ev, int axis0, int axis1)
| swaps components axis0 and axis1 More...
virtual void | eigenvalues (DataAbstract *ev)
| solves the eigenvalue problem this*V=ev*V for the eigenvalues ev More...
virtual int | matrixInverse (DataAbstract *out) const
| invert square matricies More...
virtual void | setToZero ()
| sets values to zero More...
virtual void | eigenvalues_and_eigenvectors (DataAbstract *ev, DataAbstract *V, const double tol=1.e-13)
| solves the eigenvalue problem this*V=ev*V for the eigenvalues ev and eigenvectors V More...
virtual void | reorderByReferenceIDs (DataTypes::dim_t *reference_ids)
| reorders data sample ordered by reference_ids to the ordering of the functions space More...
unsigned int | getNoValues () const
| Return the number of values in the shape for this object. More...
bool | isLazy () const
virtual bool | isConstant () const
virtual bool | isExpanded () const
virtual bool | actsExpanded () const
| Return true if this Data is expanded or resolves to expanded. That is, if it has a separate value for each datapoint in the sample. More...
virtual bool | isTagged () const
bool | isEmpty () const
bool | isComplex () const
| true if the components of datapoints are complex More...
virtual void | complicate ()

## Protected Attributes

int | m_noSamples
int | m_noDataPointsPerSample
bool | m_iscompl

## Private Attributes

FunctionSpace | m_functionSpace
DataTypes::ShapeType | m_shape
unsigned int | m_novalues
unsigned int | m_rank
bool | m_isempty

## Friends

class | DataLazy

## Member Typedef Documentation

## ShapeType

typedef DataTypes::ShapeType escript::DataAbstract::ShapeType

## Constructor & Destructor Documentation

## DataAbstract()

escript::DataAbstract::DataAbstract | ( | const FunctionSpace & | what,
|  | const ShapeType & | shape,
|  | bool | isDataEmpty = `false`,
|  | bool | isCplx = `false`
| ) |  |

Constructor for DataAbstract.

Parameters

  what | - Input - The functionspace to use.
  shape | - Input - Shape of each data value.
  isDataEmpty | - Input - Is this an instance of DataEmpty (for internal use only)

References ESCRIPT_MAX_DATA_RANK, m_isempty, and m_rank.

## ~DataAbstract()

escript::DataAbstract::~DataAbstract | ( |  | ) |

virtual

Destructor for DataAbstract.

## Member Function Documentation

## actsExpanded()

virtual bool escript::DataAbstract::actsExpanded | ( |  | ) | const

inline virtual

Return true if this Data is expanded or resolves to expanded. That is, if it has a separate value for each datapoint in the sample.

Reimplemented in escript::DataLazy, and escript::DataExpanded.

## antihermitian()

void escript::DataAbstract::antihermitian | ( | DataAbstract * | ev | ) |

virtual

Computes a antisymmetric matrix (A - A*) / 2.

Parameters

  ev | - Output - an antihermitian matrix

Reimplemented in escript::DataTagged, escript::DataExpanded, and escript::DataConstant.

## antisymmetric()

void escript::DataAbstract::antisymmetric | ( | DataAbstract * | ev | ) |

virtual

Computes a antisymmetric matrix (A - AT) / 2.

Parameters

  ev | - Output - a nonsymmetric matrix

Reimplemented in escript::DataTagged, escript::DataExpanded, and escript::DataConstant.

## complicate()

void escript::DataAbstract::complicate | ( |  | ) |

virtual

Reimplemented in escript::DataTagged, escript::DataExpanded, and escript::DataConstant.

## copyToDataPoint() [1/3]

void escript::DataAbstract::copyToDataPoint | ( | const int | sampleNo,
|  | const int | dataPointNo,
|  | const DataTypes::cplx_t | value
| ) |  |

virtual

Reimplemented in escript::DataExpanded.

## copyToDataPoint() [2/3]

void escript::DataAbstract::copyToDataPoint | ( | const int | sampleNo,
|  | const int | dataPointNo,
|  | const DataTypes::real_t | value
| ) |  |

virtual

Copy a double value to the data point dataPointNo of sample sampleNo in this object.

Description: Copy a double value to the data point dataPointNo of sample sampleNo in this object.

Parameters

  sampleNo | Input - sample number
  dataPointNo | Input - data point of the sample
  value | Input - new values for the data point

Reimplemented in escript::DataExpanded.

## copyToDataPoint() [3/3]

void escript::DataAbstract::copyToDataPoint | ( | const int | sampleNo,
|  | const int | dataPointNo,
|  | const WrappedArray & | value
| ) |  |

virtual

Copy the array object to the data point dataPointNo of sample sampleNo in this object.

Parameters

  sampleNo | Input - sample number
  dataPointNo | Input - data point of the sample
  value | Input - new values for the data point

Reimplemented in escript::DataExpanded.

## deepCopy()

virtual DataAbstract* escript::DataAbstract::deepCopy | ( |  | ) | const

pure virtual

Return a deep copy of the current object.

Implemented in escript::DataTagged, escript::DataLazy, escript::DataExpanded, escript::DataEmpty, and escript::DataConstant.

Referenced by escript::Data::exclusiveWrite().

## dump()

void escript::DataAbstract::dump | ( | const std::string | fileName | ) | const

virtual

dumps the object into a netCDF file

Reimplemented in escript::DataTagged, escript::DataExpanded, escript::DataEmpty, and escript::DataConstant.

## eigenvalues()

void escript::DataAbstract::eigenvalues | ( | DataAbstract * | ev | ) |

virtual

solves the eigenvalue problem this*V=ev*V for the eigenvalues ev

Parameters

  ev | - Output - eigenvalues in increasing order at each data point

Reimplemented in escript::DataTagged, escript::DataExpanded, and escript::DataConstant.

## eigenvalues_and_eigenvectors()

void escript::DataAbstract::eigenvalues_and_eigenvectors | ( | DataAbstract * | ev,
|  | DataAbstract * | V,
|  | const double | tol = `1.e-13`
| ) |  |

virtual

solves the eigenvalue problem this*V=ev*V for the eigenvalues ev and eigenvectors V

Parameters

  ev | - Output - eigenvalues in increasing order at each data point
  V | - Output - corresponding eigenvectors. They are normalized such that their length is one and the first nonzero component is positive.
  tol | - Input - eigenvalue with relative distance tol are treated as equal.

Reimplemented in escript::DataTagged, escript::DataExpanded, and escript::DataConstant.

## getFunctionSpace()

const FunctionSpace & escript::DataAbstract::getFunctionSpace | ( |  | ) | const

inline

Return the function space associated with this Data object.

References m_functionSpace.

Referenced by escript::DataLazy::DataLazy(), escript::DataTagged::DataTagged(), escript::DataConstant::dump(), escript::DataExpanded::dump(), escript::DataTagged::dump(), escript::DataTagged::getPointOffset(), escript::DataTagged::getTagNumber(), operandCheck(), escript::Data::reduction(), escript::DataExpanded::reorderByReferenceIDs(), escript::DataLazy::resolveGroupWorker(), escript::DataLazy::resolveNodeWorker(), escript::DataLazy::resolveNodeWorkerCplx(), escript::DataExpanded::setTaggedValue(), escript::DataExpanded::toString(), escript::DataTagged::toString(), escript::DataConstant::zeroedCopy(), escript::DataExpanded::zeroedCopy(), and escript::DataTagged::zeroedCopy().

## getLength()

virtual DataTypes::RealVectorType::size_type escript::DataAbstract::getLength | ( |  | ) | const

pure virtual

Return the number of doubles stored for this Data object.

Implemented in escript::DataTagged, escript::DataLazy, escript::DataExpanded, escript::DataEmpty, and escript::DataConstant.

## getNoValues()

unsigned int escript::DataAbstract::getNoValues | ( |  | ) | const

inline

Return the number of values in the shape for this object.

References isEmpty(), and m_novalues.

Referenced by escript::DataTagged::addTag(), escript::DataTagged::addTaggedValue(), escript::DataTagged::addTaggedValues(), escript::DataExpanded::copy(), escript::DataConstant::DataConstant(), escript::DataExpanded::DataExpanded(), escript::DataLazy::DataLazy(), escript::DataTagged::DataTagged(), escript::DataExpanded::getPointOffset(), escript::DataExpanded::initialise(), escript::DataExpanded::reorderByReferenceIDs(), escript::DataLazy::resolveGroupWorker(), escript::DataLazy::resolveNodeNP1OUT(), escript::DataLazy::resolveNodeNP1OUT_2P(), escript::DataLazy::resolveNodeNP1OUT_2PCplx(), escript::DataLazy::resolveNodeNP1OUT_P(), escript::DataLazy::resolveNodeNP1OUT_PCplx(), escript::DataLazy::resolveNodeNP1OUTCplx(), escript::DataLazy::resolveNodeTProd(), escript::DataLazy::resolveNodeTProdCplx(), escript::DataLazy::resolveNodeWorker(), escript::DataLazy::resolveNodeWorkerCplx(), escript::DataExpanded::setTaggedValue(), escript::DataTagged::setTaggedValue(), and escript::DataExpanded::setToZero().

## getNumDPPSample()

int escript::DataAbstract::getNumDPPSample | ( |  | ) | const

inline

Return the number of data points per sample.

References isEmpty(), and m_noDataPointsPerSample.

Referenced by escript::DataExpanded::antihermitian(), escript::DataExpanded::antisymmetric(), escript::binaryOpDataReadyHelperECE(), escript::binaryOpDataReadyHelperEEC(), escript::binaryOpDataReadyHelperEEE(), escript::binaryOpDataReadyHelperEET(), escript::binaryOpDataReadyHelperETE(), escript::DataExpanded::copy(), escript::DataExpanded::copyToDataPoint(), escript::DataExpanded::DataExpanded(), escript::DataLazy::DataLazy(), escript::Data::dp_algorithm(), escript::DataExpanded::eigenvalues(), escript::DataExpanded::eigenvalues_and_eigenvectors(), escript::DataTagged::getTagNumber(), escript::DataExpanded::hermitian(), escript::DataExpanded::matrixInverse(), operandCheck(), escript::Data::reduction(), escript::DataExpanded::reorderByReferenceIDs(), escript::DataLazy::resolveNodeNP1OUT(), escript::DataLazy::resolveNodeNP1OUT_2P(), escript::DataLazy::resolveNodeNP1OUT_2PCplx(), escript::DataLazy::resolveNodeNP1OUT_P(), escript::DataLazy::resolveNodeNP1OUT_PCplx(), escript::DataLazy::resolveNodeNP1OUTCplx(), escript::DataLazy::resolveNodeReduction(), escript::DataLazy::resolveNodeTProd(), escript::DataLazy::resolveNodeTProdCplx(), escript::DataExpanded::setTaggedValue(), escript::DataExpanded::setToZero(), escript::DataExpanded::swapaxes(), escript::DataExpanded::symmetric(), escript::DataExpanded::trace(), and escript::DataExpanded::transpose().

## getNumSamples()

int escript::DataAbstract::getNumSamples | ( |  | ) | const

inline

Return the number of samples.

References isEmpty(), and m_noSamples.

Referenced by escript::DataExpanded::antihermitian(), escript::DataExpanded::antisymmetric(), escript::binaryOpDataReadyHelperECE(), escript::binaryOpDataReadyHelperEEC(), escript::binaryOpDataReadyHelperEEE(), escript::binaryOpDataReadyHelperEET(), escript::binaryOpDataReadyHelperETE(), escript::DataExpanded::copy(), escript::DataExpanded::copyToDataPoint(), escript::DataExpanded::DataExpanded(), escript::Data::dp_algorithm(), escript::DataExpanded::dump(), escript::DataExpanded::eigenvalues(), escript::DataExpanded::eigenvalues_and_eigenvectors(), escript::DataTagged::getTagNumber(), escript::DataExpanded::hermitian(), escript::DataExpanded::matrixInverse(), operandCheck(), escript::Data::reduction(), escript::DataExpanded::reorderByReferenceIDs(), escript::DataLazy::resolveNodeWorker(), escript::DataLazy::resolveNodeWorkerCplx(), escript::DataExpanded::setTaggedValue(), escript::DataExpanded::setToZero(), escript::DataExpanded::swapaxes(), escript::DataExpanded::symmetric(), escript::DataExpanded::trace(), and escript::DataExpanded::transpose().

## getPointOffset()

virtual DataTypes::RealVectorType::size_type escript::DataAbstract::getPointOffset | ( | int | sampleNo,
|  | int | dataPointNo
| ) |  | const

pure virtual

Return the offset for the given sample. This returns the offset for the given point into the container holding the point data.

Parameters

  sampleNo | - Input - sample number.
  dataPointNo | - Input - data point number.

Implemented in escript::DataTagged, escript::DataLazy, escript::DataExpanded, escript::DataEmpty, and escript::DataConstant.

Referenced by escript::DataExpanded::antihermitian(), escript::DataExpanded::antisymmetric(), escript::DataExpanded::eigenvalues(), escript::DataExpanded::eigenvalues_and_eigenvectors(), escript::DataReady::getSampleDataRO(), escript::DataReady::getSampleDataRW(), escript::DataExpanded::hermitian(), escript::DataExpanded::swapaxes(), escript::DataExpanded::symmetric(), escript::DataExpanded::trace(), and escript::DataExpanded::transpose().

## getPtr() [1/2]

DataAbstract_ptr escript::DataAbstract::getPtr | ( |  | ) |

Return shared pointer managing this object.

If there is not already a shared pointer managing this object then create one. Once a shared pointer is created for an object, the deallocation of the object must be handled by shared_ptr.

Warning
  So, do not call this on an automatic object. Do not call this in a method where you do not pass the shared_pointer out and you need the object to outlast the method.

Note: This is not equivalent to weak_ptr::lock.

Referenced by escript::Data::expand(), escript::DataReady::resolve(), escript::DataLazy::resolveGroupWorker(), and escript::Data::setToZero().

## getPtr() [2/2]

const_DataAbstract_ptr escript::DataAbstract::getPtr | ( |  | ) | const

## getRank()

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

inline

Return the rank information for the point data.

References isEmpty(), and m_rank.

Referenced by escript::binaryOpDataReadyHelperCCC(), escript::binaryOpDataReadyHelperECE(), escript::binaryOpDataReadyHelperEEC(), escript::binaryOpDataReadyHelperEEE(), escript::binaryOpDataReadyHelperEET(), escript::binaryOpDataReadyHelperETE(), escript::binaryOpDataReadyHelperTCT(), escript::binaryOpDataReadyHelperTTC(), escript::binaryOpDataReadyHelperTTT(), escript::DataExpanded::copyToDataPoint(), escript::DataConstant::dump(), escript::DataExpanded::dump(), escript::DataTagged::dump(), escript::DataConstant::matrixInverse(), escript::DataExpanded::matrixInverse(), escript::DataTagged::matrixInverse(), operandCheck(), escript::DataTagged::setSlice(), escript::DataConstant::setSlice(), and escript::DataExpanded::setSlice().

## getSampleDataByTag() [1/2]

DataTypes::cplx_t * escript::DataAbstract::getSampleDataByTag | ( | int | tag,
|  | DataTypes::cplx_t | dummy
| ) |  |

virtual

Return the complex sample data for the given tag key. NB: If the data isn't tagged an exception will be thrown.

Reimplemented in escript::DataTagged.

## getSampleDataByTag() [2/2]

DataTypes::real_t * escript::DataAbstract::getSampleDataByTag | ( | int | tag,
|  | DataTypes::real_t | dummy = `0`
| ) |  |

virtual

Return the real sample data for the given tag key. NB: If the data isn't tagged an exception will be thrown.

Reimplemented in escript::DataTagged.

## getShape()

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

inline

Return the shape information for the point data.

The omission of a non-constant form is deliberate.

References isEmpty(), and m_shape.

Referenced by escript::DataTagged::addTaggedValue(), escript::DataConstant::antihermitian(), escript::DataExpanded::antihermitian(), escript::DataTagged::antihermitian(), escript::DataConstant::antisymmetric(), escript::DataExpanded::antisymmetric(), escript::DataTagged::antisymmetric(), escript::binaryOpDataReadyHelperCCC(), escript::binaryOpDataReadyHelperECE(), escript::binaryOpDataReadyHelperEEC(), escript::binaryOpDataReadyHelperEEE(), escript::binaryOpDataReadyHelperEET(), escript::binaryOpDataReadyHelperETE(), escript::binaryOpDataReadyHelperTCT(), escript::binaryOpDataReadyHelperTTC(), escript::binaryOpDataReadyHelperTTT(), escript::DataExpanded::copy(), escript::DataExpanded::copyToDataPoint(), escript::DataConstant::DataConstant(), escript::DataExpanded::DataExpanded(), escript::DataTagged::DataTagged(), escript::Data::dp_algorithm(), escript::DataConstant::dump(), escript::DataExpanded::dump(), escript::DataTagged::dump(), escript::DataConstant::eigenvalues(), escript::DataExpanded::eigenvalues(), escript::DataTagged::eigenvalues(), escript::DataConstant::eigenvalues_and_eigenvectors(), escript::DataExpanded::eigenvalues_and_eigenvectors(), escript::DataTagged::eigenvalues_and_eigenvectors(), escript::DataConstant::hermitian(), escript::DataExpanded::hermitian(), escript::DataTagged::hermitian(), escript::DataConstant::matrixInverse(), escript::DataExpanded::matrixInverse(), escript::DataTagged::matrixInverse(), operandCheck(), escript::Data::reduction(), escript::DataLazy::resolveGroupWorker(), escript::DataLazy::resolveNodeNP1OUT(), escript::DataLazy::resolveNodeNP1OUT_2P(), escript::DataLazy::resolveNodeNP1OUT_2PCplx(), escript::DataLazy::resolveNodeNP1OUT_P(), escript::DataLazy::resolveNodeNP1OUT_PCplx(), escript::DataLazy::resolveNodeNP1OUTCplx(), escript::DataLazy::resolveNodeTProd(), escript::DataLazy::resolveNodeTProdCplx(), escript::DataLazy::resolveNodeWorker(), escript::DataLazy::resolveNodeWorkerCplx(), escript::DataTagged::setSlice(), escript::DataConstant::setSlice(), escript::DataExpanded::setSlice(), escript::DataTagged::setTaggedValue(), escript::DataConstant::swapaxes(), escript::DataExpanded::swapaxes(), escript::DataTagged::swapaxes(), escript::DataConstant::symmetric(), escript::DataExpanded::symmetric(), escript::DataTagged::symmetric(), escript::DataConstant::toString(), escript::DataExpanded::toString(), escript::DataTagged::toString(), escript::DataConstant::trace(), escript::DataExpanded::trace(), escript::DataTagged::trace(), escript::DataConstant::transpose(), escript::DataExpanded::transpose(), escript::DataTagged::transpose(), escript::DataConstant::zeroedCopy(), escript::DataExpanded::zeroedCopy(), and escript::DataTagged::zeroedCopy().

## getSlice()

virtual DataAbstract* escript::DataAbstract::getSlice | ( | const DataTypes::RegionType & | region | ) | const

pure virtual

Return the given slice from this object.

NB: The caller is responsible for managing the object created.

Implemented in escript::DataTagged, escript::DataLazy, escript::DataExpanded, escript::DataEmpty, and escript::DataConstant.

## getTagCount()

size_t escript::DataAbstract::getTagCount | ( |  | ) | const

virtual

Return number of tagged values stored in the data object.

Warning
  results are only meaningful for DataTagged. All other types return 0. This functionality is only currently used by reducers and should not be exposed to Python without making it more generally applicable

Reimplemented in escript::DataTagged.

## getTagNumber()

int escript::DataAbstract::getTagNumber | ( | int | dpno | ) |

virtual

Return the tag number associated with the given data-point number.

If the object cannot be referenced by tag numbers, an exception will be thrown.

Reimplemented in escript::DataTagged.

## hasNoSamples()

bool escript::DataAbstract::hasNoSamples | ( |  | ) | const

inline

Referenced by escript::binaryOpDataReadyHelperEEC(), and escript::binaryOpDataReadyHelperEEE().

## hermitian()

void escript::DataAbstract::hermitian | ( | DataAbstract * | ev | ) |

virtual

Computes a symmetric matrix (A + A*) / 2.

Parameters

  ev | - Output - an hermitian matrix

Reimplemented in escript::DataTagged, escript::DataExpanded, and escript::DataConstant.

## isComplex()

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

true if the components of datapoints are complex

Referenced by escript::DataTagged::addTag(), escript::DataTagged::addTaggedValue(), escript::DataConstant::antihermitian(), escript::DataExpanded::antihermitian(), escript::DataTagged::antihermitian(), escript::DataConstant::antisymmetric(), escript::DataExpanded::antisymmetric(), escript::DataTagged::antisymmetric(), escript::binaryOpDataCCC(), escript::binaryOpDataECE(), escript::binaryOpDataEEC(), escript::binaryOpDataEEE(), escript::binaryOpDataEET(), escript::binaryOpDataETE(), escript::binaryOpDataTCT(), escript::binaryOpDataTTC(), escript::binaryOpDataTTT(), escript::DataConstant::complicate(), escript::DataExpanded::complicate(), escript::DataTagged::complicate(), escript::DataExpanded::copy(), escript::DataExpanded::copyToDataPoint(), escript::DataConstant::DataConstant(), escript::DataExpanded::DataExpanded(), escript::DataTagged::DataTagged(), escript::DataConstant::eigenvalues(), escript::DataExpanded::eigenvalues(), escript::DataTagged::eigenvalues(), escript::DataExpanded::getPointOffset(), escript::DataConstant::hasInf(), escript::DataExpanded::hasInf(), escript::DataTagged::hasInf(), escript::DataConstant::hasNaN(), escript::DataExpanded::hasNaN(), escript::DataTagged::hasNaN(), escript::DataConstant::hermitian(), escript::DataExpanded::hermitian(), escript::DataTagged::hermitian(), escript::DataLazy::intoString(), escript::DataLazy::intoTreeString(), escript::DataConstant::replaceInf(), escript::DataExpanded::replaceInf(), escript::DataTagged::replaceInf(), escript::DataConstant::replaceNaN(), escript::DataExpanded::replaceNaN(), escript::DataTagged::replaceNaN(), escript::DataLazy::resolveToIdentity(), escript::DataTagged::setSlice(), escript::DataConstant::setSlice(), escript::DataExpanded::setSlice(), escript::DataExpanded::setTaggedValue(), escript::DataTagged::setTaggedValue(), escript::DataConstant::setToZero(), escript::DataExpanded::setToZero(), escript::DataTagged::setToZero(), escript::DataConstant::swapaxes(), escript::DataExpanded::swapaxes(), escript::DataTagged::swapaxes(), escript::DataConstant::symmetric(), escript::DataExpanded::symmetric(), escript::DataTagged::symmetric(), escript::DataConstant::toString(), escript::DataExpanded::toString(), escript::DataTagged::toString(), escript::DataConstant::trace(), escript::DataExpanded::trace(), escript::DataTagged::trace(), escript::DataConstant::transpose(), escript::DataExpanded::transpose(), escript::DataTagged::transpose(), escript::DataConstant::zeroedCopy(), escript::DataExpanded::zeroedCopy(), and escript::DataTagged::zeroedCopy().

## isConstant()

virtual bool escript::DataAbstract::isConstant | ( |  | ) | const

inline virtual

Reimplemented in escript::DataConstant.

## isEmpty()

bool escript::DataAbstract::isEmpty | ( |  | ) | const

inline

References m_isempty.

Referenced by getNoValues(), getNumDPPSample(), getNumSamples(), getRank(), and getShape().

## isExpanded()

virtual bool escript::DataAbstract::isExpanded | ( |  | ) | const

inline virtual

Reimplemented in escript::DataExpanded.

## isLazy()

bool escript::DataAbstract::isLazy | ( |  | ) | const

## isTagged()

virtual bool escript::DataAbstract::isTagged | ( |  | ) | const

inline virtual

Reimplemented in escript::DataTagged.

## matrixInverse()

int escript::DataAbstract::matrixInverse | ( | DataAbstract * | out | ) | const

virtual

invert square matricies

Parameters

  out | - Where to store the results

Returns
  errorcode (0 indicates success)

Reimplemented in escript::DataTagged, escript::DataExpanded, escript::DataEmpty, and escript::DataConstant.

## operandCheck()

void escript::DataAbstract::operandCheck | ( | const DataAbstract & | right | ) | const

Check this and the given RHS operands are compatible. Throws an exception if they aren't.

Parameters

  right | - Input - The right hand side.

References getFunctionSpace(), getNumDPPSample(), getNumSamples(), getRank(), getShape(), escript::DataTypes::shapeToString(), and escript::FunctionSpace::toString().

## reorderByReferenceIDs()

void escript::DataAbstract::reorderByReferenceIDs | ( | DataTypes::dim_t * | reference_ids | ) |

virtual

reorders data sample ordered by reference_ids to the ordering of the functions space

Parameters

  reference_ids | - Input - reference_ids used for current ordering

Reimplemented in escript::DataExpanded.

Referenced by escript::load().

## resolve()

virtual DataReady_ptr escript::DataAbstract::resolve | ( |  | ) |

pure virtual

Return a data object with all points resolved.

Implemented in escript::DataReady, and escript::DataLazy.

## setTaggedValue() [1/2]

void escript::DataAbstract::setTaggedValue | ( | int | tagKey,
|  | const DataTypes::ShapeType & | pointshape,
|  | const DataTypes::CplxVectorType & | value,
|  | int | dataOffset = `0`
| ) |  |

virtual

Reimplemented in escript::DataTagged, and escript::DataExpanded.

## setTaggedValue() [2/2]

void escript::DataAbstract::setTaggedValue | ( | int | tagKey,
|  | const DataTypes::ShapeType & | pointshape,
|  | const DataTypes::RealVectorType & | value,
|  | int | dataOffset = `0`
| ) |  |

virtual

setTaggedValue

Description: Assign the given value to the given tag.

NB: If the data isn't tagged an exception will be thrown.

Parameters

  tagKey | - Input - Integer key.
  pointshape | - Input - the shape of the value parameter.
  value | - Input - vector to copy data value from
  dataOffset | - Input - Offset within value to begin copying from

The final parameter is to allow for the case whete the vector contains multiple data values.

Reimplemented in escript::DataTagged, and escript::DataExpanded.

## setToZero()

void escript::DataAbstract::setToZero | ( |  | ) |

virtual

sets values to zero

Reimplemented in escript::DataTagged, escript::DataLazy, escript::DataExpanded, and escript::DataConstant.

## swapaxes()

void escript::DataAbstract::swapaxes | ( | DataAbstract * | ev,
|  | int | axis0,
|  | int | axis1
| ) |  |

virtual

swaps components axis0 and axis1

Parameters

  ev | - Output - swapped components
  axis0 |
  axis1 |

Reimplemented in escript::DataTagged, escript::DataExpanded, and escript::DataConstant.

## symmetric()

void escript::DataAbstract::symmetric | ( | DataAbstract * | ev | ) |

virtual

Computes a symmetric matrix (A + AT) / 2.

Parameters

  ev | - Output - a symmetric matrix

Reimplemented in escript::DataTagged, escript::DataExpanded, and escript::DataConstant.

## toString()

virtual std::string escript::DataAbstract::toString | ( |  | ) | const

pure virtual

Write the data as a string.

Implemented in escript::DataTagged, escript::DataLazy, escript::DataExpanded, escript::DataEmpty, and escript::DataConstant.

## trace()

void escript::DataAbstract::trace | ( | DataAbstract * | ev,
|  | int | axis_offset
| ) |  |

virtual

Computes the trace of a matrix.

Parameters

  ev | - Output - the trace of a matrix
  axis_offset |

Reimplemented in escript::DataTagged, escript::DataExpanded, and escript::DataConstant.

## transpose()

void escript::DataAbstract::transpose | ( | DataAbstract * | ev,
|  | int | axis_offset
| ) |  |

virtual

Transpose each data point of this Data object around the given axis.

Parameters

  ev | - Output - the transpose of a matrix
  axis_offset |

Reimplemented in escript::DataTagged, escript::DataExpanded, and escript::DataConstant.

Referenced by escript::DataLazy::DataLazy().

## validSampleNo()

bool escript::DataAbstract::validSampleNo | ( | int | sampleNo | ) | const

inline

Return true if a valid sample number.

References m_noSamples.

## validSamplePointNo()

bool escript::DataAbstract::validSamplePointNo | ( | int | samplePointNo | ) | const

inline

Return true if a valid sample point number.

References m_noDataPointsPerSample.

## zeroedCopy()

virtual DataAbstract* escript::DataAbstract::zeroedCopy | ( |  | ) | const

pure virtual

Return an object with the same type, domain (and tags if appropriate) as this, but all values are zeroed.

Implemented in escript::DataTagged, escript::DataLazy, escript::DataExpanded, escript::DataEmpty, and escript::DataConstant.

## Friends And Related Function Documentation

## DataLazy

friend class DataLazy

friend

Referenced by escript::DataLazy::DataLazy(), escript::DataLazy::deepCopy(), and escript::DataLazy::zeroedCopy().

## Member Data Documentation

## m_functionSpace

FunctionSpace escript::DataAbstract::m_functionSpace

private

Referenced by getFunctionSpace().

## m_iscompl

bool escript::DataAbstract::m_iscompl

protected

Referenced by escript::DataConstant::complicate(), escript::DataExpanded::complicate(), escript::DataTagged::complicate(), escript::DataConstant::DataConstant(), escript::DataExpanded::DataExpanded(), escript::DataLazy::DataLazy(), escript::DataTagged::DataTagged(), escript::DataExpanded::initialise(), and escript::DataLazy::makeIdentity().

## m_isempty

bool escript::DataAbstract::m_isempty

private

Referenced by DataAbstract(), and isEmpty().

## m_noDataPointsPerSample

int escript::DataAbstract::m_noDataPointsPerSample

protected

Referenced by escript::DataExpanded::copy(), escript::DataExpanded::DataExpanded(), getNumDPPSample(), escript::DataExpanded::getPointOffset(), escript::DataExpanded::setSlice(), escript::DataExpanded::toString(), and validSamplePointNo().

## m_noSamples

int escript::DataAbstract::m_noSamples

protected

Referenced by escript::DataExpanded::copy(), escript::DataExpanded::DataExpanded(), getNumSamples(), escript::DataExpanded::setSlice(), escript::DataExpanded::toString(), and validSampleNo().

## m_novalues

unsigned int escript::DataAbstract::m_novalues

private

Referenced by getNoValues().

## m_rank

unsigned int escript::DataAbstract::m_rank

private

Referenced by DataAbstract(), getRank(), and escript::DataLazy::intoTreeString().

## m_shape

DataTypes::ShapeType escript::DataAbstract::m_shape

private

Referenced by getShape().

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

- DataAbstract.h
- DataAbstract.cpp