escript
Revision_
|
Base class for all escript domains. More...
#include <AbstractDomain.h>
Public Types | |
typedef int | StatusType |
Public Member Functions | |
Domain_ptr | getPtr () |
Returns smart pointer which is managing this object. If one does not exist yet it creates one. More... | |
const_Domain_ptr | getPtr () const |
virtual | ~AbstractDomain () |
Destructor for AbstractDomain. More... | |
virtual JMPI | getMPI () const =0 |
returns a shared pointer to the MPI information wrapper for this domain More... | |
virtual int | getMPISize () const =0 |
return the number of processors used for this domain More... | |
virtual int | getMPIRank () const =0 |
return the number MPI rank of this processor More... | |
virtual void | MPIBarrier () const =0 |
If compiled for MPI then execute an MPI_Barrier, else do nothing. More... | |
virtual bool | onMasterProcessor () const =0 |
Return true if on MPI master, else false. More... | |
virtual MPI_Comm | getMPIComm () const =0 |
get the communicator for this domain. Returns an integer on non-MPI builds Routine must be implemented by the DomainAdapter. More... | |
virtual bool | isValidFunctionSpaceType (int functionSpaceType) const =0 |
Returns true if the given integer is a valid function space type for this domain. More... | |
virtual std::string | getDescription () const =0 |
Return a description for this domain. More... | |
virtual std::string | functionSpaceTypeAsString (int functionSpaceType) const =0 |
Return a description for the given function space type code. More... | |
virtual int | getDim () const =0 |
Returns the spatial dimension of the domain. More... | |
virtual bool | operator== (const AbstractDomain &other) const =0 |
Return true if given domains are equal. More... | |
virtual bool | operator!= (const AbstractDomain &other) const =0 |
Return true if given domains are not equal. More... | |
virtual void | write (const std::string &filename) const =0 |
Writes the domain to an external file filename. More... | |
virtual void | dump (const std::string &filename) const =0 |
dumps the domain to an external file filename. More... | |
virtual std::pair< int, DataTypes::dim_t > | getDataShape (int functionSpaceCode) const =0 |
Returns the number of data points per sample, and the number of samples as a pair. More... | |
virtual int | getTagFromSampleNo (int functionSpaceType, DataTypes::index_t sampleNo) const =0 |
Return the tag key for the given sample number. More... | |
virtual void | setTagMap (const std::string &name, int tag)=0 |
sets a map from a clear tag name to a tag key More... | |
virtual int | getTag (const std::string &name) const =0 |
Return the tag key for tag name. More... | |
virtual bool | isValidTagName (const std::string &name) const |
Returns True if name is a defined tag name. More... | |
virtual std::string | showTagNames () const =0 |
Returns all tag names in a single string sperated by commas. More... | |
virtual const DataTypes::dim_t * | borrowSampleReferenceIDs (int functionSpaceType) const =0 |
Returns a borrowed pointer to the sample reference number id list. More... | |
virtual void | setNewX (const escript::Data &arg)=0 |
Assigns new location to the domain. More... | |
virtual void | interpolateOnDomain (escript::Data &target, const escript::Data &source) const =0 |
Interpolates data given on source onto target where source and target have to be given on the same domain. More... | |
virtual bool | probeInterpolationOnDomain (int functionSpaceType_source, int functionSpaceType_target) const =0 |
True if interpolation is possible from source to target. More... | |
virtual signed char | preferredInterpolationOnDomain (int functionSpaceType_source, int functionSpaceType_target) const =0 |
Preferred direction of interpolation. If you really need to test for a particular direction, then use probeInterpolation. More... | |
virtual bool | commonFunctionSpace (const std::vector< int > &fs, int &resultcode) const =0 |
given a vector of FunctionSpace type codes, pass back a code which then can all be interpolated to. More... | |
virtual void | interpolateAcross (escript::Data &target, const escript::Data &source) const =0 |
Interpolates data given on source onto target where source and target are given on different domains. More... | |
virtual bool | probeInterpolationAcross (int functionSpaceType_source, const AbstractDomain &targetDomain, int functionSpaceType_target) const =0 |
virtual escript::Data | getX () const =0 |
Returns locations in the domain. The function space is chosen appropriately. More... | |
virtual escript::Data | getNormal () const =0 |
Return boundary normals. The function space is chosen appropriately. More... | |
virtual escript::Data | getSize () const =0 |
Returns the local size of samples. The function space is chosen appropriately. More... | |
virtual void | setToX (escript::Data &out) const =0 |
Copies the location of data points on the domain into out. The actual function space to be considered is defined by out. out has to be defined on this. More... | |
virtual void | setToNormal (escript::Data &out) const =0 |
Copies the surface normals at data points into out. The actual function space to be considered is defined by out. out has to be defined on this. More... | |
virtual void | setToSize (escript::Data &out) const =0 |
Copies the size of samples into out. The actual function space to be considered is defined by out. out has to be defined on this. More... | |
virtual void | setToGradient (escript::Data &grad, const escript::Data &arg) const =0 |
Copies the gradient of arg into grad. The actual function space to be considered for the gradient is defined by grad. arg and grad have to be defined on this. More... | |
virtual bool | ownSample (int fs_code, DataTypes::index_t id) const =0 |
True if this rank owns the sample(id) Must be implemented by the Domain adapter. More... | |
virtual void | setTags (int functionSpaceType, int newTag, const escript::Data &mask) const =0 |
assigns new tag newTag to all samples of functionspace with a positive value of mask for any its sample point. More... | |
virtual bool | isCellOriented (int functionSpaceCode) const =0 |
returns true if data on this domain and a function space of type functionSpaceCode has to considered as cell centered data. More... | |
virtual StatusType | getStatus () const |
Returns a status indicator of the domain. The status identifier should be unique over the live time if the object but may be updated if changes to the domain happen, e.g. modifications to its geometry. More... | |
void | throwStandardException (const std::string &functionName) const |
Throw a standard exception. This function is called if any attempt is made to use a base class function. More... | |
virtual int | getNumberOfTagsInUse (int functionSpaceCode) const =0 |
returns the number of tags in use and a pointer to an array with the number of tags in use More... | |
virtual const int * | borrowListOfTagsInUse (int functionSpaceCode) const =0 |
virtual bool | canTag (int functionspacecode) const =0 |
Checks if this domain allows tags for the specified functionSpaceCode. More... | |
virtual int | getApproximationOrder (const int functionSpaceCode) const =0 |
returns the approximation order used for a function space functionSpaceCode More... | |
virtual bool | supportsContactElements () const =0 |
virtual bool | supportsFilter (const boost::python::tuple &t) const |
true if this domain can handle to specified tuple of filter options. More... | |
virtual escript::Data | randomFill (const DataTypes::ShapeType &shape, const FunctionSpace &what, long seed, const boost::python::tuple &filter) const =0 |
Fills the data object with filtered random values. More... | |
Base class for all escript domains.
typedef int escript::AbstractDomain::StatusType |
|
inlinevirtual |
Destructor for AbstractDomain.
References ESCRIPT_DLL_API, getTag(), and speckley::probeInterpolationAcross().
|
pure virtual |
|
pure virtual |
Returns a borrowed pointer to the sample reference number id list.
functionSpaceType | Input - The function space type. |
Implemented in ripley::RipleyDomain, speckley::SpeckleyDomain, finley::FinleyDomain, dudley::DudleyDomain, ripley::MultiBrick, speckley::Rectangle, ripley::Rectangle, speckley::Brick, ripley::Brick, escript::TestDomain, and escript::NullDomain.
|
pure virtual |
Checks if this domain allows tags for the specified functionSpaceCode.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, escript::NullDomain, and escript::TestDomain.
|
pure virtual |
given a vector of FunctionSpace type codes, pass back a code which then can all be interpolated to.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, escript::NullDomain, and escript::TestDomain.
|
pure virtual |
dumps the domain to an external file filename.
This has to be implemented by the actual Domain adapter.
Implemented in ripley::RipleyDomain, speckley::SpeckleyDomain, finley::FinleyDomain, dudley::DudleyDomain, escript::NullDomain, ripley::MultiBrick, ripley::MultiRectangle, speckley::Brick, speckley::Rectangle, ripley::Rectangle, and ripley::Brick.
Referenced by BOOST_PYTHON_MODULE().
|
pure virtual |
Return a description for the given function space type code.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, escript::NullDomain, and escript::TestDomain.
|
pure virtual |
returns the approximation order used for a function space functionSpaceCode
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, and escript::NullDomain.
|
pure virtual |
Returns the number of data points per sample, and the number of samples as a pair.
This has to be implemented by the actual Domain adapter.
functionSpaceCode | Input - Code for the function space type. |
Implemented in finley::FinleyDomain, dudley::DudleyDomain, escript::AbstractContinuousDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, escript::TestDomain, and escript::NullDomain.
|
pure virtual |
Return a description for this domain.
Implemented in ripley::RipleyDomain, speckley::SpeckleyDomain, finley::FinleyDomain, dudley::DudleyDomain, escript::AbstractContinuousDomain, ripley::MultiBrick, ripley::MultiRectangle, speckley::Brick, speckley::Rectangle, ripley::Rectangle, escript::NullDomain, ripley::Brick, and escript::TestDomain.
|
pure virtual |
Returns the spatial dimension of the domain.
This has to be implemented by the actual Domain adapter.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, escript::TestDomain, and escript::NullDomain.
Referenced by BOOST_PYTHON_MODULE().
|
pure virtual |
returns a shared pointer to the MPI information wrapper for this domain
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, escript::TestDomain, and escript::NullDomain.
Referenced by escript::load().
|
pure virtual |
get the communicator for this domain. Returns an integer on non-MPI builds Routine must be implemented by the DomainAdapter.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, and escript::NullDomain.
Referenced by weipa::EscriptDataset::setDomain().
|
pure virtual |
return the number MPI rank of this processor
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, escript::NullDomain, and escript::TestDomain.
Referenced by BOOST_PYTHON_MODULE(), and weipa::EscriptDataset::setDomain().
|
pure virtual |
return the number of processors used for this domain
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, escript::NullDomain, and escript::TestDomain.
Referenced by BOOST_PYTHON_MODULE(), and weipa::EscriptDataset::setDomain().
|
pure virtual |
Return boundary normals. The function space is chosen appropriately.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, and escript::NullDomain.
Referenced by BOOST_PYTHON_MODULE().
|
pure virtual |
returns the number of tags in use and a pointer to an array with the number of tags in use
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, escript::NullDomain, and escript::TestDomain.
Domain_ptr escript::AbstractDomain::getPtr | ( | ) |
Returns smart pointer which is managing this object. If one does not exist yet it creates one.
Note: This is not equivalent to weak_ptr::lock.
Referenced by escript::continuousFunction(), dudley::DudleyDomain::create2D(), dudley::DudleyDomain::create3D(), finley::FinleyDomain::createHex20(), finley::FinleyDomain::createHex8(), finley::FinleyDomain::createRec4(), finley::FinleyDomain::createRec8(), escript::diracDeltaFunctions(), escript::functionOnBoundary(), escript::functionOnContactOne(), escript::functionOnContactZero(), escript::TestDomain::getX(), ripley::Brick::interpolateNodesOnFaces(), dudley::DudleyDomain::load(), finley::FinleyDomain::load(), escript::load(), finley::meshMerge(), ripley::Rectangle::randomFillWorker(), dudley::DudleyDomain::read(), finley::FinleyDomain::read(), dudley::DudleyDomain::readGmsh(), finley::FinleyDomain::readGmsh(), escript::reducedContinuousFunction(), escript::reducedFunction(), escript::reducedFunctionOnBoundary(), escript::reducedFunctionOnContactOne(), escript::reducedFunctionOnContactZero(), escript::reducedSolution(), and escript::solution().
const_Domain_ptr escript::AbstractDomain::getPtr | ( | ) | const |
|
pure virtual |
Returns the local size of samples. The function space is chosen appropriately.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, and escript::NullDomain.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
Returns a status indicator of the domain. The status identifier should be unique over the live time if the object but may be updated if changes to the domain happen, e.g. modifications to its geometry.
This has to be implemented by the actual Domain adapter.
Reimplemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, and speckley::SpeckleyDomain.
Referenced by BOOST_PYTHON_MODULE().
|
pure virtual |
Return the tag key for tag name.
name | Input - tag name |
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, and escript::NullDomain.
Referenced by BOOST_PYTHON_MODULE().
|
pure virtual |
Return the tag key for the given sample number.
functionSpaceType | Input - The function space type. |
sampleNo | Input - The sample number. |
Implemented in escript::TestDomain, and escript::NullDomain.
|
pure virtual |
Returns locations in the domain. The function space is chosen appropriately.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, escript::NullDomain, and escript::TestDomain.
Referenced by BOOST_PYTHON_MODULE().
|
pure virtual |
Interpolates data given on source onto target where source and target are given on different domains.
This has to be implemented by the actual Domain adapter.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, speckley::Rectangle, speckley::Brick, escript::TestDomain, escript::NullDomain, ripley::MultiBrick, and ripley::MultiRectangle.
|
pure virtual |
Interpolates data given on source onto target where source and target have to be given on the same domain.
This has to be implemented by the actual Domain adapter.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, escript::NullDomain, and escript::TestDomain.
|
pure virtual |
returns true if data on this domain and a function space of type functionSpaceCode has to considered as cell centered data.
This has to be implemented by the actual Domain adapter.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, and escript::NullDomain.
|
pure virtual |
Returns true if the given integer is a valid function space type for this domain.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, escript::AbstractContinuousDomain, escript::NullDomain, and escript::TestDomain.
Referenced by escript::load().
|
virtual |
Returns True if name is a defined tag name.
name | Input - tag name |
Reimplemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, and speckley::SpeckleyDomain.
Referenced by BOOST_PYTHON_MODULE().
|
pure virtual |
If compiled for MPI then execute an MPI_Barrier, else do nothing.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, escript::NullDomain, and escript::TestDomain.
Referenced by BOOST_PYTHON_MODULE().
|
pure virtual |
Return true if on MPI master, else false.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, escript::NullDomain, and escript::TestDomain.
Referenced by BOOST_PYTHON_MODULE().
|
pure virtual |
Return true if given domains are not equal.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, escript::TestDomain, and escript::NullDomain.
|
pure virtual |
Return true if given domains are equal.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, escript::TestDomain, escript::NullDomain, ripley::MultiBrick, ripley::MultiRectangle, speckley::Brick, speckley::Rectangle, ripley::Rectangle, and ripley::Brick.
|
pure virtual |
True if this rank owns the sample(id) Must be implemented by the Domain adapter.
Implemented in escript::NullDomain.
|
pure virtual |
Preferred direction of interpolation. If you really need to test for a particular direction, then use probeInterpolation.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, and escript::NullDomain.
|
pure virtual |
|
pure virtual |
True if interpolation is possible from source to target.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, escript::NullDomain, and escript::TestDomain.
|
pure virtual |
Fills the data object with filtered random values.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, speckley::Rectangle, ripley::Rectangle, speckley::Brick, ripley::Brick, escript::NullDomain, and escript::TestDomain.
|
pure virtual |
Assigns new location to the domain.
This has to be implemented by the actual Domain adapter.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, escript::AbstractContinuousDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, and escript::NullDomain.
|
pure virtual |
sets a map from a clear tag name to a tag key
name | Input - tag name. |
tag | Input - tag key. |
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, and escript::NullDomain.
Referenced by BOOST_PYTHON_MODULE().
|
pure virtual |
assigns new tag newTag to all samples of functionspace with a positive value of mask for any its sample point.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, and escript::NullDomain.
|
pure virtual |
Copies the gradient of arg into grad. The actual function space to be considered for the gradient is defined by grad. arg and grad have to be defined on this.
This has to be implemented by the actual Domain adapter.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, and escript::NullDomain.
|
pure virtual |
Copies the surface normals at data points into out. The actual function space to be considered is defined by out. out has to be defined on this.
This has to be implemented by the actual Domain adapter.
Implemented in ripley::RipleyDomain, finley::FinleyDomain, speckley::SpeckleyDomain, dudley::DudleyDomain, escript::NullDomain, ripley::MultiBrick, speckley::Rectangle, ripley::Rectangle, speckley::Brick, and ripley::Brick.
|
pure virtual |
Copies the size of samples into out. The actual function space to be considered is defined by out. out has to be defined on this.
This has to be implemented by the actual Domain adapter.
Implemented in ripley::RipleyDomain, finley::FinleyDomain, speckley::SpeckleyDomain, dudley::DudleyDomain, ripley::MultiBrick, escript::NullDomain, speckley::Rectangle, ripley::Rectangle, speckley::Brick, and ripley::Brick.
|
pure virtual |
Copies the location of data points on the domain into out. The actual function space to be considered is defined by out. out has to be defined on this.
This has to be implemented by the actual Domain adapter.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, and escript::NullDomain.
|
pure virtual |
Returns all tag names in a single string sperated by commas.
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, and escript::NullDomain.
Referenced by BOOST_PYTHON_MODULE().
|
pure virtual |
Implemented in finley::FinleyDomain, dudley::DudleyDomain, ripley::RipleyDomain, speckley::SpeckleyDomain, and escript::NullDomain.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
true if this domain can handle to specified tuple of filter options.
Reimplemented in ripley::RipleyDomain, and speckley::SpeckleyDomain.
void escript::AbstractDomain::throwStandardException | ( | const std::string & | functionName | ) | const |
Throw a standard exception. This function is called if any attempt is made to use a base class function.
Referenced by escript::NullDomain::commonFunctionSpace(), escript::NullDomain::dump(), escript::NullDomain::getApproximationOrder(), escript::NullDomain::getNormal(), escript::NullDomain::getSize(), escript::NullDomain::getTag(), escript::NullDomain::getX(), escript::NullDomain::isCellOriented(), escript::NullDomain::ownSample(), escript::NullDomain::preferredInterpolationOnDomain(), escript::NullDomain::setNewX(), escript::NullDomain::setTagMap(), escript::NullDomain::setTags(), escript::NullDomain::setToGradient(), escript::NullDomain::setToNormal(), escript::NullDomain::setToSize(), escript::NullDomain::setToX(), escript::NullDomain::showTagNames(), and escript::NullDomain::write().
|
pure virtual |
Writes the domain to an external file filename.
This has to be implemented by the actual Domain adapter.
Implemented in ripley::RipleyDomain, speckley::SpeckleyDomain, finley::FinleyDomain, dudley::DudleyDomain, escript::NullDomain, speckley::Brick, speckley::Rectangle, ripley::Rectangle, and ripley::Brick.