ESYS13
Revision_
|
Give a short description of what FunctionSpace does. More...
#include <FunctionSpace.h>
Public Member Functions | |
FunctionSpace () | |
Default constructor for FunctionSpace. | |
FunctionSpace (const_Domain_ptr domain, int functionSpaceType) | |
Constructor for FunctionSpace. | |
FunctionSpace (const FunctionSpace &other) | |
int | getTypeCode () const |
Return the function space type code. | |
const_Domain_ptr | getDomain () const |
Return the function space domain. | |
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++. | |
bool | canTag () const |
Checks if this functionspace support tags. | |
int | getApproximationOrder () const |
returns the approximation order used for this function space | |
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 its sample point. | |
void | setTagsByString (const std::string &name, const escript::Data &mask) const |
std::pair< int, int > | getDataShape () const |
Return the shape of the data needed to represent the function space. | |
bool | operator== (const FunctionSpace &other) const |
Comparison operator. Return true if function spaces are equal. ie: Same domain and same function space type. | |
bool | operator!= (const FunctionSpace &other) const |
std::string | toString () const |
Return a text description of the function space. | |
int | getTagFromSampleNo (int sampleNo) const |
Return the tag associated with the given sample number. | |
int | getTagFromDataPointNo (int dataPointNo) const |
Return the tag associated with the given data-point number. | |
int | getReferenceIDFromDataPointNo (int dataPointNo) const |
Return the reference number associated with the given data-point number. | |
int | getReferenceIDOfSample (int sampleNo) const |
Return 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. | |
bool | ownSample (int sampleNo) const |
Does this process own the sample? For non-MPI builds will always return true. | |
const int * | borrowSampleReferenceIDs () const |
Return a borrowed reference to the list of sample reference IDs. | |
escript::Data | getX () const |
Return the spatial locations of the data points. | |
escript::Data | getNormal () const |
Return the surface normal field. | |
escript::Data | getSize () const |
Return the sample size (e.g. the diameter of elements, radius of particles). | |
int | getNumSamples () const |
Return the number of samples. | |
int | getNumDPPSample () const |
Return the number of data points per sample. | |
int | getNumDataPointsPerSample () const |
int | getDim () const |
Return the spatial dimension of the underlying domain. | |
boost::python::list | getListOfTags () const |
Returns a list of the tags used in this function space. | |
std::list< int > | getListOfTagsSTL () const |
Returns an stl::list of the tags used in this function space. | |
int | getNumberOfTagsInUse () const |
return the number of tags in use and a pointer to an array with the number of tags in use | |
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. | |
Private Attributes | |
const_Domain_ptr | m_domain |
int | m_functionSpaceType |
Give a short description of what FunctionSpace does.
Description: Give a detailed description of FunctionSpace.
Template Parameters: For templates describe any conditions that the parameters used in the template must satisfy.
Default constructor for FunctionSpace.
Description: Default constructor for FunctionSpace Generates a function space with a null domain.
Preconditions: Describe any preconditions.
Throws: Describe any exceptions thrown.
escript::FunctionSpace::FunctionSpace | ( | const_Domain_ptr | domain, |
int | functionSpaceType | ||
) |
escript::FunctionSpace::FunctionSpace | ( | const FunctionSpace & | other | ) |
const int * escript::FunctionSpace::borrowListOfTagsInUse | ( | ) | const |
References m_domain, and m_functionSpaceType.
Referenced by getListOfTags(), and getListOfTagsSTL().
const int * escript::FunctionSpace::borrowSampleReferenceIDs | ( | ) | const |
Return a borrowed reference to the list of sample reference IDs.
References m_domain, and m_functionSpaceType.
Referenced by escript::DataExpanded::dump(), getReferenceIDFromDataPointNo(), getReferenceIDOfSample(), weipa::DataVar::initFromEscript(), and escript::load().
bool escript::FunctionSpace::canTag | ( | ) | const |
Checks if this functionspace 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, int > escript::FunctionSpace::getDataShape | ( | ) | const |
Return the shape of the data needed to represent the function space.
References m_domain, and m_functionSpaceType.
Referenced by getNumDataPointsPerSample(), and getNumSamples().
int escript::FunctionSpace::getDim | ( | ) | const [inline] |
Return the spatial dimension of the underlying domain.
References getDomain().
Referenced by BOOST_PYTHON_MODULE(), and escript::Data::gradOn().
Return the function space domain.
References m_domain.
Referenced by escript::Data::Data(), escript::DataConstant::dump(), escript::DataExpanded::dump(), escript::DataTagged::dump(), getDim(), escript::Data::getDomain(), getNormal(), getSize(), getX(), escript::Data::gradOn(), dudley::MeshAdapter::interpolateACross(), finley::MeshAdapter::interpolateACross(), escript::NullDomain::interpolateOnDomain(), escript::TestDomain::interpolateOnDomain(), dudley::MeshAdapter::interpolateOnDomain(), finley::MeshAdapter::interpolateOnDomain(), dudley::MeshAdapter::newSystemMatrix(), finley::MeshAdapter::newSystemMatrix(), dudley::MeshAdapter::newTransportProblem(), finley::MeshAdapter::newTransportProblem(), probeInterpolation(), escript::DataExpanded::randomFill(), dudley::MeshAdapter::setNewX(), finley::MeshAdapter::setNewX(), escript::Data::setTaggedValueByName(), dudley::MeshAdapter::setToGradient(), finley::MeshAdapter::setToGradient(), dudley::MeshAdapter::setToIntegrals(), finley::MeshAdapter::setToIntegrals(), dudley::MeshAdapter::setToNormal(), finley::MeshAdapter::setToNormal(), dudley::MeshAdapter::setToX(), finley::MeshAdapter::setToX(), escript::Tensor(), escript::Tensor3(), escript::Tensor3FromObj(), escript::Tensor4(), escript::Tensor4FromObj(), escript::TensorFromObj(), escript::Vector(), and escript::VectorFromObj().
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::algorithm().
Return the surface normal field.
References getDomain(), escript::Data::setProtection(), and escript::Vector().
Referenced by BOOST_PYTHON_MODULE(), dudley::MeshAdapter::getNormal(), and finley::MeshAdapter::getNormal().
int escript::FunctionSpace::getNumberOfTagsInUse | ( | ) | const |
return the number of tags in use and a pointer to an array with the number of tags in use
References m_domain, and m_functionSpaceType.
Referenced by getListOfTags(), and getListOfTagsSTL().
int escript::FunctionSpace::getNumDataPointsPerSample | ( | ) | const [inline] |
References getDataShape().
Referenced by escript::DataExpanded::dump(), getNumDPPSample(), and escript::load().
int escript::FunctionSpace::getNumDPPSample | ( | ) | const [inline] |
Return the number of data points per sample.
References getNumDataPointsPerSample().
Referenced by escript::DataExpanded::DataExpanded(), getReferenceIDFromDataPointNo(), and getTagFromDataPointNo().
int escript::FunctionSpace::getNumSamples | ( | ) | const [inline] |
Return the number of samples.
References getDataShape().
Referenced by escript::DataExpanded::DataExpanded(), escript::DataExpanded::dump(), getReferenceIDFromDataPointNo(), getTagFromDataPointNo(), and escript::load().
int escript::FunctionSpace::getReferenceIDFromDataPointNo | ( | int | dataPointNo | ) | const |
Return the reference number associated with the given data-point number.
References borrowSampleReferenceIDs(), getNumDPPSample(), and getNumSamples().
Referenced by BOOST_PYTHON_MODULE().
int escript::FunctionSpace::getReferenceIDOfSample | ( | int | sampleNo | ) | const [inline] |
Return 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.
References borrowSampleReferenceIDs().
Referenced by escript::DataExpanded::reorderByReferenceIDs(), and escript::DataExpanded::toString().
escript::Data escript::FunctionSpace::getSize | ( | ) | const |
Return 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::MeshAdapter::getSize(), and finley::MeshAdapter::getSize().
int escript::FunctionSpace::getTagFromDataPointNo | ( | int | dataPointNo | ) | const |
Return 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 | ( | int | sampleNo | ) | const |
Return the tag associated with the given sample number.
References m_domain, and m_functionSpaceType.
Referenced by escript::DataTagged::getPointOffset(), getTagFromDataPointNo(), and escript::DataTagged::getTagNumber().
int escript::FunctionSpace::getTypeCode | ( | ) | const |
Return 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 escript::DataConstant::dump(), escript::DataExpanded::dump(), escript::DataTagged::dump(), getFunctionSpaceType(), weipa::DataVar::initFromEscript(), dudley::MeshAdapter::interpolateOnDomain(), finley::MeshAdapter::interpolateOnDomain(), dudley::MeshAdapter::newSystemMatrix(), finley::MeshAdapter::newSystemMatrix(), dudley::MeshAdapter::newTransportProblem(), finley::MeshAdapter::newTransportProblem(), probeInterpolation(), dudley::MeshAdapter::setToGradient(), finley::MeshAdapter::setToGradient(), dudley::MeshAdapter::setToIntegrals(), finley::MeshAdapter::setToIntegrals(), dudley::MeshAdapter::setToNormal(), finley::MeshAdapter::setToNormal(), dudley::MeshAdapter::setToSize(), finley::MeshAdapter::setToSize(), dudley::MeshAdapter::setToX(), and finley::MeshAdapter::setToX().
escript::Data escript::FunctionSpace::getX | ( | ) | const |
Return the spatial locations of the data points.
References getDomain(), escript::Data::setProtection(), and escript::Vector().
Referenced by BOOST_PYTHON_MODULE(), dudley::MeshAdapter::getX(), and finley::MeshAdapter::getX().
bool escript::FunctionSpace::operator!= | ( | const FunctionSpace & | other | ) | const |
References operator==().
FunctionSpace & escript::FunctionSpace::operator= | ( | const FunctionSpace & | other | ) | [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. Return true if function spaces are equal. ie: Same domain and same function space type.
References m_domain, and m_functionSpaceType.
Referenced by operator!=().
bool escript::FunctionSpace::ownSample | ( | int | sampleNo | ) | const [inline] |
Does this process own the sample? For non-MPI builds will always return true.
References m_domain, and m_functionSpaceType.
Referenced by escript::saveDataCSV().
bool escript::FunctionSpace::probeInterpolation | ( | const FunctionSpace & | other | ) | const [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 its sample point.
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 |
Return a text description of the function space.
References m_domain, and m_functionSpaceType.
Referenced by BOOST_PYTHON_MODULE(), and escript::DataAbstract::operandCheck().
int escript::FunctionSpace::m_functionSpaceType [private] |