ESScript  Revision_
Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
finley::MeshAdapter Class Reference

implements the AbstractContinuousDomain interface for the Finley library. More...

#include <MeshAdapter.h>

Public Types

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

Public Member Functions

 MeshAdapter (Mesh *finleyMesh=0)
 Constructor for MeshAdapter.
 MeshAdapter (const MeshAdapter &in)
 Copy constructor.
 ~MeshAdapter ()
 Destructor for MeshAdapter. As specified in the constructor this calls Finley_Mesh_free for the pointer given to the constructor.
virtual int getMPISize () const
 return the number of processors used for this domain
virtual int getMPIRank () const
 return the number MPI rank of this processor
virtual void MPIBarrier () const
 If compiled for MPI then execute an MPI_Barrier, else do nothing.
virtual bool onMasterProcessor () const
 Return true if on MPI processor 0, else false.
unsigned int getMPIComm () const
void write (const std::string &fileName) const
 Write the current mesh to a file with the given name.
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.
MeshgetFinley_Mesh () const
 return the pointer to the underlying finley mesh structure
int getTagFromSampleNo (int functionSpaceType, int sampleNo) const
 Return the tag key for the given sample number.
const int * borrowSampleReferenceIDs (int functionSpaceType) const
 Return the reference number of the given sample number.
virtual bool isValidFunctionSpaceType (int functionSpaceType) const
 Returns true if the given integer is a valid function space type for this domain.
virtual std::string getDescription () const
 Return a description for this domain.
virtual std::string functionSpaceTypeAsString (int functionSpaceType) const
 Return a description for the given function space type code.
void setFunctionSpaceTypeNames ()
 Build the table of function space type names.
virtual int getContinuousFunctionCode () const
 Return a continuous FunctionSpace code.
virtual int getReducedContinuousFunctionCode () const
 Return a continuous on reduced order nodes FunctionSpace code.
virtual int getFunctionCode () const
 Return a function FunctionSpace code.
virtual int getReducedFunctionCode () const
 Return a function with reduced integration order FunctionSpace code.
virtual int getFunctionOnBoundaryCode () const
 Return a function on boundary FunctionSpace code.
virtual int getReducedFunctionOnBoundaryCode () const
 Return a function on boundary with reduced integration order FunctionSpace code.
virtual int getFunctionOnContactZeroCode () const
 Return a FunctionOnContactZero code.
virtual int getReducedFunctionOnContactZeroCode () const
 Return a FunctionOnContactZero code with reduced integration order.
virtual int getFunctionOnContactOneCode () const
 Return a FunctionOnContactOne code.
virtual int getReducedFunctionOnContactOneCode () const
 Return a FunctionOnContactOne code with reduced integration order.
virtual int getSolutionCode () const
 Return a Solution code.
virtual int getReducedSolutionCode () const
 Return a ReducedSolution code.
virtual int getDiracDeltaFunctionsCode () const
 Return a DiracDeltaFunctions code.
virtual int getDim () const
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.
virtual int getNumDataPointsGlobal () const
 Return the number of data points summed across all MPI processes.
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.
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.
virtual void setTagMap (const std::string &name, int tag)
 sets a map from a clear tag name to a tag key
virtual int getTag (const std::string &name) const
 Return the tag key for tag name.
virtual bool isValidTagName (const std::string &name) const
 Returns true if name is a defined tage name.
virtual std::string showTagNames () const
 Returns all tag names in a single string sperated by commas.
virtual void setNewX (const escript::Data &arg)
 assigns new location to the domain
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.
virtual bool probeInterpolationOnDomain (int functionSpaceType_source, int functionSpaceType_target) const
virtual signed char preferredInterpolationOnDomain (int functionSpaceType_source, int functionSpaceType_target) const
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.
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.
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
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.
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.
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.
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.
virtual int getSystemMatrixTypeId (const int solver, const int preconditioner, const int package, const bool symmetry) const
 return the identifier of the matrix type to be used for the global stiffness matrix when a particular solver, package, perconditioner, and symmetric matrix is used.
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.
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.
virtual bool ownSample (int fs_code, index_t id) const
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
 returns the function space representation of the type functionSpaceCode on this domain as a vtkObject.
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
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
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
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:
escript::ATP_ptr newTransportProblem (const int blocksize, const escript::FunctionSpace &functionspace, const int type) const
 creates a TransportProblemAdapter
virtual escript::Data getX () const
 returns locations in the FEM nodes
virtual escript::Data getNormal () const
 return boundary normals at the quadrature point on the face elements
virtual escript::Data getSize () const
 returns the element size
virtual bool operator== (const escript::AbstractDomain &other) const
 comparison operators
virtual bool operator!= (const escript::AbstractDomain &other) const
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.
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
virtual const int * borrowListOfTagsInUse (int functionSpaceCode) const
virtual bool canTag (int functionSpaceCode) const
 Checks if this domain allows tags for the specified functionSpaceCode.
virtual int getApproximationOrder (const int functionSpaceCode) const
 returns the approximation order used for a function space functionSpaceCode
bool supportsContactElements () const

Static Public Attributes

static const int DegreesOfFreedom = FINLEY_DEGREES_OF_FREEDOM
static const int ReducedDegreesOfFreedom = FINLEY_REDUCED_DEGREES_OF_FREEDOM
static const int Nodes = FINLEY_NODES
static const int ReducedNodes = FINLEY_REDUCED_NODES
static const int Elements = FINLEY_ELEMENTS
static const int ReducedElements = FINLEY_REDUCED_ELEMENTS
static const int FaceElements = FINLEY_FACE_ELEMENTS
static const int ReducedFaceElements = FINLEY_REDUCED_FACE_ELEMENTS
static const int Points = FINLEY_POINTS
static const int ContactElementsZero = FINLEY_CONTACT_ELEMENTS_1
static const int ReducedContactElementsZero = FINLEY_REDUCED_CONTACT_ELEMENTS_1
static const int ContactElementsOne = FINLEY_CONTACT_ELEMENTS_2
static const int ReducedContactElementsOne = FINLEY_REDUCED_CONTACT_ELEMENTS_2

Private Member Functions

void addDiracPoints (const std::vector< double > &points, const std::vector< int > &tags) const
 adds points to support more Dirac delta function.
boost::shared_ptr< MeshgetMesh ()

Private Attributes

boost::shared_ptr< Meshm_finleyMesh

Static Private Attributes

static FunctionSpaceNamesMapType m_functionSpaceTypeNames

Friends

escript::Domain_ptr brick (int n0, int n1, int n2, int order, double l0, double l1, double l2, bool periodic0, bool periodic1, bool periodic2, int integrationOrder, int reducedIntegrationOrder, bool useElementsOnFace, bool useFullElementOrder, bool optimize, const std::vector< double > &points, const std::vector< int > &tags, const std::map< std::string, int > &tagnamestonums)
 Creates a rectangular mesh with n0 x n1 x n2 elements over the brick [0,l0] x [0,l1] x [0,l2].
escript::Domain_ptr rectangle (int n0, int n1, int order, double l0, double l1, bool periodic0, bool periodic1, int integrationOrder, int reducedIntegrationOrder, bool useElementsOnFace, bool useFullElementOrder, bool optimize, const std::vector< double > &points, const std::vector< int > &tags, const std::map< std::string, int > &tagnamestonums)
 Creates a rectangular mesh with n0 x n1 elements over the brick [0,l0] x [0,l1].

Detailed Description

implements the AbstractContinuousDomain interface for the Finley library.

Member Typedef Documentation

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

5B

Constructor & Destructor Documentation

finley::MeshAdapter::MeshAdapter ( Mesh finleyMesh = 0)

Constructor for MeshAdapter.

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

Throws: May throw an exception derived from EsysException

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

Copy constructor.

References setFunctionSpaceTypeNames().

finley::MeshAdapter::~MeshAdapter ( )

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

References m_finleyMesh.

Member Function Documentation

void finley::MeshAdapter::addDiracPoints ( const std::vector< double > &  points,
const std::vector< int > &  tags 
) const
private

adds points to support more Dirac delta function.

Do NOT call these at any time other than construction! Using them later creates consistency problems

References finley::Mesh::addPoints(), finley::checkFinleyError(), getDim(), and m_finleyMesh.

Referenced by finley::brick(), and finley::rectangle().

void finley::MeshAdapter::addPDEToLumpedSystem ( escript::Data &  mat,
const escript::Data &  D,
const escript::Data &  d,
const escript::Data &  d_dirac,
const bool  useHRZ 
) const
virtual
void finley::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 finley::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

returns the function space representation of the type functionSpaceCode on this domain as a vtkObject.

adds a PDE onto the stiffness matrix mat and a rhs

References finley::Assemble_PDE(), finley::checkFinleyError(), finley::Mesh::ContactElements, finley::Mesh::Elements, finley::Mesh::FaceElements, paso::SystemMatrixAdapter::getPaso_SystemMatrix(), m_finleyMesh, finley::Mesh::Nodes, finley::Mesh::Points, and S.

Referenced by BOOST_PYTHON_MODULE().

void finley::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 * finley::MeshAdapter::borrowListOfTagsInUse ( int  functionSpaceCode) const
virtual
const int * finley::MeshAdapter::borrowSampleReferenceIDs ( int  functionSpaceType) const
bool finley::MeshAdapter::canTag ( int  functionSpaceCode) const
virtual

Checks if this domain allows tags for the specified functionSpaceCode.

References ContactElementsOne, ContactElementsZero, Elements, FaceElements, Nodes, Points, ReducedContactElementsOne, ReducedContactElementsZero, ReducedElements, and ReducedFaceElements.

bool finley::MeshAdapter::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.

Returns
true is result is valid, false if not

References ContactElementsOne, ContactElementsZero, DegreesOfFreedom, Elements, FaceElements, Nodes, Points, ReducedContactElementsOne, ReducedContactElementsZero, ReducedDegreesOfFreedom, ReducedElements, ReducedFaceElements, and ReducedNodes.

void finley::MeshAdapter::dump ( const std::string &  fileName) const
string finley::MeshAdapter::functionSpaceTypeAsString ( int  functionSpaceType) const
virtual

Return a description for the given function space type code.

References m_functionSpaceTypeNames.

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

Return a continuous FunctionSpace code.

References Nodes.

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

Return a description for this domain.

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

int finley::MeshAdapter::getDim ( ) const
virtual
int finley::MeshAdapter::getDiracDeltaFunctionsCode ( ) const
virtual

Return a DiracDeltaFunctions code.

References Points.

Mesh * finley::MeshAdapter::getFinley_Mesh ( ) const

return the pointer to the underlying finley mesh structure

References m_finleyMesh.

Referenced by finley::glueFaces(), finley::joinFaces(), newSystemMatrix(), and newTransportProblem().

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

Return a function FunctionSpace code.

References Elements.

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

Return a function on boundary FunctionSpace code.

References FaceElements.

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

Return a FunctionOnContactOne code.

References ContactElementsOne.

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

Return a FunctionOnContactZero code.

References ContactElementsZero.

boost::shared_ptr<Mesh> finley::MeshAdapter::getMesh ( )
inlineprivate

References m_finleyMesh.

Referenced by finley::brick(), and finley::rectangle().

unsigned int finley::MeshAdapter::getMPIComm ( ) const

References m_finleyMesh.

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

return the number MPI rank of this processor

References m_finleyMesh.

Referenced by BOOST_PYTHON_MODULE().

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

return the number of processors used for this domain

References m_finleyMesh.

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

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

return boundary normals at the quadrature point on the face elements

Referenced by BOOST_PYTHON_MODULE().

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

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

References m_finleyMesh.

Referenced by BOOST_PYTHON_MODULE().

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

Return a continuous on reduced order nodes FunctionSpace code.

References ReducedNodes.

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

Return a function with reduced integration order FunctionSpace code.

References ReducedElements.

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

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

References ReducedFaceElements.

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

Return a FunctionOnContactOne code with reduced integration order.

References ReducedContactElementsOne.

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

Return a FunctionOnContactZero code with reduced integration order.

References ReducedContactElementsZero.

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

Return a ReducedSolution code.

References ReducedDegreesOfFreedom.

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

returns the element size

Referenced by BOOST_PYTHON_MODULE().

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

Return a Solution code.

References DegreesOfFreedom.

escript::AbstractDomain::StatusType finley::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.

References finley::Mesh::getStatus(), and m_finleyMesh.

int finley::MeshAdapter::getSystemMatrixTypeId ( const int  solver,
const int  preconditioner,
const int  package,
const bool  symmetry 
) const
virtual

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

Parameters
solver
preconditioner
package
symmetry

References m_finleyMesh, and finley::Mesh::MPIInfo.

Referenced by BOOST_PYTHON_MODULE().

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

Return the tag key for tag name.

Parameters
nameInput - tag name

References finley::checkFinleyError(), finley::Mesh::getTag(), and m_finleyMesh.

Referenced by BOOST_PYTHON_MODULE().

int finley::MeshAdapter::getTagFromSampleNo ( int  functionSpaceType,
int  sampleNo 
) const
int finley::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

References m_finleyMesh, and finley::Mesh::MPIInfo.

Referenced by BOOST_PYTHON_MODULE().

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

returns locations in the FEM nodes

Referenced by BOOST_PYTHON_MODULE().

void finley::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.

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

References ContactElementsOne, ContactElementsZero, DegreesOfFreedom, Elements, FaceElements, Nodes, Points, ReducedContactElementsOne, ReducedContactElementsZero, ReducedDegreesOfFreedom, ReducedElements, and ReducedFaceElements.

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

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

References m_functionSpaceTypeNames.

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

Returns true if name is a defined tage name.

Parameters
nameInput - tag name to be checked.

References finley::Mesh::isValidTagName(), and m_finleyMesh.

Referenced by BOOST_PYTHON_MODULE().

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

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

References m_finleyMesh.

Referenced by BOOST_PYTHON_MODULE().

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

Return true if on MPI processor 0, else false.

References m_finleyMesh.

Referenced by BOOST_PYTHON_MODULE().

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

References operator==().

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

comparison operators

References m_finleyMesh.

Referenced by operator!=().

bool finley::MeshAdapter::ownSample ( int  fs_code,
index_t  id 
) const
virtual
signed char finley::MeshAdapter::preferredInterpolationOnDomain ( int  functionSpaceType_source,
int  functionSpaceType_target 
) const
virtual
void finley::MeshAdapter::Print_Mesh_Info ( const bool  full = false) const
Parameters
full

References m_finleyMesh.

Referenced by BOOST_PYTHON_MODULE().

bool finley::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

bool finley::MeshAdapter::probeInterpolationOnDomain ( int  functionSpaceType_source,
int  functionSpaceType_target 
) const
virtual
void finley::MeshAdapter::setFunctionSpaceTypeNames ( )
void finley::MeshAdapter::setNewX ( const escript::Data &  arg)
virtual

assigns new location to the domain

References finley::checkFinleyError(), m_finleyMesh, and finley::Mesh::setCoordinates().

Referenced by BOOST_PYTHON_MODULE().

void finley::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.

References finley::Mesh::addTagMap(), finley::checkFinleyError(), and m_finleyMesh.

Referenced by BOOST_PYTHON_MODULE().

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

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.

References finley::Assemble_NodeCoordinates(), finley::checkFinleyError(), interpolateOnDomain(), m_finleyMesh, Nodes, and finley::Mesh::Nodes.

string finley::MeshAdapter::showTagNames ( ) const
virtual

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

References m_finleyMesh, and finley::Mesh::tagMap.

Referenced by BOOST_PYTHON_MODULE().

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

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

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

References finley::checkFinleyError(), and m_finleyMesh.

Referenced by BOOST_PYTHON_MODULE().

Friends And Related Function Documentation

escript::Domain_ptr brick ( int  n0,
int  n1,
int  n2,
int  order,
double  l0,
double  l1,
double  l2,
bool  periodic0,
bool  periodic1,
bool  periodic2,
int  integrationOrder,
int  reducedIntegrationOrder,
bool  useElementsOnFace,
bool  useFullElementOrder,
bool  optimize,
const std::vector< double > &  points,
const std::vector< int > &  tags,
const std::map< std::string, int > &  tagnamestonums 
)
friend

Creates a rectangular mesh with n0 x n1 x n2 elements over the brick [0,l0] x [0,l1] x [0,l2].

Parameters
n0,n1,n2number of elements in each dimension
order=1, =-1 or =2 gives the order of shape function (-1= macro elements of order 1)
l0,l1,l2length of each side of brick
periodic0,periodic1,periodic2whether or not boundary conditions of the dimension are periodic
integrationOrderorder of the quadrature scheme. If integrationOrder<0 the integration order is selected independently.
reducedIntegrationOrderorder of the reduced quadrature scheme. If reducedIntegrationOrder<0 the integration order is selected independently.
useElementsOnFacewhether or not to use elements on face
useFullElementOrderwhether to use second order elements
optimizewhether to apply optimization
points
tags
tagnamestonums
escript::Domain_ptr rectangle ( int  n0,
int  n1,
int  order,
double  l0,
double  l1,
bool  periodic0,
bool  periodic1,
int  integrationOrder,
int  reducedIntegrationOrder,
bool  useElementsOnFace,
bool  useFullElementOrder,
bool  optimize,
const std::vector< double > &  points,
const std::vector< int > &  tags,
const std::map< std::string, int > &  tagnamestonums 
)
friend

Creates a rectangular mesh with n0 x n1 elements over the brick [0,l0] x [0,l1].

Parameters
n0,n1number of elements in each dimension
l0,l1length of each side of brick
order=1, =-1 or =2 gives the order of shape function (-1= macro elements of order 1)
periodic0,periodic1whether or not the boundary conditions of the dimension are periodic
integrationOrderorder of the quadrature scheme. If integrationOrder<0 the integration order is selected independently.
reducedIntegrationOrderorder of the reduced quadrature scheme. If reducedIntegrationOrder<0 the integration order is selected independently.
useElementsOnFacewhether or not to use elements on face
useFullElementOrder
optimize
points
tags
tagnamestonums

Member Data Documentation

const int finley::MeshAdapter::ContactElementsOne = FINLEY_CONTACT_ELEMENTS_2
static
const int finley::MeshAdapter::ContactElementsZero = FINLEY_CONTACT_ELEMENTS_1
static
const int finley::MeshAdapter::DegreesOfFreedom = FINLEY_DEGREES_OF_FREEDOM
static
const int finley::MeshAdapter::Elements = FINLEY_ELEMENTS
static
const int finley::MeshAdapter::FaceElements = FINLEY_FACE_ELEMENTS
static
boost::shared_ptr<Mesh> finley::MeshAdapter::m_finleyMesh
private
MeshAdapter::FunctionSpaceNamesMapType finley::MeshAdapter::m_functionSpaceTypeNames
staticprivate
const int finley::MeshAdapter::Nodes = FINLEY_NODES
static
const int finley::MeshAdapter::Points = FINLEY_POINTS
static
const int finley::MeshAdapter::ReducedContactElementsOne = FINLEY_REDUCED_CONTACT_ELEMENTS_2
static
const int finley::MeshAdapter::ReducedContactElementsZero = FINLEY_REDUCED_CONTACT_ELEMENTS_1
static
const int finley::MeshAdapter::ReducedDegreesOfFreedom = FINLEY_REDUCED_DEGREES_OF_FREEDOM
static
const int finley::MeshAdapter::ReducedElements = FINLEY_REDUCED_ELEMENTS
static
const int finley::MeshAdapter::ReducedFaceElements = FINLEY_REDUCED_FACE_ELEMENTS
static
const int finley::MeshAdapter::ReducedNodes = FINLEY_REDUCED_NODES
static

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