ESYS13  Revision_
Public Member Functions | Private Member Functions | Private Attributes
escript::FunctionSpace Class Reference

Give a short description of what FunctionSpace does. More...

#include <FunctionSpace.h>

List of all members.

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

FunctionSpaceoperator= (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

Detailed Description

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.


Constructor & Destructor Documentation

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 
)

Constructor for FunctionSpace.

Description: Constructor for FunctionSpace.

References m_domain.


Member Function Documentation

References m_domain, and m_functionSpaceType.

Referenced by getListOfTags(), and getListOfTagsSTL().

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().

Checks if this functionspace support tags.

References m_domain, and m_functionSpaceType.

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

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. 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 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().

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 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().

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().

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]
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
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().


Member Data Documentation


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