Go to the documentation of this file.
19 #if !defined escript_DataFactory_20040721_H
20 #define escript_DataFactory_20040721_H
28 #include <boost/python/object.hpp>
50 const FunctionSpace& what=FunctionSpace(),
65 const FunctionSpace& what=FunctionSpace(),
80 const FunctionSpace& what=FunctionSpace(),
95 const FunctionSpace& what=FunctionSpace(),
104 const FunctionSpace& what=FunctionSpace(),
105 bool expanded=
false);
113 const FunctionSpace& what=FunctionSpace(),
114 bool expanded=
false);
123 const FunctionSpace& what=FunctionSpace(),
124 bool expanded=
false);
128 const FunctionSpace& what=FunctionSpace(),
129 bool expanded=
false);
135 bool expanded=
false);
141 bool expanded=
false);
150 bool expanded=
false);
155 bool expanded=
false);
161 bool expanded=
false);
167 bool expanded=
false);
177 bool expanded=
false);
182 bool expanded=
false);
188 bool expanded=
false);
194 bool expanded=
false);
204 bool expanded=
false);
209 bool expanded=
false);
215 bool expanded=
false);
221 bool expanded=
false);
227 bool expanded=
false);
234 load(
const std::string fileName,
Data ComplexVector(double value, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:131
Data Tensor3C(DataTypes::cplx_t value, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:270
static const int maxRank
The maximum number of dimensions a datapoint can have.
Definition: DataTypes.h:47
Data ComplexScalar(double value, const FunctionSpace &what, bool expanded)
Return a Complex Data object containing scalar data-points. ie: rank 0 data-points.
Definition: DataFactory.cpp:63
#define ESCRIPT_DLL_API
Definition: escriptcore/src/system_dep.h:30
Data ComplexTensor3C(DataTypes::cplx_t value, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:276
DataAbstract * borrowData(void) const
return the object produced by the factory, which is a DataConstant or DataExpanded TODO Ownership of ...
Definition: Data.cpp:4617
double real_t
type of all real-valued scalars in escript
Definition: DataTypes.h:52
Data Tensor4FromObj(bp::object o, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:363
bool loadConfigured()
returns true if the load funtion is configured.
Definition: DataFactory.cpp:918
virtual void reorderByReferenceIDs(DataTypes::dim_t *reference_ids)
reorders data sample ordered by reference_ids to the ordering of the functions space
Definition: DataAbstract.cpp:276
DataTypes::dim_t getNumSamples() const
Returns the number of samples.
Definition: FunctionSpace.h:168
Data ComplexTensorFromObj(bp::object o, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:230
Data ComplexVectorFromObj(bp::object o, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:157
const DataTypes::ShapeType & getDataPointShape() const
Return a reference to the data point shape.
Definition: Data.h:705
Domain_ptr getPtr()
Returns smart pointer which is managing this object. If one does not exist yet it creates one.
Definition: AbstractDomain.cpp:25
Definition: DataVectorAlt.h:37
Data ScalarFromObj(boost::python::object o, const FunctionSpace &what, bool expanded)
Python interface for the Scalar factory.
Definition: DataFactory.cpp:82
Data TensorFromObj(bp::object o, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:205
DataTypes::RealVectorType::reference getDataAtOffsetRW(DataTypes::RealVectorType::size_type i, DataTypes::real_t dummy)
Definition: Data.cpp:4678
virtual JMPI getMPI() const =0
returns a shared pointer to the MPI information wrapper for this domain
bool checkResult(int res, int &mres, const JMPI &info)
Everyone puts in their error code and everyone gets the largest one.
Definition: EsysMPI.cpp:110
Definition: FunctionSpace.h:36
void complicate()
Definition: Data.cpp:6053
const_Domain_ptr getDomain() const
Returns the function space domain.
Definition: FunctionSpace.cpp:103
Data ComplexTensor4(double value, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:341
Data convertToData(const bp::object &value, const FunctionSpace &what)
Definition: DataFactory.cpp:927
Data Scalar(DataTypes::cplx_t value, const FunctionSpace &what, bool expanded)
Return a Data object containing scalar data-points. ie: rank 0 data-points.
Definition: DataFactory.cpp:56
Simulates a full dataset accessible via sampleNo and dataPointNo.
Definition: DataTagged.h:46
Data represents a collection of datapoints.
Definition: Data.h:64
DataTypes::RealVectorType::size_type getDataOffset(int sampleNo, int dataPointNo)
Return the offset for the given sample and point within the sample.
Definition: Data.h:693
Definition: DataException.h:28
int getNumDataPointsPerSample() const
Definition: FunctionSpace.h:177
Data ComplexTensorC(DataTypes::cplx_t value, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:196
index_t dim_t
Definition: DataTypes.h:66
std::vector< int > ShapeType
The shape of a single datapoint.
Definition: DataTypes.h:44
boost::shared_ptr< JMPI_ > JMPI
Definition: EsysMPI.h:74
virtual bool isValidFunctionSpaceType(int functionSpaceType) const =0
Returns true if the given integer is a valid function space type for this domain.
Data ComplexScalar(DataTypes::cplx_t value, const FunctionSpace &what, bool expanded)
Return a Data object containing scalar data-points. ie: rank 0 data-points.
Definition: DataFactory.cpp:72
bool isEmpty() const
Definition: Data.cpp:1132
Data ComplexData(boost::python::object o, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:414
Data Tensor3(double value, const FunctionSpace &what, bool expanded)
Return a Data object containing tensor3 datapoints. ie: rank 3 data-points.
Definition: DataFactory.cpp:256
Data ComplexTensor4C(DataTypes::cplx_t value, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:355
escript::DataTypes::DataVectorAlt< real_t > RealVectorType
Vector to store underlying data.
Definition: DataVector.h:44
Data load(const std::string fileName, const AbstractDomain &domain)
reads Data on domain from file in netCDF format
Definition: DataFactory.cpp:708
Data Tensor4C(DataTypes::cplx_t value, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:349
Definition: AbstractContinuousDomain.cpp:23
Data ComplexTensor3(double value, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:262
Data Tensor(double value, const FunctionSpace &what, bool expanded)
Return a Data object containing tensor datapoints. ie: rank 2 data-points.
Definition: DataFactory.cpp:176
Data Vector(double value, const FunctionSpace &what, bool expanded)
Return a Data object containing vector data-points. ie: rank 1 data-points.
Definition: DataFactory.cpp:125
Data ComplexTensor3FromObj(bp::object o, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:309
virtual const char * what() const
Returns a description of the exception.
Definition: EsysException.h:57
Data TensorC(DataTypes::cplx_t value, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:190
const DataTypes::dim_t * borrowSampleReferenceIDs() const
Returns a borrowed reference to the list of sample reference IDs.
Definition: FunctionSpace.cpp:199
Data ComplexScalarFromObj(boost::python::object o, const FunctionSpace &what, bool expanded)
Python interface for the Complex Scalar factory.
Definition: DataFactory.cpp:104
Data VectorFromObj(bp::object o, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:139
Base class for all escript domains.
Definition: AbstractDomain.h:51
Data Tensor3FromObj(bp::object o, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:284
bool shipString(const char *src, char **dest, MPI_Comm &comm)
Definition: EsysMPI.cpp:164
std::complex< real_t > cplx_t
complex data type
Definition: DataTypes.h:55
Data Scalar(double value, const FunctionSpace &what, bool expanded)
A collection of factory functions for creating Data objects which contain data points of various shap...
Definition: DataFactory.cpp:49
Data ComplexTensor4FromObj(bp::object o, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:388
Data Tensor4(double value, const FunctionSpace &what, bool expanded)
Return a Data object containing tensor4 datapoints. ie: rank 4 data-points.
Definition: DataFactory.cpp:335
Data ComplexTensor(double value, const FunctionSpace &what, bool expanded)
Definition: DataFactory.cpp:182