escript  Revision_
Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
dudley::MeshAdapter Class Reference

MeshAdapter implements the AbstractContinuousDomain interface for the Dudley library. More...

#include <MeshAdapter.h>

Inheritance diagram for dudley::MeshAdapter:
escript::AbstractContinuousDomain escript::AbstractDomain

Public Types

typedef std::map< int, std::string > FunctionSpaceNamesMapType
 
- Public Types inherited from escript::AbstractDomain
typedef int StatusType
 

Public Member Functions

 MeshAdapter (Dudley_Mesh *dudleyMesh=0)
 Constructor for MeshAdapter. More...
 
 MeshAdapter (const MeshAdapter &in)
 Copy constructor. More...
 
 ~MeshAdapter ()
 Destructor for MeshAdapter. As specified in the constructor this calls Dudley_Mesh_free for the pointer given to the constructor. 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 processor 0, else false. More...
 
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...
 
void write (const std::string &fileName) const
 Write the current mesh to a file with the given name. More...
 
void Print_Mesh_Info (const bool full=false) const
 
void dump (const std::string &fileName) const
 dumps the mesh to a file with the given name. More...
 
Dudley_MeshgetDudley_Mesh () const
 return the pointer to the underlying dudley mesh structure More...
 
int getTagFromSampleNo (int functionSpaceType, int sampleNo) const
 Return the tag key for the given sample number. More...
 
const int * borrowSampleReferenceIDs (int functionSpaceType) const
 Return the reference number of the given sample number. More...
 
virtual bool isValidFunctionSpaceType (int functionSpaceType) 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...
 
void setFunctionSpaceTypeNames ()
 Build the table of function space type names. More...
 
virtual int getContinuousFunctionCode () const
 Return a continuous FunctionSpace code. More...
 
virtual int getReducedContinuousFunctionCode () const
 Return a continuous on reduced order nodes FunctionSpace code. More...
 
virtual int getFunctionCode () const
 Return a function FunctionSpace code. More...
 
virtual int getReducedFunctionCode () const
 Return a function with reduced integration order FunctionSpace code. More...
 
virtual int getFunctionOnBoundaryCode () const
 Return a function on boundary FunctionSpace code. More...
 
virtual int getReducedFunctionOnBoundaryCode () const
 Return a function on boundary with reduced integration order FunctionSpace code. More...
 
virtual int getFunctionOnContactZeroCode () const
 Return a FunctionOnContactZero code. More...
 
virtual int getReducedFunctionOnContactZeroCode () const
 Return a FunctionOnContactZero code with reduced integration order. More...
 
virtual int getFunctionOnContactOneCode () const
 Return a FunctionOnContactOne code. More...
 
virtual int getReducedFunctionOnContactOneCode () const
 Return a FunctionOnContactOne code with reduced integration order. More...
 
virtual int getSolutionCode () const
 Return a Solution code. More...
 
virtual int getReducedSolutionCode () const
 Return a ReducedSolution code. More...
 
virtual int getDiracDeltaFunctionsCode () const
 Return a DiracDeltaFunctions code. More...
 
virtual int getDim () const
 Returns the spatial dimension of the domain. 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...
 
virtual int getNumDataPointsGlobal () const
 Return the number of data points summed across all MPI processes. More...
 
virtual std::pair< int, int > getDataShape (int functionSpaceCode) const
 Return the number of data points per sample, and the number of samples as a pair. More...
 
virtual void setToX (escript::Data &arg) const
 copies the location of data points into arg. The domain of arg has to match this. has to be implemented by the actual Domain adapter. 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 isValidTagName (const std::string &name) const
 Returns true if name is a defined tage name. More...
 
virtual std::string showTagNames () const
 Returns all tag names in a single string sperated by commas. More...
 
virtual void setNewX (const escript::Data &arg)
 assigns new location to the domain 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 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...
 
bool commonFunctionSpace (const std::vector< int > &fs, int &resultcode) const
 given a vector of FunctionSpace typecodes, pass back a code which then can all be interpolated to. 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. has to be implemented by the actual Domain adapter. More...
 
virtual bool probeInterpolationAcross (int functionSpaceType_source, const escript::AbstractDomain &targetDomain, int functionSpaceType_target) const
 determines whether interpolation from source to target is possible. Must be implemented by the actual Domain adapter 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 void setToIntegrals (std::vector< double > &integrals, const escript::Data &arg) const
 copies the integrals of the function defined by arg into integrals. arg has to be defined on this. More...
 
virtual int getSystemMatrixTypeId (const boost::python::object &options) const
 return the identifier of the matrix type to be used for the global stiffness matrix when a particular solver, package, preconditioner, and symmetric matrix is used. More...
 
virtual int getTransportTypeId (const int solver, const int preconditioner, const int package, const bool symmetry) const
 return the identifier of the transport problem type to be used when a particular solver, perconditioner, package and symmetric matrix is used. 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 bool ownSample (int fs_code, index_t id) const
 True if this rank owns the sample(id) Must be implemented by the Domain adapter. More...
 
virtual void addPDEToSystem (escript::AbstractSystemMatrix &mat, escript::Data &rhs, const escript::Data &A, const escript::Data &B, const escript::Data &C, const escript::Data &D, const escript::Data &X, const escript::Data &Y, const escript::Data &d, const escript::Data &y, const escript::Data &d_contact, const escript::Data &y_contact, const escript::Data &d_dirac, const escript::Data &y_dirac) const
 adds a PDE onto the stiffness matrix mat and a rhs More...
 
virtual void addPDEToLumpedSystem (escript::Data &mat, const escript::Data &D, const escript::Data &d, const escript::Data &d_dirac, const bool useHRZ) const
 adds a PDE onto the lumped stiffness matrix matrix More...
 
virtual void addPDEToRHS (escript::Data &rhs, const escript::Data &X, const escript::Data &Y, const escript::Data &y, const escript::Data &y_contact, const escript::Data &y_dirac) const
 adds a PDE onto the stiffness matrix mat and a rhs More...
 
virtual void addPDEToTransportProblem (escript::AbstractTransportProblem &tp, escript::Data &source, const escript::Data &M, const escript::Data &A, const escript::Data &B, const escript::Data &C, const escript::Data &D, const escript::Data &X, const escript::Data &Y, const escript::Data &d, const escript::Data &y, const escript::Data &d_contact, const escript::Data &y_contact, const escript::Data &d_dirac, const escript::Data &y_dirac) const
 adds a PDE onto a transport problem More...
 
escript::ASM_ptr newSystemMatrix (const int row_blocksize, const escript::FunctionSpace &row_functionspace, const int column_blocksize, const escript::FunctionSpace &column_functionspace, const int type) const
 creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros: More...
 
escript::ATP_ptr newTransportProblem (const int blocksize, const escript::FunctionSpace &functionspace, const int type) const
 creates a TransportProblemAdapter More...
 
virtual escript::Data getX () const
 returns locations in the FEM nodes More...
 
virtual escript::Data getNormal () const
 return boundary normals at the quadrature point on the face elements More...
 
virtual escript::Data getSize () const
 returns the element size More...
 
virtual bool operator== (const escript::AbstractDomain &other) const
 comparison operators More...
 
virtual bool operator!= (const escript::AbstractDomain &other) const
 Return true if given domains are not equal. More...
 
virtual void setTags (const int functionSpaceType, const 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...
 
virtual int getNumberOfTagsInUse (int functionSpaceCode) const
 return 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 bool canTag (int functionSpaceCode) const
 Checks if this domain allows tags for the specified functionSpaceCode. More...
 
virtual int getApproximationOrder (const int functionSpaceCode) const
 returns the approximation order used for a function space functionSpaceCode More...
 
bool supportsContactElements () const
 
virtual escript::Data randomFill (const escript::DataTypes::ShapeType &shape, const escript::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::AbstractContinuousDomain
 AbstractContinuousDomain ()
 Default constructor for AbstractContinuousDomain. More...
 
virtual ~AbstractContinuousDomain ()
 Destructor for AbstractContinuousDomain. 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...
 
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 Public Attributes

static const int DegreesOfFreedom =DUDLEY_DEGREES_OF_FREEDOM
 
static const int ReducedDegreesOfFreedom =DUDLEY_REDUCED_DEGREES_OF_FREEDOM
 
static const int Nodes =DUDLEY_NODES
 
static const int ReducedNodes =DUDLEY_REDUCED_NODES
 
static const int Elements =DUDLEY_ELEMENTS
 
static const int ReducedElements =DUDLEY_REDUCED_ELEMENTS
 
static const int FaceElements =DUDLEY_FACE_ELEMENTS
 
static const int ReducedFaceElements =DUDLEY_REDUCED_FACE_ELEMENTS
 
static const int Points =DUDLEY_POINTS
 
static const int ContactElementsZero
 
static const int ReducedContactElementsZero
 
static const int ContactElementsOne
 
static const int ReducedContactElementsOne
 

Private Member Functions

void extractArgsFromDict (const boost::python::dict &arg, int &numData, char **&names, escript::Data *&data, escript::Data **&dataPtr) const
 

Private Attributes

boost::shared_ptr< Dudley_Meshm_dudleyMesh
 

Static Private Attributes

static FunctionSpaceNamesMapType m_functionSpaceTypeNames
 

Detailed Description

MeshAdapter implements the AbstractContinuousDomain interface for the Dudley library.

Description: MeshAdapter implements the AbstractContinuousDomain interface for the Dudley library.

Member Typedef Documentation

typedef std::map<int, std::string> dudley::MeshAdapter::FunctionSpaceNamesMapType

5B

Constructor & Destructor Documentation

dudley::MeshAdapter::MeshAdapter ( Dudley_Mesh dudleyMesh = 0)

Constructor for MeshAdapter.

Description: Constructor for MeshAdapter. The pointer passed to MeshAdapter is deleted using a call to Dudley_Mesh_free in the MeshAdapter destructor.

Throws: May throw an exception derived from EsysException

Parameters
dudleyMeshInput - A pointer to the externally constructed dudley mesh.The pointer passed to MeshAdapter is deleted using a call to Dudley_Mesh_free in the MeshAdapter destructor.
dudley::MeshAdapter::MeshAdapter ( const MeshAdapter in)

Copy constructor.

References setFunctionSpaceTypeNames().

dudley::MeshAdapter::~MeshAdapter ( )

Destructor for MeshAdapter. As specified in the constructor this calls Dudley_Mesh_free for the pointer given to the constructor.

References Dudley_Mesh_free(), and m_dudleyMesh.

Member Function Documentation

void dudley::MeshAdapter::addPDEToLumpedSystem ( escript::Data mat,
const escript::Data D,
const escript::Data d,
const escript::Data d_dirac,
const bool  useHRZ 
) const
virtual
void dudley::MeshAdapter::addPDEToRHS ( escript::Data rhs,
const escript::Data X,
const escript::Data Y,
const escript::Data y,
const escript::Data y_contact,
const escript::Data y_dirac 
) const
virtual
void dudley::MeshAdapter::addPDEToSystem ( escript::AbstractSystemMatrix mat,
escript::Data rhs,
const escript::Data A,
const escript::Data B,
const escript::Data C,
const escript::Data D,
const escript::Data X,
const escript::Data Y,
const escript::Data d,
const escript::Data y,
const escript::Data d_contact,
const escript::Data y_contact,
const escript::Data d_dirac,
const escript::Data y_dirac 
) const
virtual
void dudley::MeshAdapter::addPDEToTransportProblem ( escript::AbstractTransportProblem tp,
escript::Data source,
const escript::Data M,
const escript::Data A,
const escript::Data B,
const escript::Data C,
const escript::Data D,
const escript::Data X,
const escript::Data Y,
const escript::Data d,
const escript::Data y,
const escript::Data d_contact,
const escript::Data y_contact,
const escript::Data d_dirac,
const escript::Data y_dirac 
) const
virtual
const int * dudley::MeshAdapter::borrowListOfTagsInUse ( int  functionSpaceCode) const
virtual
const int * dudley::MeshAdapter::borrowSampleReferenceIDs ( int  functionSpaceType) const
virtual
bool dudley::MeshAdapter::canTag ( int  functionSpaceCode) const
virtual

Checks if this domain allows tags for the specified functionSpaceCode.

Implements escript::AbstractDomain.

References DegreesOfFreedom, Elements, FaceElements, Nodes, Points, ReducedDegreesOfFreedom, ReducedElements, ReducedFaceElements, and ReducedNodes.

bool dudley::MeshAdapter::commonFunctionSpace ( const std::vector< int > &  fs,
int &  resultcode 
) const
virtual

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

Returns
true is result is valid, false if not

Implements escript::AbstractDomain.

References DegreesOfFreedom, Elements, FaceElements, Nodes, Points, ReducedDegreesOfFreedom, ReducedElements, ReducedFaceElements, and ReducedNodes.

void dudley::MeshAdapter::dump ( const std::string &  fileName) const
virtual
void dudley::MeshAdapter::extractArgsFromDict ( const boost::python::dict &  arg,
int &  numData,
char **&  names,
escript::Data *&  data,
escript::Data **&  dataPtr 
) const
private
string dudley::MeshAdapter::functionSpaceTypeAsString ( int  functionSpaceType) const
virtual

Return a description for the given function space type code.

Implements escript::AbstractDomain.

References m_functionSpaceTypeNames.

int dudley::MeshAdapter::getApproximationOrder ( const int  functionSpaceCode) const
virtual
int dudley::MeshAdapter::getContinuousFunctionCode ( ) const
virtual

Return a continuous FunctionSpace code.

Reimplemented from escript::AbstractContinuousDomain.

References Nodes.

pair< int, int > dudley::MeshAdapter::getDataShape ( int  functionSpaceCode) const
virtual
string dudley::MeshAdapter::getDescription ( ) const
virtual

Return a description for this domain.

Reimplemented from escript::AbstractContinuousDomain.

Referenced by BOOST_PYTHON_MODULE(), borrowSampleReferenceIDs(), getDataShape(), and getTagFromSampleNo().

int dudley::MeshAdapter::getDim ( ) const
virtual

Returns the spatial dimension of the domain.

This has to be implemented by the actual Domain adapter.

Implements escript::AbstractDomain.

References dudley::checkDudleyError(), Dudley_Mesh_getDim(), and m_dudleyMesh.

Referenced by BOOST_PYTHON_MODULE().

int dudley::MeshAdapter::getDiracDeltaFunctionsCode ( ) const
virtual

Return a DiracDeltaFunctions code.

Reimplemented from escript::AbstractContinuousDomain.

References Points.

Dudley_Mesh * dudley::MeshAdapter::getDudley_Mesh ( ) const

return the pointer to the underlying dudley mesh structure

References m_dudleyMesh.

Referenced by newSystemMatrix(), and newTransportProblem().

int dudley::MeshAdapter::getFunctionCode ( ) const
virtual

Return a function FunctionSpace code.

Reimplemented from escript::AbstractContinuousDomain.

References Elements.

int dudley::MeshAdapter::getFunctionOnBoundaryCode ( ) const
virtual

Return a function on boundary FunctionSpace code.

Reimplemented from escript::AbstractContinuousDomain.

References FaceElements.

int dudley::MeshAdapter::getFunctionOnContactOneCode ( ) const
virtual

Return a FunctionOnContactOne code.

Reimplemented from escript::AbstractContinuousDomain.

int dudley::MeshAdapter::getFunctionOnContactZeroCode ( ) const
virtual

Return a FunctionOnContactZero code.

Reimplemented from escript::AbstractContinuousDomain.

MPI_Comm dudley::MeshAdapter::getMPIComm ( ) const
virtual

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

Implements escript::AbstractDomain.

References m_dudleyMesh.

int dudley::MeshAdapter::getMPIRank ( ) const
virtual

return the number MPI rank of this processor

Implements escript::AbstractDomain.

References m_dudleyMesh.

Referenced by BOOST_PYTHON_MODULE().

int dudley::MeshAdapter::getMPISize ( ) const
virtual

return the number of processors used for this domain

Implements escript::AbstractDomain.

References m_dudleyMesh.

Referenced by BOOST_PYTHON_MODULE(), interpolateOnDomain(), ownSample(), and setToGradient().

escript::Data dudley::MeshAdapter::getNormal ( ) const
virtual

return boundary normals at the quadrature point on the face elements

Implements escript::AbstractDomain.

References escript::functionOnBoundary(), and escript::FunctionSpace::getNormal().

Referenced by BOOST_PYTHON_MODULE().

int dudley::MeshAdapter::getNumberOfTagsInUse ( int  functionSpaceCode) const
virtual
int dudley::MeshAdapter::getNumDataPointsGlobal ( ) const
virtual

Return the number of data points summed across all MPI processes.

Reimplemented from escript::AbstractContinuousDomain.

References Dudley_NodeFile_getGlobalNumNodes(), and m_dudleyMesh.

Referenced by BOOST_PYTHON_MODULE().

int dudley::MeshAdapter::getReducedContinuousFunctionCode ( ) const
virtual

Return a continuous on reduced order nodes FunctionSpace code.

Reimplemented from escript::AbstractContinuousDomain.

References ReducedNodes.

int dudley::MeshAdapter::getReducedFunctionCode ( ) const
virtual

Return a function with reduced integration order FunctionSpace code.

Reimplemented from escript::AbstractContinuousDomain.

References ReducedElements.

int dudley::MeshAdapter::getReducedFunctionOnBoundaryCode ( ) const
virtual

Return a function on boundary with reduced integration order FunctionSpace code.

Reimplemented from escript::AbstractContinuousDomain.

References ReducedFaceElements.

int dudley::MeshAdapter::getReducedFunctionOnContactOneCode ( ) const
virtual

Return a FunctionOnContactOne code with reduced integration order.

Reimplemented from escript::AbstractContinuousDomain.

int dudley::MeshAdapter::getReducedFunctionOnContactZeroCode ( ) const
virtual

Return a FunctionOnContactZero code with reduced integration order.

Reimplemented from escript::AbstractContinuousDomain.

int dudley::MeshAdapter::getReducedSolutionCode ( ) const
virtual

Return a ReducedSolution code.

Reimplemented from escript::AbstractContinuousDomain.

References ReducedDegreesOfFreedom.

escript::Data dudley::MeshAdapter::getSize ( ) const
virtual

returns the element size

Implements escript::AbstractDomain.

References escript::function(), and escript::FunctionSpace::getSize().

Referenced by BOOST_PYTHON_MODULE().

int dudley::MeshAdapter::getSolutionCode ( ) const
virtual

Return a Solution code.

Reimplemented from escript::AbstractContinuousDomain.

References DegreesOfFreedom.

AbstractDomain::StatusType dudley::MeshAdapter::getStatus ( ) const
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 from escript::AbstractDomain.

References Dudley_Mesh_getStatus(), and m_dudleyMesh.

int dudley::MeshAdapter::getSystemMatrixTypeId ( const boost::python::object &  options) const
virtual

return the identifier of the matrix type to be used for the global stiffness matrix when a particular solver, package, preconditioner, and symmetric matrix is used.

Parameters
optionsa SolverBuddy instance with the desired options set

Reimplemented from escript::AbstractContinuousDomain.

References escript::SolverBuddy::getPackage(), escript::SolverBuddy::getPreconditioner(), escript::SolverBuddy::getSolverMethod(), escript::SolverBuddy::isSymmetric(), and m_dudleyMesh.

Referenced by BOOST_PYTHON_MODULE().

int dudley::MeshAdapter::getTag ( const std::string &  name) const
virtual

Return the tag key for tag name.

Parameters
nameInput - tag name

Implements escript::AbstractDomain.

References dudley::checkDudleyError(), Dudley_Mesh_getTag(), and m_dudleyMesh.

Referenced by BOOST_PYTHON_MODULE().

int dudley::MeshAdapter::getTagFromSampleNo ( int  functionSpaceType,
int  sampleNo 
) const
virtual

Return the tag key for the given sample number.

Parameters
functionSpaceTypeInput - The function space type.
sampleNoInput - The sample number.

Implements escript::AbstractDomain.

References DegreesOfFreedom, Elements, Dudley_Mesh::Elements, FaceElements, Dudley_Mesh::FaceElements, getDescription(), m_dudleyMesh, Nodes, Dudley_Mesh::Nodes, Points, Dudley_Mesh::Points, ReducedDegreesOfFreedom, ReducedElements, ReducedFaceElements, ReducedNodes, Dudley_NodeFile::Tag, and Dudley_ElementFile::Tag.

int dudley::MeshAdapter::getTransportTypeId ( const int  solver,
const int  preconditioner,
const int  package,
const bool  symmetry 
) const
virtual

return the identifier of the transport problem type to be used when a particular solver, perconditioner, package and symmetric matrix is used.

Parameters
solver
preconditioner
package
symmetry

Reimplemented from escript::AbstractContinuousDomain.

References m_dudleyMesh, and Dudley_Mesh::MPIInfo.

Referenced by BOOST_PYTHON_MODULE().

escript::Data dudley::MeshAdapter::getX ( ) const
virtual

returns locations in the FEM nodes

Implements escript::AbstractDomain.

References escript::continuousFunction(), and escript::FunctionSpace::getX().

Referenced by BOOST_PYTHON_MODULE().

void dudley::MeshAdapter::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. has to be implemented by the actual Domain adapter.

Implements escript::AbstractDomain.

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

void dudley::MeshAdapter::interpolateOnDomain ( escript::Data target,
const escript::Data source 
) const
virtual
bool dudley::MeshAdapter::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.

Implements escript::AbstractDomain.

References dudley::checkDudleyError(), DegreesOfFreedom, Elements, FaceElements, Nodes, Points, ReducedDegreesOfFreedom, ReducedElements, and ReducedFaceElements.

bool dudley::MeshAdapter::isValidFunctionSpaceType ( int  functionSpaceType) const
virtual

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

Reimplemented from escript::AbstractContinuousDomain.

References m_functionSpaceTypeNames.

bool dudley::MeshAdapter::isValidTagName ( const std::string &  name) const
virtual

Returns true if name is a defined tage name.

Parameters
nameInput - tag name to be checked.

Reimplemented from escript::AbstractDomain.

References Dudley_Mesh_isValidTagName(), and m_dudleyMesh.

Referenced by BOOST_PYTHON_MODULE().

void dudley::MeshAdapter::MPIBarrier ( ) const
virtual

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

Implements escript::AbstractDomain.

References m_dudleyMesh.

Referenced by BOOST_PYTHON_MODULE().

ASM_ptr dudley::MeshAdapter::newSystemMatrix ( const int  row_blocksize,
const escript::FunctionSpace row_functionspace,
const int  column_blocksize,
const escript::FunctionSpace column_functionspace,
const int  type 
) const
virtual
ATP_ptr dudley::MeshAdapter::newTransportProblem ( const int  blocksize,
const escript::FunctionSpace functionspace,
const int  type 
) const
virtual
bool dudley::MeshAdapter::onMasterProcessor ( ) const
virtual

Return true if on MPI processor 0, else false.

Implements escript::AbstractDomain.

References m_dudleyMesh.

Referenced by BOOST_PYTHON_MODULE().

bool dudley::MeshAdapter::operator!= ( const escript::AbstractDomain other) const
virtual

Return true if given domains are not equal.

Implements escript::AbstractDomain.

References operator==().

bool dudley::MeshAdapter::operator== ( const escript::AbstractDomain other) const
virtual

comparison operators

Implements escript::AbstractDomain.

References m_dudleyMesh.

Referenced by operator!=().

bool dudley::MeshAdapter::ownSample ( int  fs_code,
index_t  id 
) const
virtual
signed char dudley::MeshAdapter::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.

References probeInterpolationOnDomain().

void dudley::MeshAdapter::Print_Mesh_Info ( const bool  full = false) const
virtual
Parameters
full

Reimplemented from escript::AbstractContinuousDomain.

References Dudley_PrintMesh_Info(), and m_dudleyMesh.

Referenced by BOOST_PYTHON_MODULE().

bool dudley::MeshAdapter::probeInterpolationAcross ( int  functionSpaceType_source,
const escript::AbstractDomain targetDomain,
int  functionSpaceType_target 
) const
virtual

determines whether interpolation from source to target is possible. Must be implemented by the actual Domain adapter

Implements escript::AbstractDomain.

bool dudley::MeshAdapter::probeInterpolationOnDomain ( int  functionSpaceType_source,
int  functionSpaceType_target 
) const
virtual
escript::Data dudley::MeshAdapter::randomFill ( const escript::DataTypes::ShapeType shape,
const escript::FunctionSpace what,
long  seed,
const boost::python::tuple &  filter 
) const
virtual

Fills the data object with filtered random values.

Implements escript::AbstractDomain.

References escript::Data::getExpandedVectorReference(), esysUtils::randomFillArray(), and escript::DataVector::size().

void dudley::MeshAdapter::setFunctionSpaceTypeNames ( )
void dudley::MeshAdapter::setNewX ( const escript::Data arg)
virtual
void dudley::MeshAdapter::setTagMap ( const std::string &  name,
int  tag 
)
virtual

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

Parameters
nameInput - tag name.
tagInput - tag key.

Implements escript::AbstractDomain.

References dudley::checkDudleyError(), Dudley_Mesh_addTagMap(), and m_dudleyMesh.

Referenced by BOOST_PYTHON_MODULE().

void dudley::MeshAdapter::setTags ( const int  functionSpaceType,
const int  newTag,
const escript::Data mask 
) const
virtual
void dudley::MeshAdapter::setToGradient ( escript::Data grad,
const escript::Data arg 
) const
virtual
void dudley::MeshAdapter::setToIntegrals ( std::vector< double > &  integrals,
const escript::Data arg 
) const
virtual
void dudley::MeshAdapter::setToNormal ( escript::Data out) const
virtual
void dudley::MeshAdapter::setToSize ( escript::Data out) const
virtual
void dudley::MeshAdapter::setToX ( escript::Data arg) const
virtual
string dudley::MeshAdapter::showTagNames ( ) const
virtual

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

Implements escript::AbstractDomain.

References m_dudleyMesh, Dudley_TagMap::name, Dudley_TagMap::next, and Dudley_Mesh::TagMap.

Referenced by BOOST_PYTHON_MODULE().

bool dudley::MeshAdapter::supportsContactElements ( ) const
virtual
void dudley::MeshAdapter::write ( const std::string &  fileName) const
virtual

Write the current mesh to a file with the given name.

Parameters
fileNameInput - The name of the file to write to.

Implements escript::AbstractDomain.

References dudley::checkDudleyError(), Dudley_Mesh_write(), and m_dudleyMesh.

Referenced by BOOST_PYTHON_MODULE().

Member Data Documentation

const int dudley::MeshAdapter::ContactElementsOne
static
const int dudley::MeshAdapter::ContactElementsZero
static
const int dudley::MeshAdapter::DegreesOfFreedom =DUDLEY_DEGREES_OF_FREEDOM
static
const int dudley::MeshAdapter::Elements =DUDLEY_ELEMENTS
static
const int dudley::MeshAdapter::FaceElements =DUDLEY_FACE_ELEMENTS
static
boost::shared_ptr<Dudley_Mesh> dudley::MeshAdapter::m_dudleyMesh
private
MeshAdapter::FunctionSpaceNamesMapType dudley::MeshAdapter::m_functionSpaceTypeNames
staticprivate
const int dudley::MeshAdapter::Nodes =DUDLEY_NODES
static
const int dudley::MeshAdapter::Points =DUDLEY_POINTS
static
const int dudley::MeshAdapter::ReducedContactElementsOne
static
const int dudley::MeshAdapter::ReducedContactElementsZero
static
const int dudley::MeshAdapter::ReducedDegreesOfFreedom =DUDLEY_REDUCED_DEGREES_OF_FREEDOM
static
const int dudley::MeshAdapter::ReducedElements =DUDLEY_REDUCED_ELEMENTS
static
const int dudley::MeshAdapter::ReducedFaceElements =DUDLEY_REDUCED_FACE_ELEMENTS
static
const int dudley::MeshAdapter::ReducedNodes =DUDLEY_REDUCED_NODES
static

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