DataTagged.h
Go to the documentation of this file.
/*****************************************************************************
*
* Copyright (c) 2003-2020 by The University of Queensland
* http://www.uq.edu.au
*
* Primary Business: Queensland, Australia
* Licensed under the Apache License, version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Development until 2012 by Earth Systems Science Computational Center (ESSCC)
* Development 2012-2013 by School of Earth Sciences
* Development from 2014-2017 by Centre for Geoscience Computing (GeoComp)
* Development from 2019 by School of Earth and Environmental Sciences
**
*****************************************************************************/
#ifndef __ESCRIPT_DATATAGGED_H__
#define __ESCRIPT_DATATAGGED_H__
#include "system_dep.h"
#include "DataReady.h"
#include "DataTypes.h"
#include <map>
#include <vector>
namespace escript {
class DataConstant;
class ESCRIPT_DLL_API DataTagged : public DataReady
{
typedef DataReady parent;
public:
//
// Types for the lists of tags and values.
typedef std::vector<int> TagListType;
typedef std::vector<DataTypes::RealVectorType::ElementType> FloatBatchType;
typedef std::vector<DataTypes::CplxVectorType::ElementType> CplxBatchType;
//
// Map from a tag to an offset into the data array.
typedef std::map<int, int> DataMapType;
explicit DataTagged(const FunctionSpace& what,
const DataTypes::ShapeType &shape,
const int tags[],
const DataTypes::RealVectorType& data);
explicit DataTagged(const FunctionSpace& what,
const DataTypes::ShapeType &shape,
const int tags[],
const DataTypes::CplxVectorType& data);
explicit DataTagged(const FunctionSpace& what,
const DataTypes::ShapeType &shape,
const TagListType& tags,
const DataTypes::RealVectorType& data);
explicit DataTagged(const FunctionSpace& what,
const DataTypes::ShapeType &shape,
const TagListType& tags,
const DataTypes::CplxVectorType& data);
DataTagged(const DataTagged& other);
explicit DataTagged(const DataConstant& other);
explicit DataTagged(const FunctionSpace& what,
const DataTypes::ShapeType& shape,
const DataTypes::RealVectorType& defaultvalue,
const DataTagged* tagsource=0);
explicit DataTagged(const FunctionSpace& what,
const DataTypes::ShapeType& shape,
const DataTypes::CplxVectorType& defaultvalue,
const DataTagged* tagsource=0);
inline virtual
~DataTagged() {};
bool
isTagged() const
{
return true;
};
bool
hasNaN() const;
void
replaceNaN(DataTypes::real_t value);
void
replaceNaN(DataTypes::cplx_t value);
ESCRIPT_DLL_API
virtual bool
hasInf() const;
ESCRIPT_DLL_API
virtual void
replaceInf(DataTypes::real_t value);
ESCRIPT_DLL_API
virtual void
replaceInf(DataTypes::cplx_t value);
virtual
DataAbstract*
deepCopy() const;
ESCRIPT_DLL_API
virtual
DataAbstract*
zeroedCopy() const;
virtual
DataTypes::real_t*
getSampleDataByTag(int tag, DataTypes::real_t dummy=0);
virtual
DataTypes::cplx_t*
getSampleDataByTag(int tag, DataTypes::cplx_t dummy);
virtual
std::string
toString() const;
virtual
void
dump(const std::string fileName) const;
virtual int
matrixInverse(DataAbstract* out) const;
virtual
void
setToZero();
virtual
int
getTagNumber(int dpno);
virtual
DataTypes::RealVectorType::size_type
getPointOffset(int sampleNo,
int dataPointNo) const;
void
addTaggedValues(const TagListType& tagKeys,
const FloatBatchType& values,
const ShapeType& vShape);
void
addTaggedValues(const TagListType& tagKeys,
const DataTypes::RealVectorType& values,
const ShapeType& vShape);
void
addTaggedValue(int tagKey,
const DataTypes::ShapeType& pointshape,
const DataTypes::RealVectorType& value,
int dataOffset=0);
void
addTaggedValue(int tagKey,
const DataTypes::ShapeType& pointshape,
const DataTypes::CplxVectorType& value,
int dataOffset=0);
void
addTag(int tagKey);
void
setTaggedValue(int tagKey,
const DataTypes::ShapeType& pointshape,
const DataTypes::RealVectorType& value,
int dataOffset=0);
void
setTaggedValue(int tagKey,
const DataTypes::ShapeType& pointshape,
const DataTypes::CplxVectorType& value,
int dataOffset=0);
DataTypes::RealVectorType::reference
getDataByTagRW(int tag, DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy=0);
DataTypes::RealVectorType::const_reference
getDataByTagRO(int tag, DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy=0) const;
DataTypes::CplxVectorType::reference
getDataByTagRW(int tag, DataTypes::CplxVectorType::size_type i, DataTypes::cplx_t dummy);
DataTypes::CplxVectorType::const_reference
getDataByTagRO(int tag, DataTypes::CplxVectorType::size_type i, DataTypes::cplx_t dummy) const;
DataTypes::RealVectorType::size_type
getOffsetForTag(int tag) const;
DataTypes::RealVectorType&
getVectorRW();
const DataTypes::RealVectorType&
getVectorRO() const;
DataTypes::CplxVectorType&
getVectorRWC();
const DataTypes::CplxVectorType&
getVectorROC() const;
virtual DataTypes::RealVectorType&
getTypedVectorRW(DataTypes::real_t dummy);
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;
const DataMapType&
getTagLookup() const;
bool
isCurrentTag(int tag) const;
DataTypes::RealVectorType::reference
getDefaultValueRW(DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy=0);
DataTypes::RealVectorType::const_reference
getDefaultValueRO(DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy=0) const;
DataTypes::CplxVectorType::reference
getDefaultValueRW(DataTypes::CplxVectorType::size_type i, DataTypes::cplx_t dummy);
DataTypes::CplxVectorType::const_reference
getDefaultValueRO(DataTypes::CplxVectorType::size_type i, DataTypes::cplx_t dummy) const;
virtual
DataTypes::RealVectorType::size_type
getLength() const;
virtual
DataAbstract*
getSlice(const DataTypes::RegionType& region) const;
DataTagged(const DataTagged& other,
const DataTypes::RegionType& region);
virtual
void
setSlice(const DataAbstract* other,
const DataTypes::RegionType& region);
virtual void
symmetric(DataAbstract* ev);
virtual void
antisymmetric(DataAbstract* ev);
virtual void
hermitian(DataAbstract* ev);
virtual void
antihermitian(DataAbstract* ev);
virtual void
trace(DataAbstract* ev, int axis_offset);
virtual void
swapaxes(DataAbstract* ev, int axis0, int axis1);
virtual void
transpose(DataAbstract* ev, int axis_offset);
virtual void
eigenvalues(DataAbstract* ev);
virtual void
eigenvalues_and_eigenvectors(DataAbstract* ev,DataAbstract* V,const double tol=1.e-13);
DataTypes::RealVectorType::size_type
getDefaultOffset() const;
size_t
getTagCount() const;
void
complicate();
protected:
private:
//
// The offset lookup table
DataMapType m_offsetLookup;
//
// the offset to the default value
static const int m_defaultValueOffset = 0;
// the actual data
DataTypes::RealVectorType m_data_r;
DataTypes::CplxVectorType m_data_c;
};
inline
bool
DataTagged::isCurrentTag(int tag) const
{
DataMapType::const_iterator pos(m_offsetLookup.find(tag));
return (pos!=m_offsetLookup.end());
}
inline
DataTypes::RealVectorType::size_type
DataTagged::getDefaultOffset() const
{
return m_defaultValueOffset;
}
inline
DataTypes::RealVectorType::reference
DataTagged::getDefaultValueRW(DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy)
{
return getVectorRW()[i]; // getVectorRW has exclusive write checks
}
inline
DataTypes::RealVectorType::const_reference
DataTagged::getDefaultValueRO(DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy) const
{
return getVectorRO()[i];
}
inline
DataTypes::CplxVectorType::reference
DataTagged::getDefaultValueRW(DataTypes::RealVectorType::size_type i, DataTypes::cplx_t dummy)
{
return getVectorRWC()[i]; // getVectorRW has exclusive write checks
}
inline
DataTypes::CplxVectorType::const_reference
DataTagged::getDefaultValueRO(DataTypes::CplxVectorType::size_type i, DataTypes::cplx_t dummy) const
{
return getVectorROC()[i];
}
inline
const DataTagged::DataMapType&
DataTagged::getTagLookup() const
{
return m_offsetLookup;
}
inline
DataTypes::RealVectorType::size_type
DataTagged::getLength() const
{
return std::max(m_data_c.size(), m_data_r.size());
}
} // end of namespace
#endif // __ESCRIPT_DATATAGGED_H__
escript::DataTypes::maxRank
static const int maxRank
The maximum number of dimensions a datapoint can have.
Definition: DataTypes.h:74
escript::DataTagged::getLength
virtual DataTypes::RealVectorType::size_type getLength() const
getLength
Definition: DataTagged.h:783
CHECK_FOR_EX_WRITE
#define CHECK_FOR_EX_WRITE
Definition: DataTagged.cpp:40
MPI_Status
int MPI_Status
Definition: EsysMPI.h:45
ESCRIPT_DLL_API
#define ESCRIPT_DLL_API
Definition: escriptcore/src/system_dep.h:30
escript::FunctionSpace::getTagFromSampleNo
int getTagFromSampleNo(DataTypes::dim_t sampleNo) const
Returns the tag associated with the given sample number.
Definition: FunctionSpace.cpp:144
escript::DataTypes::real_t
double real_t
type of all real-valued scalars in escript
Definition: DataTypes.h:79
escript::DataTagged::getTagLookup
const DataMapType & getTagLookup() const
getTagLookup
Definition: DataTagged.h:776
escript::DataTagged::swapaxes
virtual void swapaxes(DataAbstract *ev, int axis0, int axis1)
swaps components axis0 and axis1
Definition: DataTagged.cpp:1248
escript::DataTagged::addTag
void addTag(int tagKey)
addTag - does not modify the default value for this object. ** Not unit tested **
Definition: DataTagged.cpp:685
escript::DataTagged::setToZero
virtual void setToZero()
sets all values to zero
Definition: DataTagged.cpp:1391
escript::DataTypes::copySlice
void copySlice(VEC &left, const ShapeType &leftShape, typename VEC::size_type leftOffset, const VEC &other, const ShapeType &otherShape, typename VEC::size_type otherOffset, const RegionLoopRangeType &region)
Copy a data slice specified by the given region and offset from the "other" vector into the "left" ve...
Definition: DataVector.h:174
escript::DataTagged::complicate
void complicate()
Definition: DataTagged.cpp:1701
escript::DataTagged::eigenvalues
virtual void eigenvalues(DataAbstract *ev)
solves the eigenvalue problem this*V=ev*V for the eigenvalues ev
Definition: DataTagged.cpp:1283
escript::DataConstant::getTypedVectorRO
virtual const DataTypes::RealVectorType & getTypedVectorRO(DataTypes::real_t dummy) const
Definition: DataConstant.cpp:872
escript::DataTagged::getDataByTagRW
DataTypes::RealVectorType::reference getDataByTagRW(int tag, DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy=0)
getDataByTag
Definition: DataTagged.cpp:1017
escript::DataTagged::getVectorRW
DataTypes::RealVectorType & getVectorRW()
Return a reference to the underlying DataVector.
Definition: DataTagged.cpp:1643
escript::antihermitian
void antihermitian(const DataTypes::CplxVectorType &in, const DataTypes::ShapeType &inShape, typename DataTypes::CplxVectorType::size_type inOffset, DataTypes::CplxVectorType &ev, const DataTypes::ShapeType &evShape, typename DataTypes::CplxVectorType::size_type evOffset)
computes a antihermitian matrix from your square matrix A: (A - adjoint(A)) / 2
Definition: DataVectorOps.cpp:963
escript::DataTagged::trace
virtual void trace(DataAbstract *ev, int axis_offset)
Computes the trace of a matrix.
Definition: DataTagged.cpp:1178
escript::DataTagged::getDefaultOffset
DataTypes::RealVectorType::size_type getDefaultOffset() const
Returns the offset in the structure which stores the default value.
Definition: DataTagged.h:738
escript::DataTypes::DataVectorAlt< real_t >::const_reference
const typedef ElementType & const_reference
Definition: DataVectorAlt.h:94
escript::DataTypes::checkShape
bool checkShape(const ShapeType &s1, const ShapeType &s2)
Test if two shapes are equal.
Definition: DataTypes.h:333
escript::DataConstant
DataConstant stores a single data point which represents the entire function space.
Definition: DataConstant.h:52
escript::eigenvalues
void eigenvalues(const DataTypes::RealVectorType &in, const DataTypes::ShapeType &inShape, typename DataTypes::RealVectorType::size_type inOffset, DataTypes::RealVectorType &ev, const DataTypes::ShapeType &evShape, typename DataTypes::RealVectorType::size_type evOffset)
solves a local eigenvalue problem
Definition: DataVectorOps.h:639
escript::DataTagged::getDefaultValueRW
DataTypes::RealVectorType::reference getDefaultValueRW(DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy=0)
getDefaultValue
Definition: DataTagged.h:745
escript::DataTypes::DataVectorAlt::resize
void resize(const size_type newSize, const value_type newVal=0.0, const size_type newBlockSize=1)
Resize the DataVectorAlt to the given length "newSize". All current data is lost. All elements in the...
Definition: DataVectorAlt.h:319
escript::DataTypes::DataVectorAlt< cplx_t >::size_type
DataTypes::vec_size_type size_type
Definition: DataVectorAlt.h:92
escript::symmetric
void symmetric(const VEC &in, const DataTypes::ShapeType &inShape, typename VEC::size_type inOffset, VEC &ev, const DataTypes::ShapeType &evShape, typename VEC::size_type evOffset)
computes a symmetric matrix from your square matrix A: (A + transpose(A)) / 2
Definition: DataVectorOps.h:103
escript::DataTypes::DataVectorAlt< real_t >
escript::DataTagged::m_defaultValueOffset
static const int m_defaultValueOffset
Definition: DataTagged.h:719
escript::transpose
void transpose(const VEC &in, const DataTypes::ShapeType &inShape, typename VEC::size_type inOffset, VEC &ev, const DataTypes::ShapeType &evShape, typename VEC::size_type evOffset, int axis_offset)
Transpose each data point of this Data object around the given axis.
Definition: DataVectorOps.h:343
escript::DataTagged::getDataByTagRO
DataTypes::RealVectorType::const_reference getDataByTagRO(int tag, DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy=0) const
Definition: DataTagged.cpp:1006
escript::DataAbstract::getRank
unsigned int getRank() const
Return the rank information for the point data.
Definition: DataAbstract.h:667
escript::DataTagged::m_data_c
DataTypes::CplxVectorType m_data_c
Definition: DataTagged.h:723
escript::FunctionSpace
Definition: FunctionSpace.h:49
escript::DataTypes::getSliceRegionLoopRange
DataTypes::RegionLoopRangeType getSliceRegionLoopRange(const DataTypes::RegionType &region)
Modify region to copy from in order to deal with the case where one range in the region contains iden...
Definition: DataTypes.cpp:188
escript::FunctionSpace::canTag
bool canTag() const
Returns true if this function space support tags.
Definition: FunctionSpace.cpp:353
escript::DataTagged::getVectorRO
const DataTypes::RealVectorType & getVectorRO() const
Definition: DataTagged.cpp:1650
escript::DataTagged::DataMapType
std::map< int, int > DataMapType
Definition: DataTagged.h:72
MPI_INT
#define MPI_INT
Definition: EsysMPI.h:46
system_dep.h
escript::DataTagged::hasInf
virtual bool hasInf() const
Return true if data contains Inf or -Inf.
Definition: DataTagged.cpp:843
escript::LapackInverseHelper
Definition: LapackInverseHelper.h:41
escript::DataTagged
Simulates a full dataset accessible via sampleNo and dataPointNo.
Definition: DataTagged.h:59
escript::DataAbstract::getNumDPPSample
int getNumDPPSample() const
Return the number of data points per sample.
Definition: DataAbstract.h:626
MPI_COMM_WORLD
#define MPI_COMM_WORLD
Definition: EsysMPI.h:48
escript::DataException
Definition: DataException.h:41
escript::hermitian
void hermitian(const DataTypes::CplxVectorType &in, const DataTypes::ShapeType &inShape, DataTypes::CplxVectorType::size_type inOffset, DataTypes::CplxVectorType &ev, const DataTypes::ShapeType &evShape, DataTypes::CplxVectorType::size_type evOffset)
computes an hermitian matrix from your square matrix A: (A + adjoint(A)) / 2
Definition: DataVectorOps.cpp:916
escript::DataTypes::ShapeType
std::vector< int > ShapeType
The shape of a single datapoint.
Definition: DataTypes.h:71
escript::JMPI
boost::shared_ptr< JMPI_ > JMPI
Definition: EsysMPI.h:72
escript::DataTypes
Contains the types to represent Shapes, Regions, RegionLoop ranges and vectors of data as well as the...
Definition: DataTypes.cpp:87
escript::DataTypes::fillComplexFromReal
void fillComplexFromReal(const RealVectorType &r, CplxVectorType &c)
copy data from a real vector to a complex vector The complex vector will be resized as needed and any...
escript::DataTypes::copySliceFrom
void copySliceFrom(VEC &left, const ShapeType &leftShape, typename VEC::size_type leftOffset, const VEC &other, const ShapeType &otherShape, typename VEC::size_type otherOffset, const RegionLoopRangeType &region)
Copy data into a slice specified by the given region and offset in the left vector from the other vec...
Definition: DataVector.h:281
escript::DataTagged::setSlice
virtual void setSlice(const DataAbstract *other, const DataTypes::RegionType &region)
setSlice
Definition: DataTagged.cpp:393
escript::DataTagged::transpose
virtual void transpose(DataAbstract *ev, int axis_offset)
Transpose each data point of this Data object around the given axis.
Definition: DataTagged.cpp:1213
escript::DataTypes::RegionType
std::vector< std::pair< int, int > > RegionType
Definition: DataTypes.h:72
escript::DataTypes::noValues
int noValues(const ShapeType &shape)
Calculate the number of values in a datapoint with the given shape.
Definition: DataTypes.cpp:91
escript::DataAbstract::getShape
const DataTypes::ShapeType & getShape() const
Return the shape information for the point data.
Definition: DataAbstract.h:656
escript::DataTypes::getResultSliceShape
DataTypes::ShapeType getResultSliceShape(const RegionType &region)
Determine the shape of the specified slice region.
Definition: DataTypes.cpp:173
escript::DataTagged::getVectorRWC
DataTypes::CplxVectorType & getVectorRWC()
Definition: DataTagged.cpp:1656
escript::DataAbstract::getNumSamples
int getNumSamples() const
Return the number of samples.
Definition: DataAbstract.h:637
escript::DataTagged::setTaggedValue
void setTaggedValue(int tagKey, const DataTypes::ShapeType &pointshape, const DataTypes::RealVectorType &value, int dataOffset=0)
setTaggedValue
Definition: DataTagged.cpp:497
escript::DataTagged::getTypedVectorRW
virtual DataTypes::RealVectorType & getTypedVectorRW(DataTypes::real_t dummy)
These versions use the type system rather than method name to determine return type.
Definition: DataTagged.cpp:1669
escript::DataTagged::m_data_r
DataTypes::RealVectorType m_data_r
Definition: DataTagged.h:722
escript::DataTagged::getTypedVectorRO
virtual const DataTypes::RealVectorType & getTypedVectorRO(DataTypes::real_t dummy) const
Definition: DataTagged.cpp:1676
escript::DataTagged::deepCopy
virtual DataAbstract * deepCopy() const
Return a deep copy of the current object.
Definition: DataTagged.cpp:306
escript::DataTagged::addTaggedValues
void addTaggedValues(const TagListType &tagKeys, const FloatBatchType &values, const ShapeType &vShape)
addTaggedValues
Definition: DataTagged.cpp:554
escript::matrix_inverse
int matrix_inverse(const DataTypes::RealVectorType &in, const DataTypes::ShapeType &inShape, DataTypes::RealVectorType::size_type inOffset, DataTypes::RealVectorType &out, const DataTypes::ShapeType &outShape, DataTypes::RealVectorType::size_type outOffset, int count, LapackInverseHelper &helper)
computes the inverses of square (up to 3x3) matricies
Definition: DataVectorOps.cpp:207
escript::DataTagged::getTagCount
size_t getTagCount() const
Return the number of tags which have been given values (+the default)
Definition: DataTagged.cpp:1695
escript::DataTagged::getPointOffset
virtual DataTypes::RealVectorType::size_type getPointOffset(int sampleNo, int dataPointNo) const
getPointOffset
Definition: DataTagged.cpp:982
DataConstant.h
escript::DataTagged::zeroedCopy
virtual DataAbstract * zeroedCopy() const
Return an object with the same type, domain (and tags if appropriate) as this, but all values are zer...
Definition: DataTagged.cpp:313
escript::DataAbstract::m_iscompl
bool m_iscompl
Definition: DataAbstract.h:578
escript::DataTagged::matrixInverse
virtual int matrixInverse(DataAbstract *out) const
invert square matricies
Definition: DataTagged.cpp:1357
escript::DataTagged::antihermitian
virtual void antihermitian(DataAbstract *ev)
Computes an antihermitian matrix (A - A*) / 2.
Definition: DataTagged.cpp:1152
escript::swapaxes
void swapaxes(const VEC &in, const DataTypes::ShapeType &inShape, typename VEC::size_type inOffset, VEC &ev, const DataTypes::ShapeType &evShape, typename VEC::size_type evOffset, int axis0, int axis1)
swaps the components axis0 and axis1.
Definition: DataVectorOps.h:488
escript::DataTagged::antisymmetric
virtual void antisymmetric(DataAbstract *ev)
Computes a antisymmetric matrix (A - AT) / 2.
Definition: DataTagged.cpp:1089
escript::DataTypes::RegionLoopRangeType
std::vector< std::pair< int, int > > RegionLoopRangeType
Definition: DataTypes.h:73
V
#define V(_K_, _I_)
Definition: ShapeFunctions.cpp:139
escript::DataTagged::getSlice
virtual DataAbstract * getSlice(const DataTypes::RegionType &region) const
getSlice
Definition: DataTagged.cpp:334
escript::DataTagged::getDefaultValueRO
DataTypes::RealVectorType::const_reference getDefaultValueRO(DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy=0) const
Definition: DataTagged.h:752
escript::FunctionSpace::borrowListOfTagsInUse
const int * borrowListOfTagsInUse() const
Definition: FunctionSpace.cpp:330
escript::DataTagged::getVectorROC
const DataTypes::CplxVectorType & getVectorROC() const
Definition: DataTagged.cpp:1663
escript::DataTagged::replaceInf
virtual void replaceInf(DataTypes::real_t value)
replaces all (+/-)Inf values with value
Definition: DataTagged.cpp:878
escript
Definition: AbstractContinuousDomain.cpp:23
escript::DataTypes::DataVectorAlt::size
size_type size() const
Return the number of elements in this DataVectorAlt.
Definition: DataVectorAlt.h:243
escript::DataTypes::pointToString
std::string pointToString(const RealVectorType &data, const ShapeType &shape, int offset, const std::string &prefix)
Display a single value (with the specified shape) from the data.
DataTypes.h
escript::DataAbstract
Definition: DataAbstract.h:76
escript::DataTagged::symmetric
virtual void symmetric(DataAbstract *ev)
Computes a symmetric matrix (A + AT) / 2.
Definition: DataTagged.cpp:1052
escript::DataTagged::getOffsetForTag
DataTypes::RealVectorType::size_type getOffsetForTag(int tag) const
getOffsetForTag
Definition: DataTagged.cpp:995
escript::DataTagged::isCurrentTag
bool isCurrentTag(int tag) const
isCurrentTag
Definition: DataTagged.h:730
DataVectorOps.h
Describes binary operations performed on DataVector.
escript::DataTypes::createShapeErrorMessage
std::string createShapeErrorMessage(const std::string &messagePrefix, const DataTypes::ShapeType &other, const DataTypes::ShapeType &thisShape)
Produce a string containing two shapes.
Definition: DataTypes.cpp:206
escript::FunctionSpace::getTypeCode
int getTypeCode() const
Returns the function space type code.
Definition: FunctionSpace.cpp:95
escript::DataTagged::m_offsetLookup
DataMapType m_offsetLookup
Definition: DataTagged.h:715
DataTagged.h
escript::DataTagged::eigenvalues_and_eigenvectors
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
Definition: DataTagged.cpp:1319
escript::DataAbstract::isComplex
bool isComplex() const
true if the components of datapoints are complex
Definition: DataAbstract.cpp:70
escript::DataTagged::addTaggedValue
void addTaggedValue(int tagKey, const DataTypes::ShapeType &pointshape, const DataTypes::RealVectorType &value, int dataOffset=0)
addTaggedValue
Definition: DataTagged.cpp:608
escript::DataAbstract::getNoValues
unsigned int getNoValues() const
Return the number of values in the shape for this object.
Definition: DataAbstract.h:678
escript::DataTypes::DataVectorAlt::reference
ElementType & reference
Definition: DataVectorAlt.h:93
Data.h
DataReady.h
escript::DataTagged::FloatBatchType
std::vector< DataTypes::RealVectorType::ElementType > FloatBatchType
Definition: DataTagged.h:67
escript::antisymmetric
void antisymmetric(const VEC &in, const DataTypes::ShapeType &inShape, typename VEC::size_type inOffset, VEC &ev, const DataTypes::ShapeType &evShape, typename VEC::size_type evOffset)
computes a antisymmetric matrix from your square matrix A: (A - transpose(A)) / 2
Definition: DataVectorOps.h:152
escript::DataAbstract::getFunctionSpace
const FunctionSpace & getFunctionSpace() const
Return the function space associated with this Data object.
Definition: DataAbstract.h:649
escript::DataTypes::cplx_t
std::complex< real_t > cplx_t
complex data type
Definition: DataTypes.h:82
escript::DataTagged::getTagNumber
virtual int getTagNumber(int dpno)
Return the tag number associated with the given data-point number according to the associated functio...
Definition: DataTagged.cpp:467
escript::DataTagged::getSampleDataByTag
virtual DataTypes::real_t * getSampleDataByTag(int tag, DataTypes::real_t dummy=0)
getSampleDataByTag
Definition: DataTagged.cpp:731
escript::DataAbstract::ShapeType
DataTypes::ShapeType ShapeType
Definition: DataAbstract.h:81
escript::DataTagged::toString
virtual std::string toString() const
Write the data as a string. Writes out each tag, including the default, and the data-point which is a...
Definition: DataTagged.cpp:928
escript::DataTagged::dump
virtual void dump(const std::string fileName) const
dumps the object into a netCDF file
Definition: DataTagged.cpp:1547
escript::trace
void trace(const VEC &in, const DataTypes::ShapeType &inShape, typename VEC::size_type inOffset, VEC &ev, const DataTypes::ShapeType &evShape, typename VEC::size_type evOffset, int axis_offset)
computes the trace of a matrix
Definition: DataVectorOps.h:242
escript::DataTagged::DataTagged
DataTagged(const FunctionSpace &what, const DataTypes::ShapeType &shape, const int tags[], const DataTypes::RealVectorType &data)
Alternative Constructor for DataTagged.
Definition: DataTagged.cpp:51
DataException.h
escript::DataTagged::hermitian
virtual void hermitian(DataAbstract *ev)
Computes an hermitian matrix (A + A*) / 2.
Definition: DataTagged.cpp:1124
escript::FunctionSpace::getNumberOfTagsInUse
int getNumberOfTagsInUse() const
Returns the number of tags in use.
Definition: FunctionSpace.cpp:325
escript::DataTagged::TagListType
std::vector< int > TagListType
Definition: DataTagged.h:66
escript::DataTagged::hasNaN
bool hasNaN() const
Return true if any one of the datapoints contains a NaN.
Definition: DataTagged.cpp:760
escript::DataTagged::replaceNaN
void replaceNaN(DataTypes::real_t value)
replaces all NaN values with value
Definition: DataTagged.cpp:795
escript::eigenvalues_and_eigenvectors
void eigenvalues_and_eigenvectors(const DataTypes::RealVectorType &in, const DataTypes::ShapeType &inShape, DataTypes::RealVectorType::size_type inOffset, DataTypes::RealVectorType &ev, const DataTypes::ShapeType &evShape, DataTypes::RealVectorType::size_type evOffset, DataTypes::RealVectorType &V, const DataTypes::ShapeType &VShape, DataTypes::RealVectorType::size_type VOffset, const double tol=1.e-13)
solves a local eigenvalue problem
Definition: DataVectorOps.h:750