DataExpanded.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
**
*****************************************************************************/
#if !defined escript_DataExpanded_20040323_H
#define escript_DataExpanded_20040323_H
#include "system_dep.h"
#include "DataReady.h"
namespace escript {
//
// Forward declarations of other Data types.
class DataConstant;
class DataTagged;
class DataExpanded : public DataReady {
typedef DataReady parent;
public:
ESCRIPT_DLL_API
explicit DataExpanded(const WrappedArray& value,
const FunctionSpace& what);
ESCRIPT_DLL_API
explicit DataExpanded(const DataExpanded& other,
const DataTypes::RegionType& region);
ESCRIPT_DLL_API
explicit DataExpanded(const FunctionSpace& what,
const DataTypes::ShapeType &shape,
const DataTypes::RealVectorType &data);
ESCRIPT_DLL_API
explicit DataExpanded(const FunctionSpace& what,
const DataTypes::ShapeType &shape,
const DataTypes::CplxVectorType &data);
ESCRIPT_DLL_API
explicit DataExpanded(const FunctionSpace& what,
const DataTypes::ShapeType &shape,
const DataTypes::real_t data);
ESCRIPT_DLL_API
explicit DataExpanded(const FunctionSpace& what,
const DataTypes::ShapeType &shape,
const DataTypes::cplx_t data);
ESCRIPT_DLL_API
DataExpanded(const DataExpanded& other);
ESCRIPT_DLL_API
explicit DataExpanded(const DataConstant& other);
ESCRIPT_DLL_API
explicit DataExpanded(const DataTagged& other);
ESCRIPT_DLL_API
virtual
~DataExpanded();
ESCRIPT_DLL_API
bool
isExpanded() const
{
return true;
};
ESCRIPT_DLL_API
bool
actsExpanded() const
{
return true;
}
ESCRIPT_DLL_API
bool
hasNaN() const;
ESCRIPT_DLL_API
void
replaceNaN(DataTypes::real_t value);
ESCRIPT_DLL_API
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);
ESCRIPT_DLL_API
virtual
std::string
toString() const;
ESCRIPT_DLL_API
virtual
DataAbstract*
deepCopy() const;
ESCRIPT_DLL_API
virtual
DataAbstract*
zeroedCopy() const;
ESCRIPT_DLL_API
virtual
void
dump(const std::string fileName) const;
ESCRIPT_DLL_API
virtual int
matrixInverse(DataAbstract* out) const;
ESCRIPT_DLL_API
virtual
void
setToZero();
ESCRIPT_DLL_API
virtual
DataTypes::RealVectorType::size_type
getPointOffset(int sampleNo,
int dataPointNo) const;
// ESCRIPT_DLL_API
// virtual
// DataTypes::RealVectorType::size_type
// getPointOffset(int sampleNo,
// int dataPointNo);
ESCRIPT_DLL_API
DataTypes::RealVectorType&
getVectorRW();
ESCRIPT_DLL_API
const DataTypes::RealVectorType&
getVectorRO() const;
ESCRIPT_DLL_API
DataTypes::CplxVectorType&
getVectorRWC();
ESCRIPT_DLL_API
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;
ESCRIPT_DLL_API
virtual
DataTypes::RealVectorType::size_type
getLength() const;
ESCRIPT_DLL_API
virtual
DataAbstract*
getSlice(const DataTypes::RegionType& region) const;
ESCRIPT_DLL_API
virtual
void
setSlice(const DataAbstract* value,
const DataTypes::RegionType& region);
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);
ESCRIPT_DLL_API
virtual void
symmetric(DataAbstract* ev);
ESCRIPT_DLL_API
virtual void
antisymmetric(DataAbstract* ev);
ESCRIPT_DLL_API
virtual void
hermitian(DataAbstract* ev);
ESCRIPT_DLL_API
virtual void
antihermitian(DataAbstract* ev);
ESCRIPT_DLL_API
virtual void
trace(DataAbstract* ev, int axis_offset);
ESCRIPT_DLL_API
virtual void
transpose(DataAbstract* ev, int axis_offset);
ESCRIPT_DLL_API
virtual void
swapaxes(DataAbstract* ev, int axis0, int axis1);
ESCRIPT_DLL_API
virtual void
eigenvalues(DataAbstract* ev);
ESCRIPT_DLL_API
virtual void
eigenvalues_and_eigenvectors(DataAbstract* ev,DataAbstract* V,const double tol=1.e-13);
ESCRIPT_DLL_API
virtual void
reorderByReferenceIDs(DataTypes::dim_t *reference_ids);
ESCRIPT_DLL_API
void
complicate();
protected:
private:
void
initialise(int noSamples,
int noDataPointsPerSample,
bool cplx
);
void
copy(const DataConstant& value);
void
copy(const WrappedArray& value);
ESCRIPT_DLL_API
virtual void
copyToDataPoint(const int sampleNo, const int dataPointNo, const DataTypes::real_t value);
ESCRIPT_DLL_API
virtual void
copyToDataPoint(const int sampleNo, const int dataPointNo, const DataTypes::cplx_t value);
ESCRIPT_DLL_API
virtual void
copyToDataPoint(const int sampleNo, const int dataPointNo, const WrappedArray& value);
//
// The main data storage array, a 2D array of data blocks.
// noSamples * noDataPointsPerSample
DataTypes::RealVectorType m_data_r;
DataTypes::CplxVectorType m_data_c;
};
} // end of namespace
#endif
escript::DataTypes::maxRank
static const int maxRank
The maximum number of dimensions a datapoint can have.
Definition: DataTypes.h:74
ESCRIPT_DLL_API
#define ESCRIPT_DLL_API
Definition: escriptcore/src/system_dep.h:30
escript::DataExpanded::trace
virtual void trace(DataAbstract *ev, int axis_offset)
Computes the trace of a matrix.
Definition: DataExpanded.cpp:936
escript::DataExpanded::dump
virtual void dump(const std::string fileName) const
dumps the object into a netCDF file
Definition: DataExpanded.cpp:1335
escript::DataTypes::real_t
double real_t
type of all real-valued scalars in escript
Definition: DataTypes.h:79
escript::DataExpanded::setSlice
virtual void setSlice(const DataAbstract *value, const DataTypes::RegionType &region)
Copy the specified region from the given value.
Definition: DataExpanded.cpp:290
escript::DataExpanded::isExpanded
bool isExpanded() const
Definition: DataExpanded.h:164
escript::DataExpanded::replaceNaN
void replaceNaN(DataTypes::real_t value)
replaces all NaN values with value
Definition: DataExpanded.cpp:460
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::DataExpanded::deepCopy
virtual DataAbstract * deepCopy() const
Return a deep copy of the current object.
Definition: DataExpanded.cpp:265
escript::DataConstant::getTypedVectorRO
virtual const DataTypes::RealVectorType & getTypedVectorRO(DataTypes::real_t dummy) const
Definition: DataConstant.cpp:872
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::DataAbstract::m_noDataPointsPerSample
int m_noDataPointsPerSample
Definition: DataAbstract.h:574
escript::DataExpanded::parent
DataReady parent
Definition: DataExpanded.h:60
escript::FunctionSpace::getNumSamples
DataTypes::dim_t getNumSamples() const
Returns the number of samples.
Definition: FunctionSpace.h:182
escript::DataExpanded::setTaggedValue
void setTaggedValue(int tagKey, const DataTypes::ShapeType &pointshape, const DataTypes::RealVectorType &value, int dataOffset=0)
setTaggedValue
Definition: DataExpanded.cpp:1406
escript::FunctionSpace::getReferenceIDOfSample
DataTypes::dim_t getReferenceIDOfSample(DataTypes::dim_t sampleNo) const
Returns the reference number associated with the given sample number. This function is not efficient....
Definition: FunctionSpace.h:137
escript::DataExpanded::getTypedVectorRW
virtual DataTypes::RealVectorType & getTypedVectorRW(DataTypes::real_t dummy)
These versions use the type system rather than method name to determine return type.
Definition: DataExpanded.cpp:1526
escript::DataTypes::checkShape
bool checkShape(const ShapeType &s1, const ShapeType &s2)
Test if two shapes are equal.
Definition: DataTypes.h:333
escript::DataExpanded::m_data_r
DataTypes::RealVectorType m_data_r
Definition: DataExpanded.h:589
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::WrappedArray
Definition: WrappedArray.h:32
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::DataExpanded::replaceInf
virtual void replaceInf(DataTypes::real_t value)
replaces all (+/-)Inf values with value
Definition: DataExpanded.cpp:545
escript::DataTypes::DataVectorAlt< cplx_t >::size_type
DataTypes::vec_size_type size_type
Definition: DataVectorAlt.h:92
escript::WrappedArray::isComplex
bool isComplex() const
Definition: WrappedArray.h:71
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::DataExpanded::copyToDataPoint
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.
Definition: DataExpanded.cpp:713
escript::DataTypes::DataVectorAlt< real_t >
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::DataTypes::DataVectorAlt::copyFromArrayToOffset
void copyFromArrayToOffset(const WrappedArray &value, size_type offset, size_type copies)
Definition: DataVectorAlt.h:414
escript::DataExpanded::getSlice
virtual DataAbstract * getSlice(const DataTypes::RegionType &region) const
Factory method that returns a newly created DataExpanded. The caller is reponsible for managing the o...
Definition: DataExpanded.cpp:285
escript::DataExpanded::setToZero
virtual void setToZero()
sets all values to zero
Definition: DataExpanded.cpp:1160
escript::DataExpanded::transpose
virtual void transpose(DataAbstract *ev, int axis_offset)
Transpose each data point of this Data object around the given axis.
Definition: DataExpanded.cpp:975
escript::DataAbstract::getRank
unsigned int getRank() const
Return the rank information for the point data.
Definition: DataAbstract.h:667
CHECK_FOR_EX_WRITE
#define CHECK_FOR_EX_WRITE
Definition: DataExpanded.cpp:59
escript::DataExpanded::antihermitian
virtual void antihermitian(DataAbstract *ev)
Computes an antihermitian matrix (A - A*) / 2.
Definition: DataExpanded.cpp:907
escript::DataExpanded::toString
virtual std::string toString() const
Return a textual representation of the data.
Definition: DataExpanded.cpp:594
escript::DataExpanded::actsExpanded
bool actsExpanded() const
Return true if this Data is expanded or resolves to expanded. That is, if it has a separate value for...
Definition: DataExpanded.h:171
escript::DataExpanded::eigenvalues
virtual void eigenvalues(DataAbstract *ev)
solves the eigenvalue problem this*V=ev*V for the eigenvalues ev
Definition: DataExpanded.cpp:1052
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::DataReady
Definition: DataReady.h:50
escript::DataExpanded::copy
void copy(const DataConstant &value)
Copy the given data point value to all data points in this object.
Definition: DataExpanded.cpp:351
escript::DataExpanded::matrixInverse
virtual int matrixInverse(DataAbstract *out) const
invert square matricies
Definition: DataExpanded.cpp:1122
escript::DataExpanded::complicate
void complicate()
Definition: DataExpanded.cpp:641
system_dep.h
escript::LapackInverseHelper
Definition: LapackInverseHelper.h:41
escript::WrappedArray::getRank
unsigned int getRank() const
Definition: WrappedArray.h:77
escript::DataTagged
Simulates a full dataset accessible via sampleNo and dataPointNo.
Definition: DataTagged.h:59
escript::DataExpanded::DataExpanded
DataExpanded(const WrappedArray &value, const FunctionSpace &what)
Constructor for DataExpanded.
Definition: DataExpanded.cpp:64
escript::DataAbstract::getNumDPPSample
int getNumDPPSample() const
Return the number of data points per sample.
Definition: DataAbstract.h:626
escript::DataException
Definition: DataException.h:41
escript::DataAbstract::DataAbstract
DataAbstract(const FunctionSpace &what, const ShapeType &shape, bool isDataEmpty=false, bool isCplx=false)
Constructor for DataAbstract.
Definition: DataAbstract.cpp:76
escript::FunctionSpace::getNumDataPointsPerSample
int getNumDataPointsPerSample() const
Definition: FunctionSpace.h:191
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::dim_t
index_t dim_t
Definition: DataTypes.h:93
escript::DataTypes::ShapeType
std::vector< int > ShapeType
The shape of a single datapoint.
Definition: DataTypes.h:71
DataExpanded.h
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::DataExpanded::getPointOffset
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 poin...
Definition: DataExpanded.cpp:622
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::DataAbstract::getPointOffset
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 containe...
escript::FunctionSpace::getNumDPPSample
int getNumDPPSample() const
Returns the number of data points per sample.
Definition: FunctionSpace.h:188
escript::DataExpanded::hasNaN
bool hasNaN() const
Return true if any value in the data contains a NaN.
Definition: DataExpanded.cpp:424
escript::DataTypes::RegionType
std::vector< std::pair< int, int > > RegionType
Definition: DataTypes.h:72
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::DataTypes::DataVectorAlt::copyFromArray
void copyFromArray(const WrappedArray &value, size_type copies)
Populates the vector with the data from value. This method currently throws an exception if the speci...
Definition: DataVectorAlt.h:510
escript::DataAbstract::getNumSamples
int getNumSamples() const
Return the number of samples.
Definition: DataAbstract.h:637
escript::DataExpanded::antisymmetric
virtual void antisymmetric(DataAbstract *ev)
Computes a antisymmetric matrix (A - AT) / 2.
Definition: DataExpanded.cpp:840
escript::DataTypes::copyPoint
void copyPoint(RealVectorType &dest, vec_size_type doffset, vec_size_type nvals, const RealVectorType &src, vec_size_type soffset)
Copy a point from one vector to another. Note: This version does not check to see if shapes are the s...
escript::DataTagged::getTypedVectorRO
virtual const DataTypes::RealVectorType & getTypedVectorRO(DataTypes::real_t dummy) const
Definition: DataTagged.cpp:1676
escript::DataExpanded::getVectorROC
const DataTypes::CplxVectorType & getVectorROC() const
Definition: DataExpanded.cpp:1521
escript::DataExpanded::reorderByReferenceIDs
virtual void reorderByReferenceIDs(DataTypes::dim_t *reference_ids)
reorders data sample ordered by reference_ids to the ordering of the functions space
Definition: DataExpanded.cpp:1471
escript::DataExpanded
Give a short description of what DataExpanded does.
Definition: DataExpanded.h:58
escript::DataExpanded::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: DataExpanded.cpp:271
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::getPointOffset
virtual DataTypes::RealVectorType::size_type getPointOffset(int sampleNo, int dataPointNo) const
getPointOffset
Definition: DataTagged.cpp:982
DataConstant.h
escript::DataAbstract::m_iscompl
bool m_iscompl
Definition: DataAbstract.h:578
escript::DataExpanded::getTypedVectorRO
virtual const DataTypes::RealVectorType & getTypedVectorRO(DataTypes::real_t dummy) const
Definition: DataExpanded.cpp:1532
escript::DataExpanded::getVectorRO
const DataTypes::RealVectorType & getVectorRO() const
Definition: DataExpanded.cpp:1510
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::DataTypes::RegionLoopRangeType
std::vector< std::pair< int, int > > RegionLoopRangeType
Definition: DataTypes.h:73
V
#define V(_K_, _I_)
Definition: ShapeFunctions.cpp:139
escript::DataTypes::RealVectorType
escript::DataTypes::DataVectorAlt< real_t > RealVectorType
Vector to store underlying data.
Definition: DataVector.h:44
escript::DataAbstract::m_noSamples
int m_noSamples
Definition: DataAbstract.h:569
escript::DataTypes::index_t
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:88
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.
escript::DataTypes::getRelIndex
vec_size_type getRelIndex(const DataTypes::ShapeType &shape, vec_size_type i)
Compute the offset (in 1D vector) of a given subscript with a shape.
Definition: DataTypes.h:262
escript::DataExpanded::getVectorRW
DataTypes::RealVectorType & getVectorRW()
Return a a reference to the underlying DataVector.
Definition: DataExpanded.cpp:1504
escript::DataAbstract
Definition: DataAbstract.h:76
escript::DataExpanded::hermitian
virtual void hermitian(DataAbstract *ev)
Computes an hermitian matrix (A + A*) / 2.
Definition: DataExpanded.cpp:882
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::DataExpanded::hasInf
virtual bool hasInf() const
Return true if data contains Inf or -Inf.
Definition: DataExpanded.cpp:509
escript::FunctionSpace::getTypeCode
int getTypeCode() const
Returns the function space type code.
Definition: FunctionSpace.cpp:95
escript::DataReady::DataReady
DataReady(const FunctionSpace &what, const ShapeType &shape, bool isDataEmpty=false)
Definition: DataReady.cpp:37
DataTagged.h
escript::DataExpanded::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: DataExpanded.cpp:1091
escript::DataAbstract::isComplex
bool isComplex() const
true if the components of datapoints are complex
Definition: DataAbstract.cpp:70
escript::DataExpanded::getLength
virtual DataTypes::RealVectorType::size_type getLength() const
Return the number of doubles stored for the Data.
Definition: DataExpanded.cpp:652
escript::FunctionSpace::borrowSampleReferenceIDs
const DataTypes::dim_t * borrowSampleReferenceIDs() const
Returns a borrowed reference to the list of sample reference IDs.
Definition: FunctionSpace.cpp:199
escript::DataAbstract::getNoValues
unsigned int getNoValues() const
Return the number of values in the shape for this object.
Definition: DataAbstract.h:678
escript::DataExpanded::swapaxes
virtual void swapaxes(DataAbstract *ev, int axis0, int axis1)
swaps components axis0 and axis1
Definition: DataExpanded.cpp:1013
Data.h
DataReady.h
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::WrappedArray::getShape
const DataTypes::ShapeType & getShape() const
Definition: WrappedArray.h:83
ESYS_ASSERT
#define ESYS_ASSERT(a, b)
EsysAssert is a MACRO that will throw an exception if the boolean condition specified is false.
Definition: Assert.h:79
escript::DataAbstract::ShapeType
DataTypes::ShapeType ShapeType
Definition: DataAbstract.h:81
escript::DataExpanded::symmetric
virtual void symmetric(DataAbstract *ev)
Computes a symmetric matrix (A + AT) / 2.
Definition: DataExpanded.cpp:802
escript::DataExpanded::initialise
void initialise(int noSamples, int noDataPointsPerSample, bool cplx)
Common initialisation called from constructors.
Definition: DataExpanded.cpp:405
escript::DataExpanded::~DataExpanded
virtual ~DataExpanded()
Default destructor for DataExpanded.
Definition: DataExpanded.cpp:261
escript::DataExpanded::getVectorRWC
DataTypes::CplxVectorType & getVectorRWC()
Definition: DataExpanded.cpp:1515
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
DataException.h
escript::DataExpanded::m_data_c
DataTypes::CplxVectorType m_data_c
Definition: DataExpanded.h:590
escript::DataTypes::CplxVectorType
escript::DataTypes::DataVectorAlt< cplx_t > CplxVectorType
Definition: DataVector.h:45
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