18 #if !defined escript_DataAbstract_20040315_H 19 #define escript_DataAbstract_20040315_H 25 #include <boost/scoped_ptr.hpp> 83 DataAbstract_ptr getPtr();
84 const_DataAbstract_ptr getPtr()
const;
96 DataAbstract(
const FunctionSpace& what,
const ShapeType& shape,
bool isDataEmpty=
false);
111 toString()
const = 0;
133 dump(
const std::string fileName)
const;
140 getNumDPPSample()
const;
147 getNumSamples()
const;
177 getPointOffset(
int sampleNo,
178 int dataPointNo)
const = 0;
182 getPointOffset(
int sampleNo,
183 int dataPointNo) = 0;
201 getSampleDataByTag(
int tag);
222 operandCheck(
const DataAbstract& right)
const;
229 validSamplePointNo(
int samplePointNo)
const;
236 validSampleNo(
int sampleNo)
const;
245 getFunctionSpace()
const;
278 setTaggedValue(
int tagKey,
296 copyToDataPoint(
const int sampleNo,
const int dataPointNo,
const double value);
307 copyToDataPoint(
const int sampleNo,
const int dataPointNo,
const WrappedArray& value);
319 getTagNumber(
int dpno);
349 trace(DataAbstract* ev,
int axis_offset);
359 transpose(DataAbstract* ev,
int axis_offset);
370 swapaxes(DataAbstract* ev,
int axis0,
int axis1);
387 matrixInverse(DataAbstract* out)
const;
418 reorderByReferenceIDs(
dim_t *reference_ids);
475 return m_lazyshared || (m_owners.size()>1);
479 bool exclusivewritecalled;
492 bool checkNoSharing()
const;
557 return ((0 <= sampleNo) && (sampleNo <
m_noSamples));
566 throw DataException(
"Error - Operations (getNumDPPSample) not permitted on instances of DataEmpty.");
577 throw DataException(
"Error - Operations (getNumSamples) not permitted on instances of DataEmpty.");
596 throw DataException(
"Error - Operations (getShape) not permitted on instances of DataEmpty.");
607 throw DataException(
"Error - Operations (getRank) not permitted on instances of DataEmpty.");
618 throw DataException(
"Error - Operations (getNoValues) not permitted on instances of DataEmpty.");
Definition: FunctionSpace.h:34
DataVector implements an arbitrarily long vector of data values. DataVector is the underlying data co...
Definition: DataVector.h:44
#define POINTER_WRAPPER_CLASS(x)
Definition: Pointers.h:32
DataTypes::ShapeType ShapeType
Definition: DataAbstract.h:67
boost::shared_ptr< const DataAbstract > const_DataAbstract_ptr
Definition: DataAbstract.h:54
Definition: DataReady.h:35
bool isShared() const
Is this object owned by more than one Data object.
Definition: DataAbstract.h:473
std::vector< std::pair< int, int > > RegionType
Definition: DataTypes.h:39
Definition: AbstractContinuousDomain.cpp:24
int getLength(const escript::Data *data)
Definition: DataC.cpp:92
boost::shared_ptr< const DataReady > const_DataReady_ptr
Definition: DataAbstract.h:59
int m_noDataPointsPerSample
Definition: DataAbstract.h:515
bool validSampleNo(int sampleNo) const
Return true if a valid sample number.
Definition: DataAbstract.h:555
void transpose(const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset, int axis_offset)
Transpose each data point of this Data object around the given axis.
Definition: DataMaths.h:394
virtual bool isTagged() const
Definition: DataAbstract.h:452
bool m_lazyshared
Definition: DataAbstract.h:504
DataTypes::ShapeType m_shape
Definition: DataAbstract.h:524
#define REFCOUNT_BASE_CLASS(x)
Definition: Pointers.h:29
std::vector< int > ShapeType
The shape of a single datapoint.
Definition: DataTypes.h:38
void swapaxes(const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset, int axis0, int axis1)
swaps the components axis0 and axis1.
Definition: DataMaths.h:538
boost::shared_ptr< DataAbstract > DataAbstract_ptr
Definition: DataAbstract.h:51
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:448
void eigenvalues(const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset)
solves a local eigenvalue problem
Definition: DataMaths.h:689
void symmetric(const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset)
computes a symmetric matrix from your square matrix A: (A + transpose(A)) / 2
Definition: DataMaths.h:197
int isEmpty(const escript::Data *data)
Returns the true if the data are empty or data is NULL.
Definition: DataC.cpp:110
unsigned int getNoValues() const
Return the number of values in the shape for this object.
Definition: DataAbstract.h:614
bool validSamplePointNo(int samplePointNo) const
Return true if a valid sample point number.
Definition: DataAbstract.h:548
virtual bool isExpanded() const
Definition: DataAbstract.h:438
Typedefs and macros for reference counted storage.
unsigned int m_novalues
Definition: DataAbstract.h:528
int getNumDPPSample() const
Return the number of data points per sample.
Definition: DataAbstract.h:562
bool m_isempty
Definition: DataAbstract.h:536
Data represents a collection of datapoints.
Definition: Data.h:68
void eigenvalues_and_eigenvectors(const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset, DataTypes::ValueType &V, const DataTypes::ShapeType &VShape, DataTypes::ValueType::size_type VOffset, const double tol=1.e-13)
solves a local eigenvalue problem
Definition: DataMaths.h:750
#define V(_K_, _I_)
Definition: ShapeFunctions.cpp:120
int getNumSamples() const
Return the number of samples.
Definition: DataAbstract.h:573
const DataTypes::ShapeType & getShape() const
Return the shape information for the point data.
Definition: DataAbstract.h:592
Wraps an expression tree of other DataObjects. The data will be evaluated when required.
Definition: DataLazy.h:102
int m_noSamples
Definition: DataAbstract.h:510
DataException exception class.
Definition: DataException.h:35
#define ESCRIPT_DLL_API
Definition: escriptcore/src/system_dep.h:54
bool isEmpty() const
Definition: DataAbstract.h:541
index_t dim_t
Definition: types.h:27
Definition: DataAbstract.h:61
const FunctionSpace & getFunctionSpace() const
Return the function space associated with this Data object.
Definition: DataAbstract.h:585
void nonsymmetric(const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset)
computes a nonsymmetric matrix from your square matrix A: (A - transpose(A)) / 2
Definition: DataMaths.h:246
unsigned int m_rank
Definition: DataAbstract.h:532
int getRank(const DataTypes::ShapeType &shape)
Return the rank (number of dimensions) of the given shape.
Definition: DataTypes.h:167
boost::shared_ptr< DataReady > DataReady_ptr
Definition: DataAbstract.h:56
long size_type
Definition: DataVector.h:60
Definition: WrappedArray.h:29
unsigned int getRank() const
Return the rank information for the point data.
Definition: DataAbstract.h:603
FunctionSpace m_functionSpace
Definition: DataAbstract.h:520
virtual bool isConstant() const
Definition: DataAbstract.h:434
DataTypes::ValueType ValueType
Definition: DataAbstract.h:66
std::vector< Data * > m_owners
Definition: DataAbstract.h:503
void trace(const DataTypes::ValueType &in, const DataTypes::ShapeType &inShape, DataTypes::ValueType::size_type inOffset, DataTypes::ValueType &ev, const DataTypes::ShapeType &evShape, DataTypes::ValueType::size_type evOffset, int axis_offset)
computes the trace of a matrix
Definition: DataMaths.h:295