escript::DataExpanded Class Reference

Give a short description of what DataExpanded does. More...

`#include <DataExpanded.h>`

Inheritance diagram for escript::DataExpanded:

## Public Member Functions

| DataExpanded (const WrappedArray &value, const FunctionSpace &what)
| Constructor for DataExpanded. More...
| DataExpanded (const DataExpanded &other, const DataTypes::RegionType &region)
| Alternative constructor for DataExpanded that copies a slice from another DataExpanded. More...
| DataExpanded (const FunctionSpace &what, const DataTypes::ShapeType &shape, const DataTypes::RealVectorType &data)
| Alternative constructor for DataExpanded objects. More...
| DataExpanded (const FunctionSpace &what, const DataTypes::ShapeType &shape, const DataTypes::CplxVectorType &data)
| DataExpanded (const FunctionSpace &what, const DataTypes::ShapeType &shape, const DataTypes::real_t data)
| DataExpanded (const FunctionSpace &what, const DataTypes::ShapeType &shape, const DataTypes::cplx_t data)
| DataExpanded (const DataExpanded &other)
| Copy constructor for DataExpanded. Performs a deep copy from another DataExpanded. More...
| DataExpanded (const DataConstant &other)
| Copy constructor for DataExpanded. Construct a DataExpanded from a DataConstant. More...
| DataExpanded (const DataTagged &other)
| Copy constructor for DataExpanded. Construct a DataExpanded from a DataTagged. More...
virtual | ~DataExpanded ()
| Default destructor for DataExpanded. More...
bool | isExpanded () const
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...
bool | hasNaN () const
| Return true if any value in the data contains a NaN. More...
void | replaceNaN (DataTypes::real_t value)
| replaces all NaN values with value More...
void | replaceNaN (DataTypes::cplx_t value)
| replaces all NaN values with value More...
virtual std::string | toString () const
| Return a textual representation of the data. More...
virtual DataAbstract * | deepCopy () const
| Return a deep copy of the current object. More...
virtual DataAbstract * | zeroedCopy () const
| Return an object with the same type, domain (and tags if appropriate) as this, but all values are zeroed. More...
virtual void | dump (const std::string fileName) const
| dumps the object into a netCDF file More...
virtual int | matrixInverse (DataAbstract *out) const
| invert square matricies More...
virtual void | setToZero ()
| sets all values to zero More...
virtual DataTypes::RealVectorType::size_type | getPointOffset (int sampleNo, int dataPointNo) const
| Return the offset for the given given data point. This returns the offset in bytes for the given point into the container holding the point data. More...
DataTypes::RealVectorType & | getVectorRW ()
| Return a a reference to the underlying DataVector. More...
const DataTypes::RealVectorType & | getVectorRO () const
DataTypes::CplxVectorType & | getVectorRWC ()
const DataTypes::CplxVectorType & | getVectorROC () const
virtual DataTypes::RealVectorType & | getTypedVectorRW (DataTypes::real_t dummy)
| These versions use the type system rather than method name to determine return type. More...
virtual const DataTypes::RealVectorType & | getTypedVectorRO (DataTypes::real_t dummy) const
virtual DataTypes::CplxVectorType & | getTypedVectorRW (DataTypes::cplx_t dummy)
virtual const DataTypes::CplxVectorType & | getTypedVectorRO (DataTypes::cplx_t dummy) const
virtual DataTypes::RealVectorType::size_type | getLength () const
| Return the number of doubles stored for the Data. More...
virtual DataAbstract * | getSlice (const DataTypes::RegionType &region) const
| Factory method that returns a newly created DataExpanded. The caller is reponsible for managing the object created. More...
virtual void | setSlice (const DataAbstract *value, const DataTypes::RegionType &region)
| Copy the specified region from the given value. More...
void | setTaggedValue (int tagKey, const DataTypes::ShapeType &pointshape, const DataTypes::RealVectorType &value, int dataOffset=0)
| setTaggedValue More...
void | setTaggedValue (int tagKey, const DataTypes::ShapeType &pointshape, const DataTypes::CplxVectorType &value, int dataOffset=0)
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 an hermitian matrix (A + A*) / 2. More...
virtual void | antihermitian (DataAbstract *ev)
| Computes an antihermitian 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 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...
void | complicate ()
Public Member Functions inherited from escript::DataReady
| DataReady (const FunctionSpace &what, const ShapeType &shape, bool isDataEmpty=false)
| ~DataReady ()
DataTypes::real_t * | getSampleDataRW (DataTypes::RealVectorType::size_type sampleNo, DataTypes::real_t dummy=0)
| Return the sample data for the given sample number. More...
DataTypes::cplx_t * | getSampleDataRW (DataTypes::RealVectorType::size_type sampleNo, DataTypes::cplx_t dummy)
const DataTypes::real_t * | getSampleDataRO (DataTypes::RealVectorType::size_type sampleNo, DataTypes::real_t dummy=0) const
const DataTypes::cplx_t * | getSampleDataRO (DataTypes::RealVectorType::size_type sampleNo, DataTypes::cplx_t dummy) const
DataTypes::RealVectorType::const_reference | getDataAtOffsetRO (DataTypes::RealVectorType::size_type i) const
| get a reference to the beginning of a data point More...
DataTypes::RealVectorType::reference | getDataAtOffsetRW (DataTypes::RealVectorType::size_type i)
DataTypes::CplxVectorType::const_reference | getDataAtOffsetROC (DataTypes::CplxVectorType::size_type i) const
DataTypes::CplxVectorType::reference | getDataAtOffsetRWC (DataTypes::CplxVectorType::size_type i)
DataReady_ptr | resolve ()
| Return a data object with all points resolved. More...
Public Member Functions inherited from escript::DataAbstract
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...
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::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 int | getTagNumber (int dpno)
| Return the tag number associated with the given data-point number. 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 | isTagged () const
bool | isEmpty () const
bool | isComplex () const
| true if the components of datapoints are complex More...

## Private Types

typedef DataReady | parent

## Private Member Functions

void | initialise (int noSamples, int noDataPointsPerSample, bool cplx)
| Common initialisation called from constructors. More...
void | copy (const DataConstant &value)
| Copy the given data point value to all data points in this object. More...
void | copy (const WrappedArray &value)
| Copy the given data point value to all data points in this object. More...
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 value to the data point dataPointNo of sample sampleNo in this object. More...

## Private Attributes

DataTypes::RealVectorType | m_data_r
DataTypes::CplxVectorType | m_data_c

## Additional Inherited Members

Public Types inherited from escript::DataAbstract
typedef DataTypes::ShapeType | ShapeType
Protected Attributes inherited from escript::DataAbstract
int | m_noSamples
int | m_noDataPointsPerSample
bool | m_iscompl

## Detailed Description

Give a short description of what DataExpanded does.

Description: Give a detailed description of DataExpanded.

Template Parameters: For templates describe any conditions that the parameters used in the template must satisfy.

## Member Typedef Documentation

## parent

typedef DataReady escript::DataExpanded::parent

private

## Constructor & Destructor Documentation

## DataExpanded() [1/9]

escript::DataExpanded::DataExpanded | ( | const WrappedArray & | value,
|  | const FunctionSpace & | what
| ) |  |

explicit

Constructor for DataExpanded.

Description: Constructor for DataExpanded.

The given single data value is copied to all the data points in this data object, where the number of data points is defined by the given function space.

Parameters

  value | - Input - The value of a single data point.
  what | - Input - A description of what this data represents.

References copy(), escript::FunctionSpace::getNumDPPSample(), escript::FunctionSpace::getNumSamples(), initialise(), and escript::WrappedArray::isComplex().

Referenced by deepCopy(), getSlice(), and zeroedCopy().

## DataExpanded() [2/9]

escript::DataExpanded::DataExpanded | ( | const DataExpanded & | other,
|  | const DataTypes::RegionType & | region
| ) |  |

explicit

Alternative constructor for DataExpanded that copies a slice from another DataExpanded.

Parameters

  other | - Input - DataExpanded object to slice from.
  region | - Input - region to copy.

References escript::DataTypes::copySlice(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), getPointOffset(), escript::DataAbstract::getShape(), escript::DataTypes::getSliceRegionLoopRange(), getTypedVectorRO(), getTypedVectorRW(), initialise(), escript::DataAbstract::isComplex(), escript::DataAbstract::m_noDataPointsPerSample, and escript::DataAbstract::m_noSamples.

## DataExpanded() [3/9]

escript::DataExpanded::DataExpanded | ( | const FunctionSpace & | what,
|  | const DataTypes::ShapeType & | shape,
|  | const DataTypes::RealVectorType & | data
| ) |  |

explicit

Alternative constructor for DataExpanded objects.

Description: Alternative Constructor for DataExpanded objects.

Parameters

  what | - Input - A description of what this data object represents.
  shape | - Input - the shape of each data-point.
  data | - the array of data values for the data-points.

TODO Note that this constructor will also copy data to all points if it only contains enough elements to hold a single point. ie this is the merge of two separate constructors.

References ESYS_ASSERT, getLength(), escript::DataAbstract::getNoValues(), escript::FunctionSpace::getNumDPPSample(), escript::FunctionSpace::getNumSamples(), initialise(), m_data_r, and escript::DataTypes::DataVectorAlt< T >::size().

## DataExpanded() [4/9]

escript::DataExpanded::DataExpanded | ( | const FunctionSpace & | what,
|  | const DataTypes::ShapeType & | shape,
|  | const DataTypes::CplxVectorType & | data
| ) |  |

explicit

References ESYS_ASSERT, getLength(), escript::DataAbstract::getNoValues(), escript::FunctionSpace::getNumDPPSample(), escript::FunctionSpace::getNumSamples(), initialise(), m_data_c, and escript::DataTypes::DataVectorAlt< T >::size().

## DataExpanded() [5/9]

escript::DataExpanded::DataExpanded | ( | const FunctionSpace & | what,
|  | const DataTypes::ShapeType & | shape,
|  | const DataTypes::real_t | data
| ) |  |

explicit

References getLength(), escript::FunctionSpace::getNumDPPSample(), escript::FunctionSpace::getNumSamples(), initialise(), and m_data_r.

## DataExpanded() [6/9]

escript::DataExpanded::DataExpanded | ( | const FunctionSpace & | what,
|  | const DataTypes::ShapeType & | shape,
|  | const DataTypes::cplx_t | data
| ) |  |

explicit

References getLength(), escript::FunctionSpace::getNumDPPSample(), escript::FunctionSpace::getNumSamples(), initialise(), and m_data_c.

## DataExpanded() [7/9]

escript::DataExpanded::DataExpanded | ( | const DataExpanded & | other | ) |

Copy constructor for DataExpanded. Performs a deep copy from another DataExpanded.

References escript::DataAbstract::m_iscompl.

## DataExpanded() [8/9]

escript::DataExpanded::DataExpanded | ( | const DataConstant & | other | ) |

explicit

Copy constructor for DataExpanded. Construct a DataExpanded from a DataConstant.

References copy(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), initialise(), and escript::DataAbstract::isComplex().

## DataExpanded() [9/9]

escript::DataExpanded::DataExpanded | ( | const DataTagged & | other | ) |

explicit

Copy constructor for DataExpanded. Construct a DataExpanded from a DataTagged.

References escript::DataTypes::copyPoint(), escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), getPointOffset(), escript::DataTagged::getPointOffset(), escript::DataTagged::getTypedVectorRO(), getTypedVectorRW(), initialise(), escript::DataAbstract::isComplex(), escript::DataAbstract::m_noDataPointsPerSample, and escript::DataAbstract::m_noSamples.

## ~DataExpanded()

escript::DataExpanded::~DataExpanded | ( |  | ) |

virtual

Default destructor for DataExpanded.

## Member Function Documentation

## actsExpanded()

bool escript::DataExpanded::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 from escript::DataAbstract.

References antihermitian(), antisymmetric(), complicate(), copy(), copyToDataPoint(), deepCopy(), dump(), eigenvalues(), eigenvalues_and_eigenvectors(), ESCRIPT_DLL_API, getLength(), getPointOffset(), getSlice(), getTypedVectorRO(), getTypedVectorRW(), getVectorRO(), getVectorROC(), getVectorRW(), getVectorRWC(), hasNaN(), hermitian(), initialise(), matrixInverse(), reorderByReferenceIDs(), replaceNaN(), setSlice(), setTaggedValue(), setToZero(), swapaxes(), symmetric(), toString(), trace(), transpose(), V, and zeroedCopy().

## antihermitian()

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

virtual

Computes an antihermitian matrix (A - A*) / 2.

Parameters

  ev | - Output - antihermitian matrix

Reimplemented from escript::DataAbstract.

References escript::antihermitian(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), escript::DataAbstract::getPointOffset(), getPointOffset(), escript::DataAbstract::getShape(), getTypedVectorRO(), getTypedVectorRW(), and escript::DataAbstract::isComplex().

Referenced by actsExpanded().

## antisymmetric()

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

virtual

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

Parameters

  ev | - Output - nonsymmetric matrix

Reimplemented from escript::DataAbstract.

References escript::antisymmetric(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), escript::DataAbstract::getPointOffset(), getPointOffset(), escript::DataAbstract::getShape(), getTypedVectorRO(), getTypedVectorRW(), and escript::DataAbstract::isComplex().

Referenced by actsExpanded().

## complicate()

void escript::DataExpanded::complicate | ( |  | ) |

virtual

Reimplemented from escript::DataAbstract.

References escript::DataTypes::fillComplexFromReal(), escript::DataAbstract::isComplex(), m_data_c, m_data_r, escript::DataAbstract::m_iscompl, and escript::DataTypes::DataVectorAlt< T >::resize().

Referenced by actsExpanded(), and replaceNaN().

## copy() [1/2]

void escript::DataExpanded::copy | ( | const DataConstant & | value | ) |

private

Copy the given data point value to all data points in this object.

Description: Copy the given data point to all data points in this object.

Parameters

  value | Input - A single data point value.

References escript::DataTypes::checkShape(), escript::DataTypes::copyPoint(), escript::DataTypes::createShapeErrorMessage(), ESYS_ASSERT, escript::DataAbstract::getNoValues(), getPointOffset(), escript::DataAbstract::getShape(), escript::DataConstant::getTypedVectorRO(), getTypedVectorRW(), escript::DataAbstract::isComplex(), escript::DataAbstract::m_noDataPointsPerSample, and escript::DataAbstract::m_noSamples.

Referenced by actsExpanded(), and DataExpanded().

## copy() [2/2]

void escript::DataExpanded::copy | ( | const WrappedArray & | value | ) |

private

Copy the given data point value to all data points in this object.

Parameters

  value | Input - A single data point value.

References escript::DataTypes::checkShape(), escript::DataTypes::DataVectorAlt< T >::copyFromArray(), escript::DataTypes::createShapeErrorMessage(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), escript::WrappedArray::getShape(), escript::DataAbstract::getShape(), and getVectorRW().

## copyToDataPoint() [1/3]

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

private 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 from escript::DataAbstract.

References CHECK_FOR_EX_WRITE, escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), getPointOffset(), escript::DataAbstract::getRank(), escript::DataTypes::getRelIndex(), escript::DataAbstract::getShape(), getVectorRW(), and escript::DataAbstract::isComplex().

Referenced by actsExpanded().

## copyToDataPoint() [2/3]

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

private virtual

Reimplemented from escript::DataAbstract.

References CHECK_FOR_EX_WRITE, escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), getPointOffset(), escript::DataAbstract::getRank(), escript::DataTypes::getRelIndex(), escript::DataAbstract::getShape(), getTypedVectorRW(), and escript::DataAbstract::isComplex().

## copyToDataPoint() [3/3]

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

private virtual

Copy the 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 from escript::DataAbstract.

References CHECK_FOR_EX_WRITE, escript::DataTypes::DataVectorAlt< T >::copyFromArrayToOffset(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), getPointOffset(), escript::WrappedArray::getRank(), escript::DataAbstract::getRank(), getTypedVectorRW(), and escript::DataAbstract::isComplex().

## deepCopy()

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

virtual

Return a deep copy of the current object.

Implements escript::DataAbstract.

References DataExpanded().

Referenced by actsExpanded().

## dump()

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

virtual

dumps the object into a netCDF file

Reimplemented from escript::DataAbstract.

References escript::FunctionSpace::borrowSampleReferenceIDs(), escript::DataAbstract::getFunctionSpace(), escript::FunctionSpace::getNumDataPointsPerSample(), escript::DataAbstract::getNumSamples(), escript::FunctionSpace::getNumSamples(), escript::DataAbstract::getRank(), escript::DataAbstract::getShape(), escript::FunctionSpace::getTypeCode(), m_data_r, and escript::DataTypes::maxRank.

Referenced by actsExpanded(), and setToZero().

## eigenvalues()

void escript::DataExpanded::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 from escript::DataAbstract.

References escript::eigenvalues(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), escript::DataAbstract::getPointOffset(), getPointOffset(), escript::DataAbstract::getShape(), getVectorRO(), getVectorROC(), getVectorRW(), getVectorRWC(), and escript::DataAbstract::isComplex().

Referenced by actsExpanded().

## eigenvalues_and_eigenvectors()

void escript::DataExpanded::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 from escript::DataAbstract.

References escript::eigenvalues_and_eigenvectors(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), escript::DataAbstract::getPointOffset(), getPointOffset(), escript::DataAbstract::getShape(), getVectorRO(), getVectorRW(), and V.

Referenced by actsExpanded().

## getLength()

DataTypes::RealVectorType::size_type escript::DataExpanded::getLength | ( |  | ) | const

virtual

Return the number of doubles stored for the Data.

Implements escript::DataAbstract.

References m_data_c, m_data_r, and escript::DataTypes::DataVectorAlt< T >::size().

Referenced by actsExpanded(), and DataExpanded().

## getPointOffset()

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

virtual

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

Parameters

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

Implements escript::DataAbstract.

References ESYS_ASSERT, escript::DataAbstract::getNoValues(), escript::DataAbstract::isComplex(), m_data_c, m_data_r, escript::DataAbstract::m_noDataPointsPerSample, and escript::DataTypes::DataVectorAlt< T >::size().

Referenced by actsExpanded(), antihermitian(), antisymmetric(), escript::Data::bessel(), escript::C_GeneralTensorProduct(), escript::C_TensorUnaryOperation(), copy(), copyToDataPoint(), DataExpanded(), escript::Data::dp_algorithm(), eigenvalues(), eigenvalues_and_eigenvectors(), hermitian(), matrixInverse(), escript::Data::reduction(), reorderByReferenceIDs(), escript::DataLazy::resolveNodeWorker(), escript::DataLazy::resolveNodeWorkerCplx(), setSlice(), setTaggedValue(), setToZero(), swapaxes(), symmetric(), toString(), trace(), and transpose().

## getSlice()

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

virtual

Factory method that returns a newly created DataExpanded. The caller is reponsible for managing the object created.

Parameters

  region | - Input - Region to copy.

Implements escript::DataAbstract.

References DataExpanded().

Referenced by actsExpanded().

## getTypedVectorRO() [1/2]

const DataTypes::RealVectorType & escript::DataExpanded::getTypedVectorRO | ( | DataTypes::real_t | dummy | ) | const

virtual

Implements escript::DataReady.

References m_data_r.

Referenced by actsExpanded(), antihermitian(), antisymmetric(), escript::binaryOpDataReadyHelperECE(), escript::binaryOpDataReadyHelperEEC(), escript::binaryOpDataReadyHelperEEE(), escript::binaryOpDataReadyHelperEET(), escript::binaryOpDataReadyHelperETE(), DataExpanded(), escript::Data::dp_algorithm(), hermitian(), escript::Data::reduction(), symmetric(), and toString().

## getTypedVectorRO() [2/2]

const DataTypes::CplxVectorType & escript::DataExpanded::getTypedVectorRO | ( | DataTypes::cplx_t | dummy | ) | const

virtual

Implements escript::DataReady.

References m_data_c.

## getTypedVectorRW() [1/2]

DataTypes::RealVectorType & escript::DataExpanded::getTypedVectorRW | ( | DataTypes::real_t | dummy | ) |

virtual

These versions use the type system rather than method name to determine return type.

Implements escript::DataReady.

References CHECK_FOR_EX_WRITE, and m_data_r.

Referenced by actsExpanded(), antihermitian(), antisymmetric(), escript::binaryOpDataReadyHelperECE(), escript::binaryOpDataReadyHelperEEC(), escript::binaryOpDataReadyHelperEEE(), escript::binaryOpDataReadyHelperEET(), escript::binaryOpDataReadyHelperETE(), copy(), copyToDataPoint(), DataExpanded(), escript::Data::dp_algorithm(), hermitian(), and symmetric().

## getTypedVectorRW() [2/2]

DataTypes::CplxVectorType & escript::DataExpanded::getTypedVectorRW | ( | DataTypes::cplx_t | dummy | ) |

virtual

Implements escript::DataReady.

References CHECK_FOR_EX_WRITE, and m_data_c.

## getVectorRO()

const DataTypes::RealVectorType & escript::DataExpanded::getVectorRO | ( |  | ) | const

virtual

Implements escript::DataReady.

References m_data_r.

Referenced by actsExpanded(), eigenvalues(), eigenvalues_and_eigenvectors(), setSlice(), swapaxes(), trace(), and transpose().

## getVectorROC()

const DataTypes::CplxVectorType & escript::DataExpanded::getVectorROC | ( |  | ) | const

virtual

Implements escript::DataReady.

References m_data_c.

Referenced by actsExpanded(), eigenvalues(), setSlice(), swapaxes(), trace(), and transpose().

## getVectorRW()

DataTypes::RealVectorType & escript::DataExpanded::getVectorRW | ( |  | ) |

virtual

Return a a reference to the underlying DataVector.

Implements escript::DataReady.

References CHECK_FOR_EX_WRITE, and m_data_r.

Referenced by actsExpanded(), copy(), copyToDataPoint(), eigenvalues(), eigenvalues_and_eigenvectors(), matrixInverse(), escript::DataLazy::resolveNodeWorker(), setSlice(), swapaxes(), trace(), and transpose().

## getVectorRWC()

DataTypes::CplxVectorType & escript::DataExpanded::getVectorRWC | ( |  | ) |

virtual

Implements escript::DataReady.

References CHECK_FOR_EX_WRITE, and m_data_c.

Referenced by actsExpanded(), eigenvalues(), escript::DataLazy::resolveNodeWorkerCplx(), setSlice(), swapaxes(), trace(), and transpose().

## hasNaN()

bool escript::DataExpanded::hasNaN | ( |  | ) | const

virtual

Return true if any value in the data contains a NaN.

Implements escript::DataReady.

References escript::DataAbstract::isComplex(), m_data_c, m_data_r, and escript::DataTypes::DataVectorAlt< T >::size().

Referenced by actsExpanded().

## hermitian()

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

virtual

Computes an hermitian matrix (A + A*) / 2.

Parameters

  ev | - Output - hermitian matrix

Reimplemented from escript::DataAbstract.

References escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), escript::DataAbstract::getPointOffset(), getPointOffset(), escript::DataAbstract::getShape(), getTypedVectorRO(), getTypedVectorRW(), escript::hermitian(), and escript::DataAbstract::isComplex().

Referenced by actsExpanded().

## initialise()

void escript::DataExpanded::initialise | ( | int | noSamples,
|  | int | noDataPointsPerSample,
|  | bool | cplx
| ) |  |

private

Common initialisation called from constructors.

Description: Common initialisation called from constructors.

Resizes the underlying data array to provide sufficient storage for the given shape and number of data points, and creates the corresponding DataArrayView of this data.

Parameters

  noSamples | - Input - number of samples.
  noDataPointsPerSample | - Input - number of data points per sample.
  cplx | - Input - is this data complex?

References escript::DataAbstract::getNoValues(), m_data_c, m_data_r, escript::DataAbstract::m_iscompl, and escript::DataTypes::DataVectorAlt< T >::resize().

Referenced by actsExpanded(), and DataExpanded().

## isExpanded()

bool escript::DataExpanded::isExpanded | ( |  | ) | const

inline virtual

Reimplemented from escript::DataAbstract.

References ESCRIPT_DLL_API.

## matrixInverse()

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

virtual

invert square matricies

Parameters

  out | - Where to store the results

Returns
  errorcode (0 indicates success)

Reimplemented from escript::DataAbstract.

References escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), getPointOffset(), escript::DataAbstract::getRank(), escript::DataAbstract::getShape(), getVectorRW(), m_data_r, and escript::matrix_inverse().

Referenced by actsExpanded().

## reorderByReferenceIDs()

void escript::DataExpanded::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 from escript::DataAbstract.

References CHECK_FOR_EX_WRITE, escript::DataAbstract::getFunctionSpace(), escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), getPointOffset(), escript::FunctionSpace::getReferenceIDOfSample(), and m_data_r.

Referenced by actsExpanded().

## replaceNaN() [1/2]

void escript::DataExpanded::replaceNaN | ( | DataTypes::real_t | value | ) |

virtual

replaces all NaN values with value

Implements escript::DataReady.

References CHECK_FOR_EX_WRITE, escript::DataAbstract::isComplex(), m_data_c, m_data_r, and escript::DataTypes::DataVectorAlt< T >::size().

Referenced by actsExpanded(), and replaceNaN().

## replaceNaN() [2/2]

void escript::DataExpanded::replaceNaN | ( | DataTypes::cplx_t | value | ) |

virtual

replaces all NaN values with value

Implements escript::DataReady.

References CHECK_FOR_EX_WRITE, complicate(), escript::DataAbstract::isComplex(), m_data_c, replaceNaN(), and escript::DataTypes::DataVectorAlt< T >::size().

## setSlice()

void escript::DataExpanded::setSlice | ( | const DataAbstract * | value,
|  | const DataTypes::RegionType & | region
| ) |  |

virtual

Copy the specified region from the given value.

Parameters

  value | - Input - Data object to copy from.
  region | - Input - Region to copy.

Implements escript::DataReady.

References CHECK_FOR_EX_WRITE, escript::DataTypes::checkShape(), escript::DataTypes::copySliceFrom(), escript::DataTypes::createShapeErrorMessage(), getPointOffset(), escript::DataAbstract::getRank(), escript::DataTypes::getResultSliceShape(), escript::DataAbstract::getShape(), escript::DataTypes::getSliceRegionLoopRange(), getVectorRO(), getVectorROC(), getVectorRW(), getVectorRWC(), escript::DataAbstract::isComplex(), escript::DataAbstract::m_noDataPointsPerSample, and escript::DataAbstract::m_noSamples.

Referenced by actsExpanded().

## setTaggedValue() [1/2]

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

virtual

setTaggedValue

Description: uses tag to set a new value

Parameters

  tagKey | - Input - Integer key.
  pointshape | - Input - The shape of the value parameter
  value | - Input -
  dataOffset | - Input - where in the value parameter to start reading the data point value.

Reimplemented from escript::DataAbstract.

References CHECK_FOR_EX_WRITE, escript::DataTypes::fillComplexFromReal(), escript::DataAbstract::getFunctionSpace(), escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), getPointOffset(), escript::FunctionSpace::getTagFromSampleNo(), escript::DataAbstract::isComplex(), m_data_r, and escript::DataTypes::DataVectorAlt< T >::size().

Referenced by actsExpanded().

## setTaggedValue() [2/2]

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

virtual

Reimplemented from escript::DataAbstract.

References CHECK_FOR_EX_WRITE, escript::DataAbstract::getFunctionSpace(), escript::DataAbstract::getNoValues(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), getPointOffset(), escript::FunctionSpace::getTagFromSampleNo(), escript::DataAbstract::isComplex(), m_data_c, and escript::DataTypes::DataVectorAlt< T >::size().

## setToZero()

void escript::DataExpanded::setToZero | ( |  | ) |

virtual

sets all values to zero

Reimplemented from escript::DataAbstract.

References escript::FunctionSpace::borrowSampleReferenceIDs(), CHECK_FOR_EX_WRITE, dump(), escript::DataAbstract::getFunctionSpace(), escript::DataAbstract::getNoValues(), escript::FunctionSpace::getNumDataPointsPerSample(), escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), escript::FunctionSpace::getNumSamples(), getPointOffset(), escript::DataAbstract::getRank(), escript::DataAbstract::getShape(), escript::FunctionSpace::getTypeCode(), escript::DataAbstract::isComplex(), m_data_c, m_data_r, and escript::DataTypes::maxRank.

Referenced by actsExpanded().

## swapaxes()

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

virtual

swaps components axis0 and axis1

Parameters

  ev | - Output - swapped components
  axis0 |
  axis1 |

Reimplemented from escript::DataAbstract.

References escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), escript::DataAbstract::getPointOffset(), getPointOffset(), escript::DataAbstract::getShape(), getVectorRO(), getVectorROC(), getVectorRW(), getVectorRWC(), escript::DataAbstract::isComplex(), and escript::swapaxes().

Referenced by actsExpanded().

## symmetric()

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

virtual

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

Parameters

  ev | - Output - symmetric matrix

Reimplemented from escript::DataAbstract.

References escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), escript::DataAbstract::getPointOffset(), getPointOffset(), escript::DataAbstract::getShape(), getTypedVectorRO(), getTypedVectorRW(), escript::DataAbstract::isComplex(), and escript::symmetric().

Referenced by actsExpanded().

## toString()

string escript::DataExpanded::toString | ( |  | ) | const

virtual

Return a textual representation of the data.

Implements escript::DataAbstract.

References escript::DataAbstract::getFunctionSpace(), getPointOffset(), escript::FunctionSpace::getReferenceIDOfSample(), escript::DataAbstract::getShape(), getTypedVectorRO(), escript::DataAbstract::isComplex(), escript::DataAbstract::m_noDataPointsPerSample, escript::DataAbstract::m_noSamples, and escript::DataTypes::pointToString().

Referenced by actsExpanded().

## trace()

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

virtual

Computes the trace of a matrix.

Parameters

  ev | - Output - trace of your matrix
  axis_offset | -

Reimplemented from escript::DataAbstract.

References escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), escript::DataAbstract::getPointOffset(), getPointOffset(), escript::DataAbstract::getShape(), getVectorRO(), getVectorROC(), getVectorRW(), getVectorRWC(), escript::DataAbstract::isComplex(), and escript::trace().

Referenced by actsExpanded().

## transpose()

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

virtual

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

Parameters

  ev | - Output - transpose of your matrix
  axis_offset | -

Reimplemented from escript::DataAbstract.

References escript::DataAbstract::getNumDPPSample(), escript::DataAbstract::getNumSamples(), escript::DataAbstract::getPointOffset(), getPointOffset(), escript::DataAbstract::getShape(), getVectorRO(), getVectorROC(), getVectorRW(), getVectorRWC(), escript::DataAbstract::isComplex(), and escript::transpose().

Referenced by actsExpanded().

## zeroedCopy()

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

virtual

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

Implements escript::DataAbstract.

References DataExpanded(), escript::DataAbstract::getFunctionSpace(), escript::DataAbstract::getShape(), and escript::DataAbstract::isComplex().

Referenced by actsExpanded().

## Member Data Documentation

## m_data_c

DataTypes::CplxVectorType escript::DataExpanded::m_data_c

private

Referenced by complicate(), DataExpanded(), getLength(), getPointOffset(), getTypedVectorRO(), getTypedVectorRW(), getVectorROC(), getVectorRWC(), hasNaN(), initialise(), replaceNaN(), setTaggedValue(), and setToZero().

## m_data_r

DataTypes::RealVectorType escript::DataExpanded::m_data_r

private

Referenced by complicate(), DataExpanded(), dump(), getLength(), getPointOffset(), getTypedVectorRO(), getTypedVectorRW(), getVectorRO(), getVectorRW(), hasNaN(), initialise(), matrixInverse(), reorderByReferenceIDs(), replaceNaN(), setTaggedValue(), and setToZero().

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

- DataExpanded.h
- DataExpanded.cpp