Go to the documentation of this file.
18 #ifndef __ESCRIPT_FUNCTIONSPACE_H__
19 #define __ESCRIPT_FUNCTIONSPACE_H__
25 #include <boost/python/list.hpp>
41 FunctionSpace(
const FunctionSpace& other);
48 int getTypeCode()
const;
70 int getApproximationOrder()
const;
76 void setTags(
const int newTag,
const escript::Data& mask)
const;
78 void setTagsByString(
const std::string& name,
const escript::Data& mask)
const;
84 std::pair<int,DataTypes::dim_t> getDataShape()
const;
90 bool operator==(
const FunctionSpace& other)
const;
92 bool operator!=(
const FunctionSpace& other)
const;
97 std::string toString()
const;
123 return borrowSampleReferenceIDs()[sampleNo];
132 return m_domain->ownSample(m_functionSpaceType, sampleNo);
166 int getNumDPPSample()
const {
return getNumDataPointsPerSample(); }
169 int getNumDataPointsPerSample()
const {
return getDataShape().first; }
175 int getDim()
const {
return getDomain()->getDim(); }
180 boost::python::list getListOfTags()
const;
185 std::list<int> getListOfTagsSTL()
const;
190 int getNumberOfTagsInUse()
const;
192 const int* borrowListOfTagsInUse()
const;
201 return domain->probeInterpolationOnDomain(
204 return domain->probeInterpolationAcross(
218 int m_functionSpaceType;
225 #endif // __ESCRIPT_FUNCTIONSPACE_H__
DataTypes::dim_t getReferenceIDFromDataPointNo(DataTypes::dim_t dataPointNo) const
Returns the reference number associated with the given data-point number.
Definition: FunctionSpace.cpp:177
#define ESCRIPT_DLL_API
Definition: escriptcore/src/system_dep.h:28
int getTagFromSampleNo(DataTypes::dim_t sampleNo) const
Returns the tag associated with the given sample number.
Definition: FunctionSpace.cpp:142
escript::Data getSize() const
Returns the sample size (e.g. the diameter of elements, radius of particles).
Definition: FunctionSpace.cpp:245
Domain_ptr getDomainPython() const
Return the function space domain. Internal use only! This gets around some python difficulties by cas...
Definition: FunctionSpace.cpp:107
int m_functionSpaceType
Definition: FunctionSpace.h:229
NullDomain provides a null value for domain. Needed for the construction of a default FunctionSpace.
Definition: NullDomain.h:50
std::pair< int, DataTypes::dim_t > getDataShape() const
Returns the shape of the data needed to represent the function space.
Definition: FunctionSpace.cpp:87
DataTypes::dim_t getNumSamples() const
Returns the number of samples.
Definition: FunctionSpace.h:171
boost::shared_ptr< AbstractDomain > Domain_ptr
Definition: AbstractDomain.h:47
FunctionSpace & operator=(const FunctionSpace &other)
Assignment operator. This method is only defined (private) to prevent people from using it.
Definition: FunctionSpace.cpp:205
Definition: FunctionSpace.h:45
std::list< int > getListOfTagsSTL() const
Returns an stl list of the tags used in this function space.
Definition: FunctionSpace.cpp:285
const FunctionSpace & getFunctionSpace() const
Return the function space.
Definition: Data.h:461
bool canTag() const
Returns true if this function space support tags.
Definition: FunctionSpace.cpp:303
const_Domain_ptr getDomain() const
Returns the function space domain.
Definition: FunctionSpace.cpp:101
escript::Data getNormal() const
Returns the surface normal field.
Definition: FunctionSpace.cpp:236
Data represents a collection of datapoints.
Definition: Data.h:62
Definition: DataException.h:37
const_Domain_ptr m_domain
Definition: FunctionSpace.h:227
escript::Data getX() const
Returns the spatial locations of the data points.
Definition: FunctionSpace.cpp:227
index_t dim_t
Definition: DataTypes.h:87
void setTags(const int newTag, const escript::Data &mask) const
Assigns new tag newTag to all samples with a positive value of mask for any of its sample points.
Definition: FunctionSpace.cpp:254
int getNumDPPSample() const
Returns the number of data points per sample.
Definition: FunctionSpace.h:177
int getApproximationOrder() const
Returns the approximation order used for this function space.
Definition: FunctionSpace.cpp:309
boost::python::list getListOfTags() const
Returns a list of the tags used in this function space.
Definition: FunctionSpace.cpp:293
Definition: FunctionSpaceException.h:38
const int * borrowListOfTagsInUse() const
Definition: FunctionSpace.cpp:280
bool canInterpolate(FunctionSpace src, FunctionSpace dest)
Definition: FunctionSpace.cpp:32
Definition: AbstractContinuousDomain.cpp:22
void setTagsByString(const std::string &name, const escript::Data &mask) const
Definition: FunctionSpace.cpp:264
int getTypeCode() const
Returns the function space type code.
Definition: FunctionSpace.cpp:93
std::string toString() const
Returns a text description of the function space.
Definition: FunctionSpace.cpp:116
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:96
const DataTypes::dim_t * borrowSampleReferenceIDs() const
Returns a borrowed reference to the list of sample reference IDs.
Definition: FunctionSpace.cpp:197
bool operator!=(const FunctionSpace &other) const
Definition: FunctionSpace.cpp:221
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:60
boost::shared_ptr< const AbstractDomain > const_Domain_ptr
Definition: AbstractDomain.h:50
FunctionSpace()
Definition: FunctionSpace.cpp:45
void setProtection()
switches on update protection
Definition: Data.cpp:1169
bool operator==(const FunctionSpace &other) const
Comparison operator. Returns true if function spaces are equal. (i.e. same domain and same function s...
Definition: FunctionSpace.cpp:215
int getNumberOfTagsInUse() const
Returns the number of tags in use.
Definition: FunctionSpace.cpp:275
int getTagFromDataPointNo(DataTypes::dim_t dataPointNo) const
Returns the tag associated with the given data-point number.
Definition: FunctionSpace.cpp:148