escript::FunctionSpace Class Reference

`#include <FunctionSpace.h>`

## Public Member Functions

| FunctionSpace ()
| FunctionSpace (const_Domain_ptr domain, int functionSpaceType)
| FunctionSpace (const FunctionSpace &other)
int | getTypeCode () const
| Returns the function space type code. More...
const_Domain_ptr | getDomain () const
| Returns the function space domain. More...
Domain_ptr | getDomainPython () const
| Return the function space domain. Internal use only! This gets around some python difficulties by casting away the const. Do not use this in C++. More...
bool | canTag () const
| Returns true if this function space support tags. More...
int | getApproximationOrder () const
| Returns the approximation order used for this function space. More...
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. More...
void | setTagsByString (const std::string &name, const escript::Data &mask) const
std::pair< int, DataTypes::dim_t > | getDataShape () const
| Returns the shape of the data needed to represent the function space. More...
bool | operator== (const FunctionSpace &other) const
| Comparison operator. Returns true if function spaces are equal. (i.e. same domain and same function space type) More...
bool | operator!= (const FunctionSpace &other) const
std::string | toString () const
| Returns a text description of the function space. More...
int | getTagFromSampleNo (DataTypes::dim_t sampleNo) const
| Returns the tag associated with the given sample number. More...
int | getTagFromDataPointNo (DataTypes::dim_t dataPointNo) const
| Returns the tag associated with the given data-point number. More...
DataTypes::dim_t | getReferenceIDFromDataPointNo (DataTypes::dim_t dataPointNo) const
| Returns the reference number associated with the given data-point number. More...
DataTypes::dim_t | getReferenceIDOfSample (DataTypes::dim_t sampleNo) const
| Returns the reference number associated with the given sample number. This function is not efficient. It is better to first call `borrowSampleReferenceIDs` and then when iterating over sampleNo to use sampleNo as an offset. More...
bool | ownSample (DataTypes::dim_t sampleNo) const
| Does this process own the sample? For non-MPI builds will always return true. More...
const DataTypes::dim_t * | borrowSampleReferenceIDs () const
| Returns a borrowed reference to the list of sample reference IDs. More...
escript::Data | getX () const
| Returns the spatial locations of the data points. More...
escript::Data | getNormal () const
| Returns the surface normal field. More...
escript::Data | getSize () const
| Returns the sample size (e.g. the diameter of elements, radius of particles). More...
DataTypes::dim_t | getNumSamples () const
| Returns the number of samples. More...
int | getNumDPPSample () const
| Returns the number of data points per sample. More...
int | getNumDataPointsPerSample () const
int | getDim () const
| Return the number of spatial dimensions of the underlying domain. More...
boost::python::list | getListOfTags () const
| Returns a list of the tags used in this function space. More...
std::list< int > | getListOfTagsSTL () const
| Returns an stl list of the tags used in this function space. More...
int | getNumberOfTagsInUse () const
| Returns the number of tags in use. More...
const int * | borrowListOfTagsInUse () const
bool | probeInterpolation (const FunctionSpace &other) const

## Private Member Functions

FunctionSpace & | operator= (const FunctionSpace &other)
| Assignment operator. This method is only defined (private) to prevent people from using it. More...

## Private Attributes

const_Domain_ptr | m_domain
int | m_functionSpaceType

## Constructor & Destructor Documentation

## FunctionSpace() [1/3]

escript::FunctionSpace::FunctionSpace | ( |  | ) |

## FunctionSpace() [2/3]

escript::FunctionSpace::FunctionSpace | ( | const_Domain_ptr | domain,
|  | int | functionSpaceType
| ) |  |

References m_domain.

## FunctionSpace() [3/3]

escript::FunctionSpace::FunctionSpace | ( | const FunctionSpace & | other | ) |

## Member Function Documentation

## borrowListOfTagsInUse()

const int * escript::FunctionSpace::borrowListOfTagsInUse | ( |  | ) | const

References m_domain, and m_functionSpaceType.

Referenced by getListOfTags(), getListOfTagsSTL(), and escript::DataTagged::toString().

## borrowSampleReferenceIDs()

const DataTypes::dim_t * escript::FunctionSpace::borrowSampleReferenceIDs | ( |  | ) | const

Returns a borrowed reference to the list of sample reference IDs.

References m_domain, and m_functionSpaceType.

Referenced by escript::DataExpanded::dump(), getReferenceIDFromDataPointNo(), weipa::DataVar::initFromEscript(), and escript::load().

## canTag()

bool escript::FunctionSpace::canTag | ( |  | ) | const

Returns true if this function space support tags.

References m_domain, and m_functionSpaceType.

Referenced by escript::DataTagged::DataTagged().

## getApproximationOrder()

int escript::FunctionSpace::getApproximationOrder | ( |  | ) | const

Returns the approximation order used for this function space.

References m_domain, and m_functionSpaceType.

Referenced by BOOST_PYTHON_MODULE().

## getDataShape()

std::pair< int, DataTypes::dim_t > escript::FunctionSpace::getDataShape | ( |  | ) | const

Returns the shape of the data needed to represent the function space.

References m_domain, and m_functionSpaceType.

## getDim()

int escript::FunctionSpace::getDim | ( |  | ) | const

inline

Return the number of spatial dimensions of the underlying domain.

Referenced by BOOST_PYTHON_MODULE(), ripley::readBinaryGrid(), speckley::readBinaryGrid(), ripley::readBinaryGridFromZipped(), speckley::readBinaryGridFromZipped(), ripley::readNcGrid(), and speckley::readNcGrid().

## getDomain()

const_Domain_ptr escript::FunctionSpace::getDomain | ( |  | ) | const

Returns the function space domain.

References m_domain.

Referenced by escript::canInterpolate(), escript::ComplexData(), escript::ComplexTensor(), escript::ComplexTensor3(), escript::ComplexTensor3C(), escript::ComplexTensor3FromObj(), escript::ComplexTensor4(), escript::ComplexTensor4C(), escript::ComplexTensor4FromObj(), escript::ComplexTensorC(), escript::ComplexTensorFromObj(), escript::ComplexVector(), escript::ComplexVectorFromObj(), getNormal(), getSize(), getX(), dudley::DudleyDomain::interpolateOnDomain(), escript::NullDomain::interpolateOnDomain(), escript::TestDomain::interpolateOnDomain(), finley::FinleyDomain::interpolateOnDomain(), ripley::RipleyDomain::interpolateOnDomain(), speckley::SpeckleyDomain::interpolateOnDomain(), dudley::DudleyDomain::newSystemMatrix(), finley::FinleyDomain::newSystemMatrix(), ripley::RipleyDomain::newSystemMatrix(), dudley::DudleyDomain::newTransportProblem(), finley::FinleyDomain::newTransportProblem(), ripley::RipleyDomain::newTransportProblem(), probeInterpolation(), ripley::readBinaryGrid(), speckley::readBinaryGrid(), ripley::readBinaryGridFromZipped(), speckley::readBinaryGridFromZipped(), ripley::readNcGrid(), speckley::readNcGrid(), dudley::DudleyDomain::setNewX(), finley::FinleyDomain::setNewX(), escript::Data::setTaggedValueByName(), dudley::DudleyDomain::setToGradient(), finley::FinleyDomain::setToGradient(), ripley::RipleyDomain::setToGradient(), speckley::SpeckleyDomain::setToGradient(), dudley::DudleyDomain::setToIntegralsWorker(), finley::FinleyDomain::setToIntegralsWorker(), ripley::RipleyDomain::setToIntegralsWorker(), speckley::SpeckleyDomain::setToIntegralsWorker(), dudley::DudleyDomain::setToNormal(), finley::FinleyDomain::setToNormal(), dudley::DudleyDomain::setToX(), finley::FinleyDomain::setToX(), ripley::RipleyDomain::setToX(), speckley::SpeckleyDomain::setToX(), escript::Tensor(), escript::Tensor3(), escript::Tensor3C(), escript::Tensor3FromObj(), escript::Tensor4(), escript::Tensor4C(), escript::Tensor4FromObj(), escript::TensorC(), escript::TensorFromObj(), escript::Vector(), and escript::VectorFromObj().

## getDomainPython()

Domain_ptr escript::FunctionSpace::getDomainPython | ( |  | ) | const

Return the function space domain. Internal use only! This gets around some python difficulties by casting away the const. Do not use this in C++.

References m_domain.

Referenced by BOOST_PYTHON_MODULE().

## getListOfTags()

boost::python::list escript::FunctionSpace::getListOfTags | ( |  | ) | const

Returns a list of the tags used in this function space.

References borrowListOfTagsInUse(), and getNumberOfTagsInUse().

Referenced by BOOST_PYTHON_MODULE().

## getListOfTagsSTL()

std::list< int > escript::FunctionSpace::getListOfTagsSTL | ( |  | ) | const

Returns an stl list of the tags used in this function space.

References borrowListOfTagsInUse(), and getNumberOfTagsInUse().

Referenced by escript::Data::reduction().

## getNormal()

escript::Data escript::FunctionSpace::getNormal | ( |  | ) | const

Returns the surface normal field.

References getDomain(), escript::Data::setProtection(), and escript::Vector().

Referenced by BOOST_PYTHON_MODULE(), dudley::DudleyDomain::getNormal(), finley::FinleyDomain::getNormal(), and ripley::RipleyDomain::getNormal().

## getNumberOfTagsInUse()

int escript::FunctionSpace::getNumberOfTagsInUse | ( |  | ) | const

Returns the number of tags in use.

References m_domain, and m_functionSpaceType.

Referenced by getListOfTags(), getListOfTagsSTL(), and escript::DataTagged::toString().

## getNumDataPointsPerSample()

int escript::FunctionSpace::getNumDataPointsPerSample | ( |  | ) | const

inline

Referenced by escript::DataExpanded::dump(), and escript::load().

## getNumDPPSample()

int escript::FunctionSpace::getNumDPPSample | ( |  | ) | const

inline

Returns the number of data points per sample.

Referenced by escript::DataExpanded::DataExpanded(), getReferenceIDFromDataPointNo(), and getTagFromDataPointNo().

## getNumSamples()

DataTypes::dim_t escript::FunctionSpace::getNumSamples | ( |  | ) | const

inline

Returns the number of samples.

Referenced by escript::DataExpanded::DataExpanded(), escript::DataExpanded::dump(), getReferenceIDFromDataPointNo(), getTagFromDataPointNo(), escript::load(), and escript::DataLazy::resolveGroupWorker().

## getReferenceIDFromDataPointNo()

DataTypes::dim_t escript::FunctionSpace::getReferenceIDFromDataPointNo | ( | DataTypes::dim_t | dataPointNo | ) | const

Returns the reference number associated with the given data-point number.

References borrowSampleReferenceIDs(), getNumDPPSample(), and getNumSamples().

Referenced by BOOST_PYTHON_MODULE().

## getReferenceIDOfSample()

DataTypes::dim_t escript::FunctionSpace::getReferenceIDOfSample | ( | DataTypes::dim_t | sampleNo | ) | const

inline

Returns the reference number associated with the given sample number. This function is not efficient. It is better to first call `borrowSampleReferenceIDs` and then when iterating over sampleNo to use sampleNo as an offset.

Referenced by escript::DataExpanded::reorderByReferenceIDs(), escript::saveDataCSV(), and escript::DataExpanded::toString().

## getSize()

escript::Data escript::FunctionSpace::getSize | ( |  | ) | const

Returns the sample size (e.g. the diameter of elements, radius of particles).

References getDomain(), escript::Scalar(), and escript::Data::setProtection().

Referenced by BOOST_PYTHON_MODULE(), dudley::DudleyDomain::getSize(), finley::FinleyDomain::getSize(), ripley::RipleyDomain::getSize(), and speckley::SpeckleyDomain::getSize().

## getTagFromDataPointNo()

int escript::FunctionSpace::getTagFromDataPointNo | ( | DataTypes::dim_t | dataPointNo | ) | const

Returns the tag associated with the given data-point number.

References getNumDPPSample(), getNumSamples(), and getTagFromSampleNo().

Referenced by BOOST_PYTHON_MODULE().

## getTagFromSampleNo()

int escript::FunctionSpace::getTagFromSampleNo | ( | DataTypes::dim_t | sampleNo | ) | const

Returns the tag associated with the given sample number.

References m_domain, and m_functionSpaceType.

Referenced by escript::DataTagged::getPointOffset(), getTagFromDataPointNo(), and escript::DataTagged::getTagNumber().

## getTypeCode()

int escript::FunctionSpace::getTypeCode | ( |  | ) | const

Returns the function space type code.

Note
  The meaning of the code depends on the domain object the FunctionSpace is built on.

References m_functionSpaceType.

Referenced by dudley::Assemble_CopyNodalData(), finley::Assemble_CopyNodalData(), finley::Assemble_getNormal(), finley::Assemble_getSize(), dudley::Assemble_gradient(), finley::Assemble_gradient(), finley::Assemble_integrate(), dudley::Assemble_interpolate(), finley::Assemble_interpolate(), dudley::Assemble_LumpedSystem(), finley::Assemble_LumpedSystem(), dudley::Assemble_NodeCoordinates(), finley::Assemble_NodeCoordinates(), dudley::Assemble_PDE(), finley::Assemble_PDE(), speckley::Brick::assembleGradient(), speckley::Rectangle::assembleGradient(), ripley::Brick::assembleGradientImpl(), ripley::Rectangle::assembleGradientImpl(), ripley::Brick::assembleIntegrateImpl(), ripley::Rectangle::assembleIntegrateImpl(), speckley::Brick::assembleIntegrateWorker(), speckley::Rectangle::assembleIntegrateWorker(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), BOOST_PYTHON_MODULE(), escript::canInterpolate(), escript::DataConstant::dump(), escript::DataExpanded::dump(), escript::DataTagged::dump(), escript::MPIDataReducer::getCompatibilityInfo(), dudley::hasReducedIntegrationOrder(), finley::util::hasReducedIntegrationOrder(), weipa::DataVar::initFromEscript(), ripley::MultiBrick::interpolateAcross(), ripley::MultiRectangle::interpolateAcross(), speckley::Brick::interpolateElementsOnNodes(), speckley::Rectangle::interpolateElementsOnNodesWorker(), dudley::DudleyDomain::interpolateOnDomain(), finley::FinleyDomain::interpolateOnDomain(), ripley::RipleyDomain::interpolateOnDomain(), speckley::SpeckleyDomain::interpolateOnDomain(), dudley::DudleyDomain::newSystemMatrix(), finley::FinleyDomain::newSystemMatrix(), ripley::RipleyDomain::newSystemMatrix(), dudley::DudleyDomain::newTransportProblem(), finley::FinleyDomain::newTransportProblem(), ripley::RipleyDomain::newTransportProblem(), probeInterpolation(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), speckley::Brick::readBinaryGridImpl(), speckley::Rectangle::readBinaryGridImpl(), ripley::Brick::readNcGrid(), ripley::Rectangle::readNcGrid(), speckley::Brick::readNcGrid(), speckley::Rectangle::readNcGrid(), escript::saveDataCSV(), dudley::DudleyDomain::setToGradient(), finley::FinleyDomain::setToGradient(), ripley::RipleyDomain::setToGradient(), speckley::SpeckleyDomain::setToGradient(), dudley::DudleyDomain::setToIntegralsWorker(), finley::FinleyDomain::setToIntegralsWorker(), ripley::RipleyDomain::setToIntegralsWorker(), speckley::SpeckleyDomain::setToIntegralsWorker(), dudley::DudleyDomain::setToNormal(), finley::FinleyDomain::setToNormal(), ripley::Brick::setToNormal(), ripley::MultiBrick::setToNormal(), ripley::Rectangle::setToNormal(), dudley::DudleyDomain::setToSize(), finley::FinleyDomain::setToSize(), ripley::Brick::setToSize(), ripley::MultiBrick::setToSize(), ripley::Rectangle::setToSize(), speckley::Brick::setToSize(), speckley::Rectangle::setToSize(), dudley::DudleyDomain::setToX(), finley::FinleyDomain::setToX(), ripley::RipleyDomain::setToX(), speckley::SpeckleyDomain::setToX(), speckley::RipleyCoupler::validInterpolation(), ripley::WaveAssembler2D::WaveAssembler2D(), speckley::WaveAssembler2D::WaveAssembler2D(), ripley::WaveAssembler3D::WaveAssembler3D(), speckley::WaveAssembler3D::WaveAssembler3D(), ripley::Brick::writeBinaryGridImpl(), ripley::Rectangle::writeBinaryGridImpl(), speckley::Brick::writeBinaryGridImpl(), and speckley::Rectangle::writeBinaryGridImpl().

## getX()

escript::Data escript::FunctionSpace::getX | ( |  | ) | const

Returns the spatial locations of the data points.

References getDomain(), escript::Data::setProtection(), and escript::Vector().

Referenced by BOOST_PYTHON_MODULE(), dudley::DudleyDomain::getX(), finley::FinleyDomain::getX(), ripley::RipleyDomain::getX(), speckley::SpeckleyDomain::getX(), and escript::Data::getXFromFunctionSpace().

## operator!=()

bool escript::FunctionSpace::operator!= | ( | const FunctionSpace & | other | ) | const

References operator==().

## operator=()

FunctionSpace & escript::FunctionSpace::operator= | ( | const FunctionSpace & | other | ) |

private

Assignment operator. This method is only defined (private) to prevent people from using it.

## operator==()

bool escript::FunctionSpace::operator== | ( | const FunctionSpace & | other | ) | const

Comparison operator. Returns true if function spaces are equal. (i.e. same domain and same function space type)

References m_domain, and m_functionSpaceType.

Referenced by operator!=().

## ownSample()

bool escript::FunctionSpace::ownSample | ( | DataTypes::dim_t | sampleNo | ) | const

inline

Does this process own the sample? For non-MPI builds will always return true.

Referenced by escript::saveDataCSV().

## probeInterpolation()

bool escript::FunctionSpace::probeInterpolation | ( | const FunctionSpace & | other | ) | const

inline

References getDomain(), and getTypeCode().

## setTags()

void escript::FunctionSpace::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.

References escript::Data::getFunctionSpace(), m_domain, and m_functionSpaceType.

Referenced by BOOST_PYTHON_MODULE().

## setTagsByString()

void escript::FunctionSpace::setTagsByString | ( | const std::string & | name,
|  | const escript::Data & | mask
| ) |  | const

References escript::Data::getFunctionSpace(), m_domain, and m_functionSpaceType.

Referenced by BOOST_PYTHON_MODULE().

## toString()

std::string escript::FunctionSpace::toString | ( |  | ) | const

Returns a text description of the function space.

References m_domain, and m_functionSpaceType.

Referenced by BOOST_PYTHON_MODULE(), and escript::DataAbstract::operandCheck().

## Member Data Documentation

## m_domain

const_Domain_ptr escript::FunctionSpace::m_domain

private

Referenced by borrowListOfTagsInUse(), borrowSampleReferenceIDs(), canTag(), FunctionSpace(), getApproximationOrder(), getDataShape(), getDomain(), getDomainPython(), getNumberOfTagsInUse(), getTagFromSampleNo(), operator==(), setTags(), setTagsByString(), and toString().

## m_functionSpaceType

int escript::FunctionSpace::m_functionSpaceType

private

Referenced by borrowListOfTagsInUse(), borrowSampleReferenceIDs(), canTag(), getApproximationOrder(), getDataShape(), getNumberOfTagsInUse(), getTagFromSampleNo(), getTypeCode(), operator==(), setTags(), setTagsByString(), and toString().

The documentation for this class was generated from the following files:

- FunctionSpace.h
- FunctionSpace.cpp