escript::DataConstant Class Reference

DataConstant stores a single data point which represents the entire function space. More...

`#include <DataConstant.h>`

Inheritance diagram for escript::DataConstant:

## Public Member Functions

| DataConstant (const WrappedArray &value, const FunctionSpace &what)
| Constructor for DataConstant objects. More...
| DataConstant (const DataConstant &other)
| Copy constructor. Performs a deep copy. More...
| DataConstant (const DataConstant &other, const DataTypes::RegionType &region)
| Alternative constructor for DataConstant objects. More...
| DataConstant (const FunctionSpace &what, const DataTypes::ShapeType &shape, const DataTypes::RealVectorType &data)
| Alternative constructor for DataConstant objects. More...
| DataConstant (const FunctionSpace &what, const DataTypes::ShapeType &shape, const DataTypes::CplxVectorType &data)
| DataConstant (const FunctionSpace &what, const DataTypes::ShapeType &shape, const DataTypes::real_t v)
| DataConstant (const FunctionSpace &what, const DataTypes::ShapeType &shape, const DataTypes::cplx_t v)
bool | isConstant () const
bool | hasNaN () const
| Return true if the value 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 bool | hasInf () const
| Return true if data contains Inf or -Inf. More...
virtual void | replaceInf (DataTypes::real_t value)
| replaces all (+/-)Inf values with value More...
virtual void | replaceInf (DataTypes::cplx_t value)
| replaces all (+/-)Inf values with value More...
std::string | toString () const
| Write the data as a string. 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 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 sample. This is a somewhat artificial notion but returns the offset in bytes for the given point into the container holding the point data. Only really necessary to avoid many DataArrayView objects. More...
virtual DataTypes::RealVectorType::size_type | getPointOffset (int sampleNo, int dataPointNo)
virtual DataTypes::RealVectorType::size_type | getLength () const
| Return the number of doubles stored for the Data object. More...
virtual DataAbstract * | getSlice (const DataTypes::RegionType &region) const
| Factory method that returns a newly created DataConstant object sliced from the specified region of this object. 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...
virtual void | symmetric (DataAbstract *ev)
| Computes a symmetric matrix (A + AT) / 2. More...
virtual void | antisymmetric (DataAbstract *ev)
| Computes a nonsymmetric 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 anti-hermitian 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 int | matrixInverse (DataAbstract *out) const
| invert square matricies More...
DataTypes::RealVectorType & | getVectorRW ()
| Return 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
void | complicate ()
| Convert from real data to complex data. More...
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 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 | 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 | 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...

## Private Types

typedef DataReady | parent

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

DataConstant stores a single data point which represents the entire function space.

Description: DataConstant stores a single data point which represents the entire function space.

## Member Typedef Documentation

## parent

typedef DataReady escript::DataConstant::parent

private

## Constructor & Destructor Documentation

## DataConstant() [1/7]

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

explicit

Constructor for DataConstant objects.

Description: Constructor for DataConstant objects.

Parameters

  value | - Input - Data value for a single point.
  what | - Input - A description of what this data object represents.

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

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

## DataConstant() [2/7]

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

Copy constructor. Performs a deep copy.

References escript::DataAbstract::isComplex(), m_data_c, m_data_r, and escript::DataAbstract::m_iscompl.

## DataConstant() [3/7]

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

explicit

Alternative constructor for DataConstant objects.

Description: Alternative Constructor for DataConstant objects.

Parameters

  other | - Input - Data object to copy from.
  region | - Input - region to copy.

References escript::DataTypes::copySlice(), escript::DataAbstract::getNoValues(), escript::DataAbstract::getShape(), escript::DataTypes::getSliceRegionLoopRange(), getVectorRO(), getVectorROC(), escript::DataAbstract::isComplex(), m_data_c, m_data_r, escript::DataAbstract::m_iscompl, and escript::DataTypes::DataVectorAlt< T >::resize().

## DataConstant() [4/7]

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

explicit

Alternative constructor for DataConstant objects.

Description: Alternative Constructor for DataConstant objects.

Parameters

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

References m_data_r.

## DataConstant() [5/7]

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

explicit

References m_data_c, and escript::DataAbstract::m_iscompl.

## DataConstant() [6/7]

escript::DataConstant::DataConstant | ( | const FunctionSpace & | what,
|  | const DataTypes::ShapeType & | shape,
|  | const DataTypes::real_t | v
| ) |  |

explicit

## DataConstant() [7/7]

escript::DataConstant::DataConstant | ( | const FunctionSpace & | what,
|  | const DataTypes::ShapeType & | shape,
|  | const DataTypes::cplx_t | v
| ) |  |

explicit

References escript::DataAbstract::m_iscompl.

## Member Function Documentation

## antihermitian()

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

virtual

Computes an anti-hermitian matrix (A - A*) / 2.

Parameters

  ev | - Output - antihermitian matrix

Reimplemented from escript::DataAbstract.

References escript::antihermitian(), escript::DataAbstract::getShape(), getVectorRWC(), escript::DataAbstract::isComplex(), and m_data_c.

## antisymmetric()

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

virtual

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

Parameters

  ev | - Output - nonsymmetric matrix

Reimplemented from escript::DataAbstract.

References escript::antisymmetric(), escript::DataAbstract::getShape(), getVectorRW(), getVectorRWC(), escript::DataAbstract::isComplex(), m_data_c, and m_data_r.

## complicate()

void escript::DataConstant::complicate | ( |  | ) |

virtual

Convert from real data to complex data.

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 replaceInf(), and replaceNaN().

## deepCopy()

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

virtual

Return a deep copy of the current object.

Implements escript::DataAbstract.

References DataConstant().

## dump()

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

virtual

dumps the object into a netCDF file

Reimplemented from escript::DataAbstract.

References escript::DataAbstract::getFunctionSpace(), escript::DataAbstract::getRank(), escript::DataAbstract::getShape(), escript::FunctionSpace::getTypeCode(), m_data_r, escript::DataTypes::maxRank, MPI_COMM_WORLD, and MPI_INT.

## eigenvalues()

void escript::DataConstant::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::getShape(), getVectorRW(), getVectorRWC(), escript::DataAbstract::isComplex(), m_data_c, and m_data_r.

## eigenvalues_and_eigenvectors()

void escript::DataConstant::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::getShape(), getVectorRW(), m_data_r, and V.

## getLength()

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

virtual

Return the number of doubles stored for the Data object.

Implements escript::DataAbstract.

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

## getPointOffset() [1/2]

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

virtual

## getPointOffset() [2/2]

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

virtual

Return the offset for the given sample. This is a somewhat artificial notion but returns the offset in bytes for the given point into the container holding the point data. Only really necessary to avoid many DataArrayView objects.

Parameters

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

Implements escript::DataAbstract.

## getSlice()

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

virtual

Factory method that returns a newly created DataConstant object sliced from the specified region of this object. The caller is reponsible for managing the object created.

Parameters

  region | - Input - region to slice from this object.

Implements escript::DataAbstract.

References DataConstant().

## getTypedVectorRO() [1/2]

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

virtual

Implements escript::DataReady.

References m_data_c.

## getTypedVectorRO() [2/2]

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

virtual

Implements escript::DataReady.

References m_data_r.

Referenced by escript::binaryOpDataReadyHelperCCC(), escript::binaryOpDataReadyHelperECE(), escript::binaryOpDataReadyHelperEEC(), escript::binaryOpDataReadyHelperTCT(), escript::binaryOpDataReadyHelperTTC(), escript::DataExpanded::copy(), escript::DataTagged::DataTagged(), escript::Data::dp_algorithm(), and escript::Data::reduction().

## getTypedVectorRW() [1/2]

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

virtual

Implements escript::DataReady.

References CHECK_FOR_EX_WRITE, and m_data_c.

## getTypedVectorRW() [2/2]

DataTypes::RealVectorType & escript::DataConstant::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 escript::binaryOpDataReadyHelperCCC(), and escript::Data::dp_algorithm().

## getVectorRO()

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

virtual

Implements escript::DataReady.

References m_data_r.

Referenced by DataConstant(), and setSlice().

## getVectorROC()

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

virtual

Implements escript::DataReady.

References m_data_c.

Referenced by DataConstant(), and setSlice().

## getVectorRW()

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

virtual

Return a reference to the underlying DataVector.

Implements escript::DataReady.

References CHECK_FOR_EX_WRITE, and m_data_r.

Referenced by antisymmetric(), eigenvalues(), eigenvalues_and_eigenvectors(), matrixInverse(), swapaxes(), symmetric(), trace(), and transpose().

## getVectorRWC()

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

virtual

Implements escript::DataReady.

References CHECK_FOR_EX_WRITE, and m_data_c.

Referenced by antihermitian(), antisymmetric(), eigenvalues(), hermitian(), swapaxes(), symmetric(), trace(), and transpose().

## hasInf()

bool escript::DataConstant::hasInf | ( |  | ) | const

virtual

Return true if data contains Inf or -Inf.

Implements escript::DataReady.

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

## hasNaN()

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

virtual

Return true if the value contains a NaN.

Implements escript::DataReady.

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

## hermitian()

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

virtual

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

Parameters

  ev | - Output - hermitian matrix

Reimplemented from escript::DataAbstract.

References escript::DataAbstract::getShape(), getVectorRWC(), escript::hermitian(), escript::DataAbstract::isComplex(), and m_data_c.

## isConstant()

bool escript::DataConstant::isConstant | ( |  | ) | const

inline virtual

Reimplemented from escript::DataAbstract.

## matrixInverse()

int escript::DataConstant::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::getRank(), escript::DataAbstract::getShape(), getVectorRW(), m_data_r, and escript::matrix_inverse().

## replaceInf() [1/2]

void escript::DataConstant::replaceInf | ( | DataTypes::cplx_t | value | ) |

virtual

replaces all (+/-)Inf values with value

Implements escript::DataReady.

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

## replaceInf() [2/2]

void escript::DataConstant::replaceInf | ( | DataTypes::real_t | value | ) |

virtual

replaces all (+/-)Inf 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 replaceInf().

## replaceNaN() [1/2]

void escript::DataConstant::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().

## replaceNaN() [2/2]

void escript::DataConstant::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 replaceNaN().

## setSlice()

void escript::DataConstant::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(), escript::DataAbstract::getRank(), escript::DataTypes::getResultSliceShape(), escript::DataAbstract::getShape(), escript::DataTypes::getSliceRegionLoopRange(), getVectorRO(), getVectorROC(), escript::DataAbstract::isComplex(), m_data_c, and m_data_r.

## setToZero()

void escript::DataConstant::setToZero | ( |  | ) |

virtual

sets all values to zero

Reimplemented from escript::DataAbstract.

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

## swapaxes()

void escript::DataConstant::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::getShape(), getVectorRW(), getVectorRWC(), escript::DataAbstract::isComplex(), m_data_c, m_data_r, and escript::swapaxes().

## symmetric()

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

virtual

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

Parameters

  ev | - Output - symmetric matrix

Reimplemented from escript::DataAbstract.

References escript::DataAbstract::getShape(), getVectorRW(), getVectorRWC(), escript::DataAbstract::isComplex(), m_data_c, m_data_r, and escript::symmetric().

## toString()

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

virtual

Write the data as a string.

Implements escript::DataAbstract.

References escript::DataAbstract::getShape(), escript::DataAbstract::isComplex(), m_data_c, m_data_r, and escript::DataTypes::pointToString().

## trace()

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

virtual

Computes the trace of a matrix.

Parameters

  ev | - Output - trace of matrix
  axis_offset |

Reimplemented from escript::DataAbstract.

References escript::DataAbstract::getShape(), getVectorRW(), getVectorRWC(), escript::DataAbstract::isComplex(), m_data_c, m_data_r, and escript::trace().

## transpose()

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

virtual

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

Parameters

  ev | - Output - transpose of matrix
  axis_offset |

Reimplemented from escript::DataAbstract.

References escript::DataAbstract::getShape(), getVectorRW(), getVectorRWC(), escript::DataAbstract::isComplex(), m_data_c, m_data_r, and escript::transpose().

## zeroedCopy()

DataAbstract * escript::DataConstant::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 DataConstant(), escript::DataAbstract::getFunctionSpace(), escript::DataAbstract::getShape(), and escript::DataAbstract::isComplex().

## Member Data Documentation

## m_data_c

DataTypes::CplxVectorType escript::DataConstant::m_data_c

private

Referenced by antihermitian(), antisymmetric(), complicate(), DataConstant(), eigenvalues(), getLength(), getTypedVectorRO(), getTypedVectorRW(), getVectorROC(), getVectorRWC(), hasInf(), hasNaN(), hermitian(), replaceInf(), replaceNaN(), setSlice(), setToZero(), swapaxes(), symmetric(), toString(), trace(), and transpose().

## m_data_r

DataTypes::RealVectorType escript::DataConstant::m_data_r

private

Referenced by antisymmetric(), complicate(), DataConstant(), dump(), eigenvalues(), eigenvalues_and_eigenvectors(), getLength(), getTypedVectorRO(), getTypedVectorRW(), getVectorRO(), getVectorRW(), hasInf(), hasNaN(), matrixInverse(), replaceInf(), replaceNaN(), setSlice(), setToZero(), swapaxes(), symmetric(), toString(), trace(), and transpose().

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

- DataConstant.h
- DataConstant.cpp