escript::NullDomain Class Reference

NullDomain provides a null value for domain. Needed for the construction of a default FunctionSpace. More...

`#include <NullDomain.h>`

Inheritance diagram for escript::NullDomain:

## Public Member Functions

| NullDomain ()
virtual JMPI | getMPI () const
| returns a shared pointer to the MPI information wrapper for this domain More...
virtual int | getMPISize () const
| return the number of processors used for this domain More...
virtual int | getMPIRank () const
| return the number MPI rank of this processor More...
virtual void | MPIBarrier () const
| If compiled for MPI then execute an MPI_Barrier, else do nothing. More...
virtual bool | onMasterProcessor () const
| Return true if on MPI master, else false. More...
virtual MPI_Comm | getMPIComm () const
| 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 fsCode) const
| Returns true if the given integer is a valid function space type for this domain. More...
virtual std::string | getDescription () const
| Return a description for this domain. More...
virtual std::string | functionSpaceTypeAsString (int functionSpaceType) const
| Return a description for the given function space type code. More...
virtual void | interpolateOnDomain (escript::Data &target, const escript::Data &source) const
| 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
| True if interpolation is possible from source to target. More...
virtual void | interpolateAcross (escript::Data &target, const escript::Data &source) const
| Interpolates data given on source onto target where source and target are given on different domains. More...
virtual bool | probeInterpolationAcross (int, const AbstractDomain &, int) const
virtual int | getContinuousFunctionCode () const
virtual int | getFunctionCode () const
virtual int | getFunctionOnBoundaryCode () const
virtual int | getFunctionOnContactZeroCode () const
virtual int | getFunctionOnContactOneCode () const
virtual int | getSolutionCode () const
virtual int | getReducedSolutionCode () const
virtual int | getDiracDeltaFunctionsCode () const
virtual std::pair< int, DataTypes::dim_t > | getDataShape (int functionSpaceCode) const
| Returns the number of data points per sample, and the number of samples as a pair. More...
virtual int | getTagFromSampleNo (int, DataTypes::index_t) const
| Return the tag key for the given sample number. More...
virtual const DataTypes::dim_t * | borrowSampleReferenceIDs (int) const
| Returns a borrowed pointer to the sample reference number id list. More...
virtual int | getDim () const
| Returns the spatial dimension of the domain. More...
virtual bool | operator== (const AbstractDomain &other) const
| Return true if given domains are equal. More...
virtual bool | operator!= (const AbstractDomain &other) const
| Return true if given domains are not equal. More...
virtual void | write (const std::string &filename) const
| Writes the domain to an external file filename. More...
virtual void | dump (const std::string &filename) const
| dumps the domain to an external file filename. More...
virtual void | setTagMap (const std::string &name, int tag)
| sets a map from a clear tag name to a tag key More...
virtual int | getTag (const std::string &name) const
| Return the tag key for tag name. More...
virtual bool | canTag (int) const
| Checks if this domain allows tags for the specified functionSpaceCode. More...
virtual std::string | showTagNames () const
| Returns all tag names in a single string sperated by commas. More...
virtual int | getNumberOfTagsInUse (int) const
| 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
virtual void | setTags (int functionSpaceType, int newTag, const escript::Data &mask) const
| assigns new tag newTag to all samples of functionspace with a positive value of mask for any its sample point. More...
bool | supportsContactElements () const
virtual void | setNewX (const escript::Data &arg)
| Assigns new location to the domain. More...
virtual signed char | preferredInterpolationOnDomain (int functionSpaceType_source, int functionSpaceType_target) const
| 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
| given a vector of FunctionSpace type codes, pass back a code which then can all be interpolated to. More...
virtual bool | isCellOriented (int functionSpaceCode) const
| returns true if data on this domain and a function space of type functionSpaceCode has to considered as cell centered data. More...
virtual int | getApproximationOrder (const int functionSpaceCode) const
| returns the approximation order used for a function space functionSpaceCode More...
virtual escript::Data | getX () const
| Returns locations in the domain. The function space is chosen appropriately. More...
virtual escript::Data | getNormal () const
| Return boundary normals. The function space is chosen appropriately. More...
virtual escript::Data | getSize () const
| Returns the local size of samples. The function space is chosen appropriately. More...
virtual void | setToX (escript::Data &out) const
| 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
| 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
| 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
| 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
| True if this rank owns the sample(id) Must be implemented by the Domain adapter. More...
virtual escript::Data | randomFill (const DataTypes::ShapeType &shape, const FunctionSpace &what, long seed, const boost::python::tuple &filter) const
| Fills the data object with filtered random values. More...
Public Member Functions inherited from escript::AbstractDomain
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 bool | isValidTagName (const std::string &name) const
| Returns True if name is a defined tag name. 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 bool | supportsFilter (const boost::python::tuple &t) const
| true if this domain can handle to specified tuple of filter options. More...

## Static Private Attributes

static int | NullDomainFS = -7
static DataTypes::dim_t | referenceID = DataTypes::dim_t(10)

## Additional Inherited Members

Public Types inherited from escript::AbstractDomain
typedef int | StatusType

## Detailed Description

NullDomain provides a null value for domain. Needed for the construction of a default FunctionSpace.

Description: NullDomain provides a null value for domain. Needed for the construction of a default FunctionSpace. Inherits from AbstractDomain and overrides its methods. This domain supports a single type of FunctionSpace for which canTag is true. This compromise is needed to allow the default contructor of DataTagged to have a FunctionSpace which supports tagging. See notes on the borrowListOfTagsInUse() method.

## Constructor & Destructor Documentation

## NullDomain()

escript::NullDomain::NullDomain | ( |  | ) |

inline

## Member Function Documentation

## borrowListOfTagsInUse()

const int * escript::NullDomain::borrowListOfTagsInUse | ( | int | functionSpaceCode | ) | const

virtual

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

References escript::AbstractDomain::throwStandardException().

## borrowSampleReferenceIDs()

virtual const DataTypes::dim_t* escript::NullDomain::borrowSampleReferenceIDs | ( | int | functionSpaceType | ) | const

inline virtual

Returns a borrowed pointer to the sample reference number id list.

Parameters

  functionSpaceType | Input - The function space type.

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## canTag()

virtual bool escript::NullDomain::canTag | ( | int | functionspacecode | ) | const

inline virtual

Checks if this domain allows tags for the specified functionSpaceCode.

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## commonFunctionSpace()

bool escript::NullDomain::commonFunctionSpace | ( | const std::vector< int > & | fs,
|  | int & | resultcode
| ) |  | const

virtual

given a vector of FunctionSpace type codes, pass back a code which then can all be interpolated to.

Note
  This method must be called on the domain which the FunctionSpaces point to

Returns
  true is result is valid, false if not

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## dump()

void escript::NullDomain::dump | ( | const std::string & | filename | ) | const

virtual

dumps the domain to an external file filename.

This has to be implemented by the actual Domain adapter.

Implements escript::AbstractDomain.

References escript::AbstractDomain::throwStandardException().

## functionSpaceTypeAsString()

std::string escript::NullDomain::functionSpaceTypeAsString | ( | int | functionSpaceType | ) | const

virtual

Return a description for the given function space type code.

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## getApproximationOrder()

int escript::NullDomain::getApproximationOrder | ( | const int | functionSpaceCode | ) | const

virtual

returns the approximation order used for a function space functionSpaceCode

Implements escript::AbstractDomain.

## getContinuousFunctionCode()

virtual int escript::NullDomain::getContinuousFunctionCode | ( |  | ) | const

inline virtual

Reimplemented in escript::TestDomain.

## getDataShape()

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

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.

Parameters

  functionSpaceCode | Input - Code for the function space type.

Returns
  pair, first - number of data points per sample, second - number of samples

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## getDescription()

std::string escript::NullDomain::getDescription | ( |  | ) | const

virtual

Return a description for this domain.

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

References escript::FunctionSpace::getDomain(), and escript::Data::getFunctionSpace().

## getDim()

virtual int escript::NullDomain::getDim | ( |  | ) | const

inline virtual

Returns the spatial dimension of the domain.

This has to be implemented by the actual Domain adapter.

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## getDiracDeltaFunctionsCode()

virtual int escript::NullDomain::getDiracDeltaFunctionsCode | ( |  | ) | const

inline virtual

Reimplemented in escript::TestDomain.

## getFunctionCode()

virtual int escript::NullDomain::getFunctionCode | ( |  | ) | const

inline virtual

Reimplemented in escript::TestDomain.

## getFunctionOnBoundaryCode()

virtual int escript::NullDomain::getFunctionOnBoundaryCode | ( |  | ) | const

inline virtual

Reimplemented in escript::TestDomain.

## getFunctionOnContactOneCode()

virtual int escript::NullDomain::getFunctionOnContactOneCode | ( |  | ) | const

inline virtual

Reimplemented in escript::TestDomain.

## getFunctionOnContactZeroCode()

virtual int escript::NullDomain::getFunctionOnContactZeroCode | ( |  | ) | const

inline virtual

Reimplemented in escript::TestDomain.

## getMPI()

JMPI escript::NullDomain::getMPI | ( |  | ) | const

virtual

returns a shared pointer to the MPI information wrapper for this domain

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

References NullDomainFS.

## getMPIComm()

virtual MPI_Comm escript::NullDomain::getMPIComm | ( |  | ) | const

inline virtual

get the communicator for this domain. Returns an integer on non-MPI builds Routine must be implemented by the DomainAdapter.

Implements escript::AbstractDomain.

## getMPIRank()

virtual int escript::NullDomain::getMPIRank | ( |  | ) | const

inline virtual

return the number MPI rank of this processor

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## getMPISize()

virtual int escript::NullDomain::getMPISize | ( |  | ) | const

inline virtual

return the number of processors used for this domain

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## getNormal()

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

virtual

Return boundary normals. The function space is chosen appropriately.

Implements escript::AbstractDomain.

References escript::AbstractDomain::throwStandardException().

## getNumberOfTagsInUse()

virtual int escript::NullDomain::getNumberOfTagsInUse | ( | int | functionSpaceCode | ) | const

inline virtual

returns the number of tags in use and a pointer to an array with the number of tags in use

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## getReducedSolutionCode()

virtual int escript::NullDomain::getReducedSolutionCode | ( |  | ) | const

inline virtual

Reimplemented in escript::TestDomain.

## getSize()

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

virtual

Returns the local size of samples. The function space is chosen appropriately.

Implements escript::AbstractDomain.

References weipa::VisItControl::initialize(), and escript::AbstractDomain::throwStandardException().

## getSolutionCode()

virtual int escript::NullDomain::getSolutionCode | ( |  | ) | const

inline virtual

Reimplemented in escript::TestDomain.

## getTag()

int escript::NullDomain::getTag | ( | const std::string & | name | ) | const

virtual

Return the tag key for tag name.

Parameters

  name | Input - tag name

Implements escript::AbstractDomain.

References escript::AbstractDomain::throwStandardException().

## getTagFromSampleNo()

virtual int escript::NullDomain::getTagFromSampleNo | ( | int | functionSpaceType,
|  | DataTypes::index_t | sampleNo
| ) |  | const

inline virtual

Return the tag key for the given sample number.

Parameters

  functionSpaceType | Input - The function space type.
  sampleNo | Input - The sample number.

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## getX()

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

virtual

Returns locations in the domain. The function space is chosen appropriately.

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## interpolateAcross()

void escript::NullDomain::interpolateAcross | ( | escript::Data & | target,
|  | const escript::Data & | source
| ) |  | const

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.

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## interpolateOnDomain()

void escript::NullDomain::interpolateOnDomain | ( | escript::Data & | target,
|  | const escript::Data & | source
| ) |  | const

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.

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## isCellOriented()

bool escript::NullDomain::isCellOriented | ( | int | functionSpaceCode | ) | const

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.

Implements escript::AbstractDomain.

## isValidFunctionSpaceType()

virtual bool escript::NullDomain::isValidFunctionSpaceType | ( | int | functionSpaceType | ) | const

inline virtual

Returns true if the given integer is a valid function space type for this domain.

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## MPIBarrier()

virtual void escript::NullDomain::MPIBarrier | ( |  | ) | const

inline virtual

If compiled for MPI then execute an MPI_Barrier, else do nothing.

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## onMasterProcessor()

virtual bool escript::NullDomain::onMasterProcessor | ( |  | ) | const

inline virtual

Return true if on MPI master, else false.

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## operator!=()

virtual bool escript::NullDomain::operator!= | ( | const AbstractDomain & | other | ) | const

inline virtual

Return true if given domains are not equal.

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## operator==()

bool escript::NullDomain::operator== | ( | const AbstractDomain & | other | ) | const

virtual

Return true if given domains are equal.

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## ownSample()

bool escript::NullDomain::ownSample | ( | int | fs_code,
|  | DataTypes::index_t | id
| ) |  | const

virtual

True if this rank owns the sample(id) Must be implemented by the Domain adapter.

Implements escript::AbstractDomain.

## preferredInterpolationOnDomain()

signed char escript::NullDomain::preferredInterpolationOnDomain | ( | int | functionSpaceType_source,
|  | int | functionSpaceType_target
| ) |  | const

virtual

Preferred direction of interpolation. If you really need to test for a particular direction, then use probeInterpolation.

Returns
  0 for not possible, 1 for possible and preferred, -1 other direction preferred (does not mean this direction is possible)

Implements escript::AbstractDomain.

## probeInterpolationAcross()

virtual bool escript::NullDomain::probeInterpolationAcross | ( | int | ,
|  | const AbstractDomain & | ,
|  | int |
| ) |  | const

inline virtual

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## probeInterpolationOnDomain()

bool escript::NullDomain::probeInterpolationOnDomain | ( | int | functionSpaceType_source,
|  | int | functionSpaceType_target
| ) |  | const

virtual

True if interpolation is possible from source to target.

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

## randomFill()

escript::Data escript::NullDomain::randomFill | ( | const DataTypes::ShapeType & | shape,
|  | const FunctionSpace & | what,
|  | long | seed,
|  | const boost::python::tuple & | filter
| ) |  | const

virtual

Fills the data object with filtered random values.

Implements escript::AbstractDomain.

Reimplemented in escript::TestDomain.

References escript::AbstractDomain::throwStandardException().

## setNewX()

void escript::NullDomain::setNewX | ( | const escript::Data & | arg | ) |

virtual

Assigns new location to the domain.

This has to be implemented by the actual Domain adapter.

Implements escript::AbstractDomain.

References escript::AbstractDomain::throwStandardException().

## setTagMap()

void escript::NullDomain::setTagMap | ( | const std::string & | name,
|  | int | tag
| ) |  |

virtual

sets a map from a clear tag name to a tag key

Parameters

  name | Input - tag name.
  tag | Input - tag key.

Implements escript::AbstractDomain.

## setTags()

void escript::NullDomain::setTags | ( | int | functionSpaceType,
|  | int | newTag,
|  | const escript::Data & | mask
| ) |  | const

virtual

assigns new tag newTag to all samples of functionspace with a positive value of mask for any its sample point.

Implements escript::AbstractDomain.

References escript::AbstractDomain::throwStandardException().

## setToGradient()

void escript::NullDomain::setToGradient | ( | escript::Data & | grad,
|  | const escript::Data & | arg
| ) |  | const

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.

Implements escript::AbstractDomain.

References escript::AbstractDomain::throwStandardException().

## setToNormal()

void escript::NullDomain::setToNormal | ( | escript::Data & | out | ) | const

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.

Implements escript::AbstractDomain.

References escript::AbstractDomain::throwStandardException().

## setToSize()

void escript::NullDomain::setToSize | ( | escript::Data & | out | ) | const

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.

Implements escript::AbstractDomain.

## setToX()

void escript::NullDomain::setToX | ( | escript::Data & | out | ) | const

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.

Implements escript::AbstractDomain.

## showTagNames()

std::string escript::NullDomain::showTagNames | ( |  | ) | const

virtual

Returns all tag names in a single string sperated by commas.

Implements escript::AbstractDomain.

References escript::AbstractDomain::throwStandardException().

## supportsContactElements()

bool escript::NullDomain::supportsContactElements | ( |  | ) | const

inline virtual

Implements escript::AbstractDomain.

## write()

void escript::NullDomain::write | ( | const std::string & | filename | ) | const

virtual

Writes the domain to an external file filename.

This has to be implemented by the actual Domain adapter.

Implements escript::AbstractDomain.

References escript::AbstractDomain::throwStandardException().

## Member Data Documentation

## NullDomainFS

int escript::NullDomain::NullDomainFS = -7

static private

Referenced by getMPI().

## referenceID

DataTypes::dim_t escript::NullDomain::referenceID = DataTypes::dim_t(10)

static private

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

- NullDomain.h
- NullDomain.cpp