escript::DataReady Class Referenceabstract

`#include <DataReady.h>`

Inheritance diagram for escript::DataReady:

## Public Member Functions

| 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
virtual DataTypes::RealVectorType & | getVectorRW ()=0
| Provide access to underlying storage. Internal use only! More...
virtual const DataTypes::RealVectorType & | getVectorRO () const =0
virtual DataTypes::CplxVectorType & | getVectorRWC ()=0
virtual const DataTypes::CplxVectorType & | getVectorROC () const =0
virtual DataTypes::RealVectorType & | getTypedVectorRW (DataTypes::real_t dummy)=0
| 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 =0
virtual DataTypes::CplxVectorType & | getTypedVectorRW (DataTypes::cplx_t dummy)=0
virtual const DataTypes::CplxVectorType & | getTypedVectorRO (DataTypes::cplx_t dummy) const =0
virtual bool | hasNaN () const =0
| return true if data contains NaN. More...
virtual void | replaceNaN (DataTypes::real_t value)=0
| replaces all NaN values with value More...
virtual void | replaceNaN (DataTypes::cplx_t value)=0
| replaces all NaN values with value More...
virtual bool | hasInf () const =0
| Return true if data contains Inf or -Inf. More...
virtual void | replaceInf (DataTypes::real_t value)=0
| replaces all (+/-)Inf values with value More...
virtual void | replaceInf (DataTypes::cplx_t value)=0
| replaces all (+/-)Inf values with value More...
virtual void | setSlice (const DataAbstract *value, const DataTypes::RegionType &region)=0
| Copy the specified region from the given object. More...
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...
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 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 ()

## Private Types

typedef DataAbstract | parent

## 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

Base class for Data which do not need to be resolved. Internally this means they have getVectorRO and getVectorRW methods.

## Member Typedef Documentation

## parent

typedef DataAbstract escript::DataReady::parent

private

## Constructor & Destructor Documentation

## DataReady()

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

## ~DataReady()

escript::DataReady::~DataReady | ( |  | ) |

inline

## Member Function Documentation

## getDataAtOffsetRO()

DataTypes::RealVectorType::const_reference escript::DataReady::getDataAtOffsetRO | ( | DataTypes::RealVectorType::size_type | i | ) | const

inline

get a reference to the beginning of a data point

References getVectorROC().

## getDataAtOffsetROC()

DataTypes::CplxVectorType::const_reference escript::DataReady::getDataAtOffsetROC | ( | DataTypes::CplxVectorType::size_type | i | ) | const

inline

## getDataAtOffsetRW()

DataTypes::RealVectorType::reference escript::DataReady::getDataAtOffsetRW | ( | DataTypes::RealVectorType::size_type | i | ) |

inline

References getVectorRWC().

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

## getDataAtOffsetRWC()

DataTypes::CplxVectorType::reference escript::DataReady::getDataAtOffsetRWC | ( | DataTypes::CplxVectorType::size_type | i | ) |

inline

## getSampleDataRO() [1/2]

const DataTypes::cplx_t * escript::DataReady::getSampleDataRO | ( | DataTypes::RealVectorType::size_type | sampleNo,
|  | DataTypes::cplx_t | dummy
| ) |  | const

inline

References getVectorRW().

## getSampleDataRO() [2/2]

const DataTypes::real_t * escript::DataReady::getSampleDataRO | ( | DataTypes::RealVectorType::size_type | sampleNo,
|  | DataTypes::real_t | dummy = `0`
| ) |  | const

inline

References getVectorRO().

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

## getSampleDataRW() [1/2]

DataTypes::cplx_t * escript::DataReady::getSampleDataRW | ( | DataTypes::RealVectorType::size_type | sampleNo,
|  | DataTypes::cplx_t | dummy
| ) |  |

inline

References escript::DataAbstract::getPointOffset(), and getVectorROC().

## getSampleDataRW() [2/2]

DataTypes::real_t * escript::DataReady::getSampleDataRW | ( | DataTypes::RealVectorType::size_type | sampleNo,
|  | DataTypes::real_t | dummy = `0`
| ) |  |

inline

Return the sample data for the given sample number.

References escript::DataAbstract::getPointOffset(), and getVectorRO().

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

## getTypedVectorRO() [1/2]

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

pure virtual

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

## getTypedVectorRO() [2/2]

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

pure virtual

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

Referenced by escript::Data::getDataRO(), and escript::Data::toListOfTuples().

## getTypedVectorRW() [1/2]

virtual DataTypes::CplxVectorType& escript::DataReady::getTypedVectorRW | ( | DataTypes::cplx_t | dummy | ) |

pure virtual

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

## getTypedVectorRW() [2/2]

virtual DataTypes::RealVectorType& escript::DataReady::getTypedVectorRW | ( | DataTypes::real_t | dummy | ) |

pure virtual

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

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

## getVectorRO()

virtual const DataTypes::RealVectorType& escript::DataReady::getVectorRO | ( |  | ) | const

pure virtual

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

Referenced by getSampleDataRO(), getSampleDataRW(), and escript::Data::toListOfTuples().

## getVectorROC()

virtual const DataTypes::CplxVectorType& escript::DataReady::getVectorROC | ( |  | ) | const

pure virtual

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

Referenced by getDataAtOffsetRO(), and getSampleDataRW().

## getVectorRW()

virtual DataTypes::RealVectorType& escript::DataReady::getVectorRW | ( |  | ) |

pure virtual

Provide access to underlying storage. Internal use only!

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

Referenced by getSampleDataRO().

## getVectorRWC()

virtual DataTypes::CplxVectorType& escript::DataReady::getVectorRWC | ( |  | ) |

pure virtual

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

Referenced by getDataAtOffsetRW().

## hasInf()

virtual bool escript::DataReady::hasInf | ( |  | ) | const

pure virtual

Return true if data contains Inf or -Inf.

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

## hasNaN()

virtual bool escript::DataReady::hasNaN | ( |  | ) | const

pure virtual

return true if data contains NaN.

Warning
  This is dependent on the ability to reliably detect NaNs on your compiler. See the nancheck function in LocalOps for details.

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

## replaceInf() [1/2]

virtual void escript::DataReady::replaceInf | ( | DataTypes::cplx_t | value | ) |

pure virtual

replaces all (+/-)Inf values with value

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

## replaceInf() [2/2]

virtual void escript::DataReady::replaceInf | ( | DataTypes::real_t | value | ) |

pure virtual

replaces all (+/-)Inf values with value

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

## replaceNaN() [1/2]

virtual void escript::DataReady::replaceNaN | ( | DataTypes::cplx_t | value | ) |

pure virtual

replaces all NaN values with value

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

## replaceNaN() [2/2]

virtual void escript::DataReady::replaceNaN | ( | DataTypes::real_t | value | ) |

pure virtual

replaces all NaN values with value

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

## resolve()

DataReady_ptr escript::DataReady::resolve | ( |  | ) |

virtual

Return a data object with all points resolved.

Implements escript::DataAbstract.

## setSlice()

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

pure virtual

Copy the specified region from the given object.

Parameters

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

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

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

- DataReady.h
- DataReady.cpp