17 #ifndef __ESCRIPT_DATAABSTRACT_H__ 18 #define __ESCRIPT_DATAABSTRACT_H__ 25 #include <boost/scoped_ptr.hpp> 82 DataAbstract_ptr getPtr();
83 const_DataAbstract_ptr getPtr()
const;
110 toString()
const = 0;
117 deepCopy()
const =0 ;
132 dump(
const std::string fileName)
const;
139 getNumDPPSample()
const;
146 getNumSamples()
const;
151 return getNumSamples()==0;
182 getPointOffset(
int sampleNo,
183 int dataPointNo)
const = 0;
193 getLength()
const = 0;
238 validSamplePointNo(
int samplePointNo)
const;
245 validSampleNo(
int sampleNo)
const;
254 getFunctionSpace()
const;
287 setTaggedValue(
int tagKey,
294 setTaggedValue(
int tagKey,
311 copyToDataPoint(
const int sampleNo,
const int dataPointNo,
const DataTypes::real_t value);
314 copyToDataPoint(
const int sampleNo,
const int dataPointNo,
const DataTypes::cplx_t value);
325 copyToDataPoint(
const int sampleNo,
const int dataPointNo,
const WrappedArray& value);
337 getTagNumber(
int dpno);
492 bool isEmpty()
const;
497 bool isComplex()
const;
499 #ifdef SLOWSHARECHECK 510 #pragma omp critical // because two treads could try 514 shared=shared_from_this().use_count()>2;
525 bool exclusivewritecalled;
536 virtual void complicate();
589 return ((0 <= samplePointNo) && (samplePointNo < m_noDataPointsPerSample));
596 return ((0 <= sampleNo) && (sampleNo < m_noSamples));
605 throw DataException(
"Error - Operations (getNumDPPSample) not permitted on instances of DataEmpty.");
607 return m_noDataPointsPerSample;
616 throw DataException(
"Error - Operations (getNumSamples) not permitted on instances of DataEmpty.");
626 return m_functionSpace;
635 throw DataException(
"Error - Operations (getShape) not permitted on instances of DataEmpty.");
646 throw DataException(
"Error - Operations (getRank) not permitted on instances of DataEmpty.");
657 throw DataException(
"Error - Operations (getNoValues) not permitted on instances of DataEmpty.");
664 #endif // __ESCRIPT_DATAABSTRACT_H__ Definition: FunctionSpace.h:34
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:638
#define POINTER_WRAPPER_CLASS(x)
Definition: Pointers.h:32
DataTypes::ShapeType ShapeType
Definition: DataAbstract.h:66
boost::shared_ptr< const DataAbstract > const_DataAbstract_ptr
Definition: DataAbstract.h:54
unsigned int getRank() const
Return the rank information for the point data.
Definition: DataAbstract.h:642
bool isEmpty() const
Definition: DataAbstract.h:580
Definition: DataReady.h:35
DataTypes::vec_size_type size_type
Definition: DataVectorAlt.h:49
virtual bool isExpanded() const
Definition: DataAbstract.h:476
virtual bool actsExpanded() const
Return true if this Data is expanded or resolves to expanded. That is, if it has a separate value for...
Definition: DataAbstract.h:486
std::vector< std::pair< int, int > > RegionType
Definition: DataTypes.h:43
Definition: AbstractContinuousDomain.cpp:22
boost::shared_ptr< const DataReady > const_DataReady_ptr
Definition: DataAbstract.h:59
int m_noDataPointsPerSample
Definition: DataAbstract.h:549
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:342
DataTypes::ShapeType m_shape
Definition: DataAbstract.h:563
#define REFCOUNT_BASE_CLASS(x)
Definition: Pointers.h:30
bool hasNoSamples() const
Definition: DataAbstract.h:149
std::vector< int > ShapeType
The shape of a single datapoint.
Definition: DataTypes.h:42
boost::shared_ptr< DataAbstract > DataAbstract_ptr
Definition: DataAbstract.h:51
bool validSampleNo(int sampleNo) const
Return true if a valid sample number.
Definition: DataAbstract.h:594
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:102
Typedefs and macros for reference counted storage.
const DataTypes::ShapeType & getShape() const
Return the shape information for the point data.
Definition: DataAbstract.h:631
int getNumSamples() const
Return the number of samples.
Definition: DataAbstract.h:612
int getNumDPPSample() const
Return the number of data points per sample.
Definition: DataAbstract.h:601
bool validSamplePointNo(int samplePointNo) const
Return true if a valid sample point number.
Definition: DataAbstract.h:587
unsigned int m_novalues
Definition: DataAbstract.h:567
bool m_isempty
Definition: DataAbstract.h:575
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:915
bool m_iscompl
Definition: DataAbstract.h:553
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:487
virtual bool isConstant() const
Definition: DataAbstract.h:472
#define V(_K_, _I_)
Definition: ShapeFunctions.cpp:120
Wraps an expression tree of other DataObjects. The data will be evaluated when required.
Definition: DataLazy.h:47
std::complex< real_t > cplx_t
complex data type
Definition: DataTypes.h:53
int m_noSamples
Definition: DataAbstract.h:544
Definition: DataException.h:26
#define ESCRIPT_DLL_API
Definition: escriptcore/src/system_dep.h:29
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:241
unsigned int getNoValues() const
Return the number of values in the shape for this object.
Definition: DataAbstract.h:653
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:151
Definition: DataAbstract.h:61
const FunctionSpace & getFunctionSpace() const
Return the function space associated with this Data object.
Definition: DataAbstract.h:624
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:746
unsigned int m_rank
Definition: DataAbstract.h:571
int getRank(const DataTypes::ShapeType &shape)
Return the rank (number of dimensions) of the given shape.
Definition: DataTypes.h:218
boost::shared_ptr< DataReady > DataReady_ptr
Definition: DataAbstract.h:56
Definition: WrappedArray.h:31
FunctionSpace m_functionSpace
Definition: DataAbstract.h:559
virtual bool isTagged() const
Definition: DataAbstract.h:490
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:962
double real_t
type of all real-valued scalars in escript
Definition: DataTypes.h:50
index_t dim_t
Definition: DataTypes.h:64