escript
Revision_
|
#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 |
escript::FunctionSpace::FunctionSpace | ( | ) |
escript::FunctionSpace::FunctionSpace | ( | const_Domain_ptr | domain, |
int | functionSpaceType | ||
) |
References m_domain.
escript::FunctionSpace::FunctionSpace | ( | const FunctionSpace & | other | ) |
const int * escript::FunctionSpace::borrowListOfTagsInUse | ( | ) | const |
References m_domain, and m_functionSpaceType.
Referenced by getListOfTags(), and getListOfTagsSTL().
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().
bool escript::FunctionSpace::canTag | ( | ) | const |
Returns true if this function space support tags.
References m_domain, and m_functionSpaceType.
Referenced by escript::DataTagged::DataTagged().
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().
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.
|
inline |
Return the number of spatial dimensions of the underlying domain.
Referenced by BOOST_PYTHON_MODULE(), escript::Data::gradOn(), speckley::readBinaryGrid(), ripley::readBinaryGrid(), speckley::readBinaryGridFromZipped(), ripley::readBinaryGridFromZipped(), speckley::readNcGrid(), and ripley::readNcGrid().
const_Domain_ptr escript::FunctionSpace::getDomain | ( | ) | const |
Returns the function space domain.
References m_domain.
Referenced by escript::C_TensorBinaryOperation(), escript::canInterpolate(), escript::Data::getDomain(), getNormal(), getSize(), getX(), escript::Data::gradOn(), escript::Data::init_from_data_and_fs(), escript::TestDomain::interpolateOnDomain(), escript::NullDomain::interpolateOnDomain(), speckley::SpeckleyDomain::interpolateOnDomain(), ripley::RipleyDomain::interpolateOnDomain(), dudley::DudleyDomain::interpolateOnDomain(), finley::FinleyDomain::interpolateOnDomain(), ripley::RipleyDomain::newSystemMatrix(), dudley::DudleyDomain::newSystemMatrix(), finley::FinleyDomain::newSystemMatrix(), ripley::RipleyDomain::newTransportProblem(), dudley::DudleyDomain::newTransportProblem(), finley::FinleyDomain::newTransportProblem(), probeInterpolation(), escript::randomData(), speckley::readBinaryGrid(), ripley::readBinaryGrid(), speckley::readBinaryGridFromZipped(), ripley::readBinaryGridFromZipped(), speckley::readNcGrid(), ripley::readNcGrid(), dudley::DudleyDomain::setNewX(), finley::FinleyDomain::setNewX(), escript::Data::setTaggedValueByName(), speckley::SpeckleyDomain::setToGradient(), ripley::RipleyDomain::setToGradient(), dudley::DudleyDomain::setToGradient(), finley::FinleyDomain::setToGradient(), speckley::SpeckleyDomain::setToIntegrals(), ripley::RipleyDomain::setToIntegrals(), dudley::DudleyDomain::setToIntegrals(), finley::FinleyDomain::setToIntegrals(), dudley::DudleyDomain::setToNormal(), finley::FinleyDomain::setToNormal(), speckley::SpeckleyDomain::setToX(), ripley::RipleyDomain::setToX(), dudley::DudleyDomain::setToX(), finley::FinleyDomain::setToX(), escript::Tensor(), escript::Tensor3(), escript::Tensor3FromObj(), escript::Tensor4(), escript::Tensor4FromObj(), escript::TensorFromObj(), escript::Data::TensorSelfUpdateBinaryOperation(), escript::Vector(), and escript::VectorFromObj().
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(), and escript::Data::getDomainPython().
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().
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().
escript::Data escript::FunctionSpace::getNormal | ( | ) | const |
Returns the surface normal field.
References getDomain(), escript::Data::setProtection(), and escript::Vector().
Referenced by BOOST_PYTHON_MODULE(), ripley::RipleyDomain::getNormal(), dudley::DudleyDomain::getNormal(), and finley::FinleyDomain::getNormal().
int escript::FunctionSpace::getNumberOfTagsInUse | ( | ) | const |
Returns the number of tags in use.
References m_domain, and m_functionSpaceType.
Referenced by getListOfTags(), and getListOfTagsSTL().
|
inline |
Referenced by escript::DataExpanded::dump(), and escript::load().
|
inline |
Returns the number of data points per sample.
Referenced by escript::DataExpanded::DataExpanded(), getReferenceIDFromDataPointNo(), and getTagFromDataPointNo().
|
inline |
Returns the number of samples.
Referenced by escript::DataExpanded::DataExpanded(), escript::DataExpanded::dump(), getReferenceIDFromDataPointNo(), getTagFromDataPointNo(), and escript::load().
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().
|
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(), and escript::DataExpanded::toString().
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(), speckley::SpeckleyDomain::getSize(), ripley::RipleyDomain::getSize(), dudley::DudleyDomain::getSize(), and finley::FinleyDomain::getSize().
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(), and escript::Data::getTagNumber().
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(), escript::DataTagged::getTagNumber(), and escript::DataExpanded::setTaggedValue().
int escript::FunctionSpace::getTypeCode | ( | ) | const |
Returns the function space type code.
References m_functionSpaceType.
Referenced by dudley::Assemble_CopyNodalData(), finley::Assemble_CopyNodalData(), finley::Assemble_getNormal(), finley::Assemble_getSize(), dudley::Assemble_gradient(), finley::Assemble_gradient(), 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(), ripley::Brick::assembleGradient(), ripley::Rectangle::assembleGradient(), speckley::Rectangle::assembleGradient(), ripley::WaveAssembler2D::assemblePDESystem(), ripley::WaveAssembler3D::assemblePDESystem(), escript::C_TensorBinaryOperation(), escript::canInterpolate(), escript::DataConstant::dump(), escript::DataExpanded::dump(), escript::DataTagged::dump(), escript::Data::get_MPIComm(), escript::MPIDataReducer::getCompatibilityInfo(), finley::util::hasReducedIntegrationOrder(), dudley::hasReducedIntegrationOrder(), weipa::DataVar::initFromEscript(), ripley::MultiBrick::interpolateAcross(), ripley::MultiRectangle::interpolateAcross(), speckley::Brick::interpolateElementsOnNodes(), speckley::Rectangle::interpolateElementsOnNodes(), speckley::SpeckleyDomain::interpolateOnDomain(), ripley::RipleyDomain::interpolateOnDomain(), dudley::DudleyDomain::interpolateOnDomain(), finley::FinleyDomain::interpolateOnDomain(), ripley::RipleyDomain::newSystemMatrix(), dudley::DudleyDomain::newSystemMatrix(), finley::FinleyDomain::newSystemMatrix(), ripley::RipleyDomain::newTransportProblem(), dudley::DudleyDomain::newTransportProblem(), finley::FinleyDomain::newTransportProblem(), probeInterpolation(), ripley::Brick::readBinaryGridImpl(), ripley::Rectangle::readBinaryGridImpl(), speckley::Brick::readBinaryGridImpl(), speckley::Rectangle::readBinaryGridImpl(), ripley::Brick::readNcGrid(), ripley::Rectangle::readNcGrid(), speckley::Rectangle::readNcGrid(), speckley::Brick::readNcGrid(), escript::saveDataCSV(), speckley::SpeckleyDomain::setToGradient(), ripley::RipleyDomain::setToGradient(), dudley::DudleyDomain::setToGradient(), finley::FinleyDomain::setToGradient(), speckley::SpeckleyDomain::setToIntegrals(), ripley::RipleyDomain::setToIntegrals(), dudley::DudleyDomain::setToIntegrals(), finley::FinleyDomain::setToIntegrals(), ripley::Brick::setToNormal(), ripley::Rectangle::setToNormal(), ripley::MultiBrick::setToNormal(), dudley::DudleyDomain::setToNormal(), finley::FinleyDomain::setToNormal(), ripley::Brick::setToSize(), speckley::Brick::setToSize(), ripley::Rectangle::setToSize(), speckley::Rectangle::setToSize(), ripley::MultiBrick::setToSize(), dudley::DudleyDomain::setToSize(), finley::FinleyDomain::setToSize(), speckley::SpeckleyDomain::setToX(), ripley::RipleyDomain::setToX(), dudley::DudleyDomain::setToX(), finley::FinleyDomain::setToX(), escript::Data::TensorSelfUpdateBinaryOperation(), speckley::RipleyCoupler::validInterpolation(), speckley::WaveAssembler2D::WaveAssembler2D(), ripley::WaveAssembler2D::WaveAssembler2D(), ripley::WaveAssembler3D::WaveAssembler3D(), speckley::WaveAssembler3D::WaveAssembler3D(), ripley::Brick::writeBinaryGridImpl(), ripley::Rectangle::writeBinaryGridImpl(), speckley::Brick::writeBinaryGridImpl(), and speckley::Rectangle::writeBinaryGridImpl().
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(), speckley::SpeckleyDomain::getX(), ripley::RipleyDomain::getX(), dudley::DudleyDomain::getX(), and finley::FinleyDomain::getX().
bool escript::FunctionSpace::operator!= | ( | const FunctionSpace & | other | ) | const |
References operator==().
|
private |
Assignment operator. This method is only defined (private) to prevent people from using it.
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!=().
|
inline |
Does this process own the sample? For non-MPI builds will always return true.
Referenced by escript::saveDataCSV().
|
inline |
References getDomain(), and getTypeCode().
Referenced by escript::Data::probeInterpolation().
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().
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().
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(), escript::C_TensorBinaryOperation(), escript::DataAbstract::operandCheck(), and escript::Data::TensorSelfUpdateBinaryOperation().
|
private |
|
private |