18 #if !defined escript_DataC_20040611_H 19 #define escript_DataC_20040611_H 40 #define updateFunctionSpaceType(_FS,_DATA) _FS=(isEmpty(_DATA) ? _FS : getFunctionSpaceType(_DATA)) 48 #define functionSpaceTypeEqual(_FS,_DATA) ( (isEmpty(_DATA) || _FS==getFunctionSpaceType(_DATA)) ) ? 1 : 0 int getDataPointShape(const escript::Data *data, int i)
Returns the value of the i-th component of the shape of the point data.
Definition: DataC.cpp:72
double const * getSampleDataROFast(const escript::Data *data, int sampleNo)
Return a pointer to the data for the given sample number. Fast version of getSampledataRO: does no er...
Definition: DataC.cpp:145
double const * getSampleDataRO(const escript::Data *data, int sampleNo)
Return a pointer to the data for the given sample number. if data is empty NULL is returned...
Definition: DataC.cpp:119
int getFunctionSpaceType(const escript::Data *data)
Return the function space type code.
Definition: DataC.cpp:25
double * getSampleDataRWFast(escript::Data *data, int sampleNo)
Return a pointer to the data for the given sample number. Fast version of getSampledataRW: does no er...
Definition: DataC.cpp:150
void requireWrite(escript::Data *data)
Ensure that this object is ready for writing. It will be resolved and copied if it is currently share...
Definition: DataC.cpp:167
double * getDataRW(escript::Data *data)
Return getSampleDataRWFast(escriptDataC* data, 0) if there are samples. if not, returns NULL...
Definition: DataC.cpp:155
int numSamplesEqual(const escript::Data *data, int numDataPointsPerSample, dim_t numSamples)
Return true if the number of data points per sample and the number of samples equal the input values...
Definition: DataC.cpp:53
int getDataPointSize(const escript::Data *data)
Return the number of doubles needed for each data point.
Definition: DataC.cpp:87
double * getSampleDataRW(escript::Data *data, int sampleNo)
Definition: DataC.cpp:132
int getNumDataPointsPerSample(const escript::Data *data)
Returns the number of data points per sample.
Definition: DataC.cpp:40
int isExpanded(const escript::Data *data)
Return true if data can be treated as expanded.
Definition: DataC.cpp:97
Data represents a collection of datapoints.
Definition: Data.h:68
int getDataPointRank(const escript::Data *data)
Returns the rank of the point data for the data.
Definition: DataC.cpp:63
int isEmpty(const escript::Data *data)
Returns the true if the data are empty or data is NULL.
Definition: DataC.cpp:110
#define ESCRIPT_DLL_API
Definition: escriptcore/src/system_dep.h:54
index_t dim_t
Definition: types.h:27
int isDataPointShapeEqual(const escript::Data *data, int rank, const int *dimensions)
Return true if the input shape matches the data point shape for data.
Definition: DataC.cpp:31