escript
Revision_
|
implements the AbstractContinuousDomain interface for the Finley library. More...
#include <MeshAdapter.h>
Public Types | |
typedef std::map< int, std::string > | FunctionSpaceNamesMapType |
![]() | |
typedef int | StatusType |
Public Member Functions | |
MeshAdapter (Mesh *finleyMesh=NULL) | |
Constructor for MeshAdapter. More... | |
MeshAdapter (const MeshAdapter &in) | |
Copy constructor. More... | |
~MeshAdapter () | |
Destructor for MeshAdapter. As specified in the constructor this calls Finley_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 (bool full=false) const |
void | dump (const std::string &fileName) const |
dumps the mesh to a file with the given name. More... | |
Mesh * | getFinley_Mesh () const |
return the pointer to the underlying finley mesh structure More... | |
int | getTagFromSampleNo (int functionSpaceType, index_t sampleNo) const |
Return the tag key for the given sample number. More... | |
const index_t * | 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 dim_t | getNumDataPointsGlobal () const |
Return the number of data points summed across all MPI processes. More... | |
virtual std::pair< int, dim_t > | 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, perconditioner, 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 fsCode, 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 |
returns the function space representation of the type functionSpaceCode on this domain as a vtkObject. 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... | |
![]() | |
AbstractContinuousDomain () | |
Default constructor for AbstractContinuousDomain. More... | |
virtual | ~AbstractContinuousDomain () |
Destructor for AbstractContinuousDomain. More... | |
![]() | |
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 =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. More... | |
boost::shared_ptr< Mesh > | getMesh () |
Private Attributes | |
boost::shared_ptr< Mesh > | m_finleyMesh |
Static Private Attributes | |
static FunctionSpaceNamesMapType | m_functionSpaceTypeNames |
Friends | |
escript::Domain_ptr | brick (esysUtils::JMPI &p, dim_t n0, dim_t n1, dim_t 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]. More... | |
escript::Domain_ptr | rectangle (esysUtils::JMPI &p, dim_t n0, dim_t 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]. More... | |
escript::Domain_ptr | readMesh_driver (const boost::python::list &args) |
Python driver for readMesh() More... | |
escript::Domain_ptr | readMesh (esysUtils::JMPI &p, const std::string &fileName, int integrationOrder, int reducedIntegrationOrder, bool optimize, const std::vector< double > &points, const std::vector< int > &tags) |
escript::Domain_ptr | readGmsh_driver (const boost::python::list &args) |
Python driver for readGMesh() More... | |
escript::Domain_ptr | readGmsh (esysUtils::JMPI &p, const std::string &fileName, int numDim, int integrationOrder, int reducedIntegrationOrder, bool optimize, bool useMacroElements, const std::vector< double > &points, const std::vector< int > &tags) |
implements the AbstractContinuousDomain interface for the Finley library.
typedef std::map<int, std::string> finley::MeshAdapter::FunctionSpaceNamesMapType |
finley::MeshAdapter::MeshAdapter | ( | Mesh * | finleyMesh = NULL | ) |
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
finleyMesh | Input - 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.
|
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(), finley::readGmsh(), finley::readMesh(), and finley::rectangle().
|
virtual |
adds a PDE onto the lumped stiffness matrix matrix
References finley::Assemble_LumpedSystem(), finley::checkFinleyError(), finley::Mesh::Elements, finley::Mesh::FaceElements, m_finleyMesh, finley::Mesh::Nodes, and finley::Mesh::Points.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
adds a PDE onto the stiffness matrix mat and a rhs
Reimplemented from escript::AbstractContinuousDomain.
References finley::Assemble_PDE(), finley::checkFinleyError(), finley::Mesh::ContactElements, finley::Mesh::Elements, finley::Mesh::FaceElements, m_finleyMesh, finley::Mesh::Nodes, and finley::Mesh::Points.
Referenced by BOOST_PYTHON_MODULE().
|
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
Reimplemented from escript::AbstractContinuousDomain.
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().
|
virtual |
adds a PDE onto a transport problem
Reimplemented from escript::AbstractContinuousDomain.
References finley::Assemble_PDE(), finley::checkFinleyError(), finley::Mesh::ContactElements, finley::Mesh::Elements, escript::Data::expand(), finley::Mesh::FaceElements, paso::TransportProblemAdapter::getPaso_TransportProblem(), m_finleyMesh, finley::Mesh::Nodes, and finley::Mesh::Points.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
Implements escript::AbstractDomain.
References finley::Mesh::ContactElements, ContactElementsOne, ContactElementsZero, DegreesOfFreedom, Elements, finley::Mesh::Elements, FaceElements, finley::Mesh::FaceElements, m_finleyMesh, Nodes, finley::Mesh::Nodes, Points, finley::Mesh::Points, ReducedContactElementsOne, ReducedContactElementsZero, ReducedDegreesOfFreedom, ReducedElements, ReducedFaceElements, ReducedNodes, finley::ElementFile::tagsInUse, and finley::NodeFile::tagsInUse.
|
virtual |
Return the reference number of the given sample number.
functionSpaceType | Input - The function space type. |
Implements escript::AbstractDomain.
References finley::Mesh::ContactElements, ContactElementsOne, ContactElementsZero, DegreesOfFreedom, finley::NodeFile::degreesOfFreedomId, Elements, finley::Mesh::Elements, FaceElements, finley::Mesh::FaceElements, getDescription(), finley::ElementFile::Id, finley::NodeFile::Id, m_finleyMesh, Nodes, finley::Mesh::Nodes, Points, finley::Mesh::Points, ReducedContactElementsOne, ReducedContactElementsZero, ReducedDegreesOfFreedom, finley::NodeFile::reducedDegreesOfFreedomId, ReducedElements, ReducedFaceElements, ReducedNodes, and finley::NodeFile::reducedNodesId.
|
virtual |
Checks if this domain allows tags for the specified functionSpaceCode.
Implements escript::AbstractDomain.
References ContactElementsOne, ContactElementsZero, Elements, FaceElements, Nodes, Points, ReducedContactElementsOne, ReducedContactElementsZero, ReducedElements, and ReducedFaceElements.
|
virtual |
given a vector of FunctionSpace typecodes, pass back a code which then can all be interpolated to.
Implements escript::AbstractDomain.
References ContactElementsOne, ContactElementsZero, DegreesOfFreedom, Elements, FaceElements, Nodes, Points, ReducedContactElementsOne, ReducedContactElementsZero, ReducedDegreesOfFreedom, ReducedElements, ReducedFaceElements, and ReducedNodes.
|
virtual |
dumps the mesh to a file with the given name.
fileName | Input - The name of the file |
Implements escript::AbstractDomain.
References esysUtils::appendRankToFileName(), finley::checkFinleyError(), finley::ElementFile::Color, finley::Mesh::ContactElements, finley::NodeFile::Coordinates, finley::NodeFile::degreesOfFreedomDistribution, finley::Mesh::Elements, finley::Mesh::FaceElements, finley::NodeFile::globalDegreesOfFreedom, finley::NodeFile::globalNodesIndex, finley::NodeFile::globalReducedDOFIndex, finley::NodeFile::globalReducedNodesIndex, finley::ElementFile::Id, finley::NodeFile::Id, INDEX2, finley::Mesh::integrationOrder, IO_ERROR, m_finleyMesh, finley::Mesh::m_name, MPI_INT, finley::Mesh::MPIInfo, finley::ElementFile::Nodes, finley::Mesh::Nodes, finley::NodeFile::nodesDistribution, finley::NodeFile::numDim, finley::ElementFile::numElements, finley::NodeFile::numNodes, finley::ElementFile::numNodes, finley::ElementFile::Owner, finley::Mesh::Points, finley::Mesh::reducedIntegrationOrder, finley::ElementFile::referenceElementSet, finley::setError(), finley::ElementFile::Tag, finley::NodeFile::Tag, and finley::Mesh::tagMap.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
Return a description for the given function space type code.
Implements escript::AbstractDomain.
References m_functionSpaceTypeNames.
|
virtual |
returns the approximation order used for a function space functionSpaceCode
Implements escript::AbstractDomain.
References finley::Mesh::approximationOrder, ContactElementsOne, ContactElementsZero, DegreesOfFreedom, Elements, FaceElements, finley::Mesh::integrationOrder, m_finleyMesh, Nodes, Points, finley::Mesh::reducedApproximationOrder, ReducedContactElementsOne, ReducedContactElementsZero, ReducedDegreesOfFreedom, ReducedElements, ReducedFaceElements, finley::Mesh::reducedIntegrationOrder, and ReducedNodes.
|
virtual |
Return a continuous FunctionSpace code.
Reimplemented from escript::AbstractContinuousDomain.
References Nodes.
|
virtual |
Return the number of data points per sample, and the number of samples as a pair.
functionSpaceCode | Input - |
Reimplemented from escript::AbstractContinuousDomain.
References finley::Mesh::ContactElements, ContactElementsOne, ContactElementsZero, DegreesOfFreedom, Elements, finley::Mesh::Elements, FaceElements, finley::Mesh::FaceElements, getDescription(), finley::NodeFile::getNumDegreesOfFreedom(), finley::NodeFile::getNumNodes(), finley::NodeFile::getNumReducedDegreesOfFreedom(), finley::NodeFile::getNumReducedNodes(), m_finleyMesh, Nodes, finley::Mesh::Nodes, finley::ElementFile::numElements, Points, finley::Mesh::Points, ReducedContactElementsOne, ReducedContactElementsZero, ReducedDegreesOfFreedom, ReducedElements, ReducedFaceElements, ReducedNodes, and finley::ElementFile::referenceElementSet.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
Return a description for this domain.
Reimplemented from escript::AbstractContinuousDomain.
Referenced by BOOST_PYTHON_MODULE(), borrowSampleReferenceIDs(), getDataShape(), and getTagFromSampleNo().
|
virtual |
Returns the spatial dimension of the domain.
This has to be implemented by the actual Domain adapter.
Implements escript::AbstractDomain.
References finley::Mesh::getDim(), and m_finleyMesh.
Referenced by addDiracPoints(), and BOOST_PYTHON_MODULE().
|
virtual |
Return a DiracDeltaFunctions code.
Reimplemented from escript::AbstractContinuousDomain.
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().
|
virtual |
Return a function FunctionSpace code.
Reimplemented from escript::AbstractContinuousDomain.
References Elements.
|
virtual |
Return a function on boundary FunctionSpace code.
Reimplemented from escript::AbstractContinuousDomain.
References FaceElements.
|
virtual |
Return a FunctionOnContactOne code.
Reimplemented from escript::AbstractContinuousDomain.
References ContactElementsOne.
|
virtual |
Return a FunctionOnContactZero code.
Reimplemented from escript::AbstractContinuousDomain.
References ContactElementsZero.
|
inlineprivate |
Referenced by finley::brick(), and finley::rectangle().
|
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_finleyMesh.
|
virtual |
return the number MPI rank of this processor
Implements escript::AbstractDomain.
References m_finleyMesh.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
return the number of processors used for this domain
Implements escript::AbstractDomain.
References m_finleyMesh.
Referenced by BOOST_PYTHON_MODULE(), interpolateOnDomain(), ownSample(), and setToGradient().
|
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().
|
virtual |
return the number of tags in use and a pointer to an array with the number of tags in use
Implements escript::AbstractDomain.
References finley::Mesh::ContactElements, ContactElementsOne, ContactElementsZero, DegreesOfFreedom, Elements, finley::Mesh::Elements, FaceElements, finley::Mesh::FaceElements, m_finleyMesh, Nodes, finley::Mesh::Nodes, Points, finley::Mesh::Points, ReducedContactElementsOne, ReducedContactElementsZero, ReducedDegreesOfFreedom, ReducedElements, ReducedFaceElements, ReducedNodes, finley::ElementFile::tagsInUse, and finley::NodeFile::tagsInUse.
|
virtual |
Return the number of data points summed across all MPI processes.
Reimplemented from escript::AbstractContinuousDomain.
References m_finleyMesh.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
Return a continuous on reduced order nodes FunctionSpace code.
Reimplemented from escript::AbstractContinuousDomain.
References ReducedNodes.
|
virtual |
Return a function with reduced integration order FunctionSpace code.
Reimplemented from escript::AbstractContinuousDomain.
References ReducedElements.
|
virtual |
Return a function on boundary with reduced integration order FunctionSpace code.
Reimplemented from escript::AbstractContinuousDomain.
References ReducedFaceElements.
|
virtual |
Return a FunctionOnContactOne code with reduced integration order.
Reimplemented from escript::AbstractContinuousDomain.
References ReducedContactElementsOne.
|
virtual |
Return a FunctionOnContactZero code with reduced integration order.
Reimplemented from escript::AbstractContinuousDomain.
References ReducedContactElementsZero.
|
virtual |
Return a ReducedSolution code.
Reimplemented from escript::AbstractContinuousDomain.
References ReducedDegreesOfFreedom.
|
virtual |
returns the element size
Implements escript::AbstractDomain.
References escript::function(), and escript::FunctionSpace::getSize().
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
Return a Solution code.
Reimplemented from escript::AbstractContinuousDomain.
References DegreesOfFreedom.
|
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 finley::Mesh::getStatus(), and m_finleyMesh.
|
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.
options | a python object containing the solver, package, preconditioner and symmetry |
Reimplemented from escript::AbstractContinuousDomain.
References escript::SolverBuddy::getPackage(), escript::SolverBuddy::getPreconditioner(), escript::SolverBuddy::getSolverMethod(), escript::SolverBuddy::isSymmetric(), and m_finleyMesh.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
Return the tag key for tag name.
name | Input - tag name |
Implements escript::AbstractDomain.
References finley::checkFinleyError(), finley::Mesh::getTag(), and m_finleyMesh.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
Return the tag key for the given sample number.
functionSpaceType | Input - The function space type. |
sampleNo | Input - The sample number. |
Implements escript::AbstractDomain.
References finley::Mesh::ContactElements, ContactElementsOne, ContactElementsZero, DegreesOfFreedom, Elements, finley::Mesh::Elements, FaceElements, finley::Mesh::FaceElements, getDescription(), m_finleyMesh, Nodes, finley::Mesh::Nodes, Points, finley::Mesh::Points, ReducedContactElementsOne, ReducedContactElementsZero, ReducedDegreesOfFreedom, ReducedElements, ReducedFaceElements, ReducedNodes, finley::ElementFile::Tag, and finley::NodeFile::Tag.
|
virtual |
return the identifier of the transport problem type to be used when a particular solver, perconditioner, package and symmetric matrix is used.
solver | |
preconditioner | |
package | |
symmetry |
Reimplemented from escript::AbstractContinuousDomain.
References m_finleyMesh, and finley::Mesh::MPIInfo.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
returns locations in the FEM nodes
Implements escript::AbstractDomain.
References escript::continuousFunction(), and escript::FunctionSpace::getX().
Referenced by BOOST_PYTHON_MODULE().
|
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.
|
virtual |
interpolates data given on source onto target where source and target have to be given on the same domain.
Implements escript::AbstractDomain.
References finley::Assemble_AverageElementData(), finley::Assemble_CopyElementData(), finley::Assemble_CopyNodalData(), finley::Assemble_interpolate(), finley::checkFinleyError(), finley::Mesh::ContactElements, ContactElementsOne, ContactElementsZero, escript::continuousFunction(), DegreesOfFreedom, Elements, finley::Mesh::Elements, escript::Data::expand(), FaceElements, finley::Mesh::FaceElements, escript::FunctionSpace::getDomain(), escript::Data::getFunctionSpace(), getMPISize(), escript::FunctionSpace::getTypeCode(), m_finleyMesh, Nodes, finley::Mesh::Nodes, Points, finley::Mesh::Points, ReducedContactElementsOne, ReducedContactElementsZero, escript::reducedContinuousFunction(), ReducedDegreesOfFreedom, ReducedElements, ReducedFaceElements, and ReducedNodes.
Referenced by setToX().
|
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 ContactElementsOne, ContactElementsZero, DegreesOfFreedom, Elements, FaceElements, Nodes, Points, ReducedContactElementsOne, ReducedContactElementsZero, ReducedDegreesOfFreedom, ReducedElements, and ReducedFaceElements.
|
virtual |
Returns true if the given integer is a valid function space type for this domain.
Reimplemented from escript::AbstractContinuousDomain.
References m_functionSpaceTypeNames.
|
virtual |
Returns true if name is a defined tage name.
name | Input - tag name to be checked. |
Reimplemented from escript::AbstractDomain.
References finley::Mesh::isValidTagName(), and m_finleyMesh.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
If compiled for MPI then execute an MPI_Barrier, else do nothing.
Implements escript::AbstractDomain.
References m_finleyMesh.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
creates a SystemMatrixAdapter stiffness matrix and initializes it with zeros:
Reimplemented from escript::AbstractContinuousDomain.
References finley::checkFinleyError(), dudley::checkPasoError(), DegreesOfFreedom, escript::FunctionSpace::getDomain(), getFinley_Mesh(), finley::Mesh::getPattern(), escript::FunctionSpace::getTypeCode(), and ReducedDegreesOfFreedom.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
creates a TransportProblemAdapter
Reimplemented from escript::AbstractContinuousDomain.
References finley::checkFinleyError(), dudley::checkPasoError(), DegreesOfFreedom, escript::FunctionSpace::getDomain(), getFinley_Mesh(), finley::Mesh::getPattern(), escript::FunctionSpace::getTypeCode(), and ReducedDegreesOfFreedom.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
Return true if on MPI processor 0, else false.
Implements escript::AbstractDomain.
References m_finleyMesh.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
Return true if given domains are not equal.
Implements escript::AbstractDomain.
References operator==().
|
virtual |
comparison operators
Implements escript::AbstractDomain.
References m_finleyMesh.
Referenced by operator!=().
|
virtual |
True if this rank owns the sample(id) Must be implemented by the Domain adapter.
Implements escript::AbstractDomain.
References finley::NodeFile::borrowGlobalNodesIndex(), FINLEY_DEGREES_OF_FREEDOM, FINLEY_NODES, FINLEY_REDUCED_DEGREES_OF_FREEDOM, finley::NodeFile::getFirstNode(), finley::NodeFile::getLastNode(), getMPISize(), m_finleyMesh, and finley::Mesh::Nodes.
|
virtual |
Preferred direction of interpolation. If you really need to test for a particular direction, then use probeInterpolation.
Implements escript::AbstractDomain.
References probeInterpolationOnDomain().
|
virtual |
full |
Reimplemented from escript::AbstractContinuousDomain.
References m_finleyMesh.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
determines whether interpolation from source to target is possible. Must be implemented by the actual Domain adapter
Implements escript::AbstractDomain.
|
virtual |
True if interpolation is possible from source to target.
Implements escript::AbstractDomain.
References ContactElementsOne, ContactElementsZero, DegreesOfFreedom, Elements, FaceElements, Nodes, Points, ReducedContactElementsOne, ReducedContactElementsZero, ReducedDegreesOfFreedom, ReducedElements, ReducedFaceElements, and ReducedNodes.
Referenced by preferredInterpolationOnDomain().
|
virtual |
Fills the data object with filtered random values.
Implements escript::AbstractDomain.
References escript::Data::getExpandedVectorReference(), esysUtils::randomFillArray(), and escript::DataVector::size().
void finley::MeshAdapter::setFunctionSpaceTypeNames | ( | ) |
Build the table of function space type names.
References ContactElementsOne, ContactElementsZero, DegreesOfFreedom, Elements, FaceElements, m_functionSpaceTypeNames, Nodes, Points, ReducedContactElementsOne, ReducedContactElementsZero, ReducedDegreesOfFreedom, ReducedElements, ReducedFaceElements, and ReducedNodes.
Referenced by MeshAdapter().
|
virtual |
assigns new location to the domain
Reimplemented from escript::AbstractContinuousDomain.
References finley::checkFinleyError(), escript::continuousFunction(), escript::FunctionSpace::getDomain(), escript::Data::getFunctionSpace(), m_finleyMesh, and finley::Mesh::setCoordinates().
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
sets a map from a clear tag name to a tag key
name | Input - tag name. |
tag | Input - tag key. |
Implements escript::AbstractDomain.
References finley::Mesh::addTagMap(), finley::checkFinleyError(), and m_finleyMesh.
Referenced by BOOST_PYTHON_MODULE().
|
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 finley::checkFinleyError(), finley::Mesh::ContactElements, ContactElementsOne, ContactElementsZero, DegreesOfFreedom, Elements, finley::Mesh::Elements, FaceElements, finley::Mesh::FaceElements, m_finleyMesh, Nodes, finley::Mesh::Nodes, Points, finley::Mesh::Points, ReducedContactElementsOne, ReducedContactElementsZero, ReducedDegreesOfFreedom, ReducedElements, ReducedFaceElements, ReducedNodes, finley::NodeFile::setTags(), and finley::ElementFile::setTags().
|
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.
Implements escript::AbstractDomain.
References finley::Assemble_gradient(), finley::checkFinleyError(), finley::Mesh::ContactElements, ContactElementsOne, ContactElementsZero, escript::continuousFunction(), DegreesOfFreedom, Elements, finley::Mesh::Elements, FaceElements, finley::Mesh::FaceElements, escript::FunctionSpace::getDomain(), escript::Data::getFunctionSpace(), getMPISize(), escript::FunctionSpace::getTypeCode(), m_finleyMesh, Nodes, finley::Mesh::Nodes, Points, ReducedContactElementsOne, ReducedContactElementsZero, escript::reducedContinuousFunction(), ReducedDegreesOfFreedom, ReducedElements, ReducedFaceElements, and ReducedNodes.
|
virtual |
copies the integrals of the function defined by arg into integrals. arg has to be defined on this.
Reimplemented from escript::AbstractContinuousDomain.
References finley::Assemble_integrate(), blocktimer_increment(), blocktimer_time(), finley::checkFinleyError(), finley::Mesh::ContactElements, ContactElementsOne, ContactElementsZero, DegreesOfFreedom, Elements, finley::Mesh::Elements, FaceElements, finley::Mesh::FaceElements, escript::function(), escript::FunctionSpace::getDomain(), escript::Data::getFunctionSpace(), escript::FunctionSpace::getTypeCode(), m_finleyMesh, Nodes, finley::Mesh::Nodes, Points, ReducedContactElementsOne, ReducedContactElementsZero, ReducedDegreesOfFreedom, ReducedElements, ReducedFaceElements, and ReducedNodes.
|
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.
Implements escript::AbstractDomain.
References finley::Assemble_getNormal(), finley::checkFinleyError(), finley::Mesh::ContactElements, ContactElementsOne, ContactElementsZero, DegreesOfFreedom, Elements, FaceElements, finley::Mesh::FaceElements, escript::FunctionSpace::getDomain(), escript::Data::getFunctionSpace(), escript::FunctionSpace::getTypeCode(), m_finleyMesh, Nodes, finley::Mesh::Nodes, Points, ReducedContactElementsOne, ReducedContactElementsZero, ReducedDegreesOfFreedom, ReducedElements, ReducedFaceElements, and ReducedNodes.
|
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.
Implements escript::AbstractDomain.
References finley::Assemble_getSize(), finley::checkFinleyError(), finley::Mesh::ContactElements, ContactElementsOne, ContactElementsZero, DegreesOfFreedom, Elements, finley::Mesh::Elements, FaceElements, finley::Mesh::FaceElements, escript::Data::getFunctionSpace(), escript::FunctionSpace::getTypeCode(), m_finleyMesh, Nodes, finley::Mesh::Nodes, Points, ReducedContactElementsOne, ReducedContactElementsZero, ReducedDegreesOfFreedom, ReducedElements, ReducedFaceElements, and ReducedNodes.
|
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.
Implements escript::AbstractDomain.
References finley::Assemble_NodeCoordinates(), finley::checkFinleyError(), escript::continuousFunction(), escript::FunctionSpace::getDomain(), escript::Data::getFunctionSpace(), escript::FunctionSpace::getTypeCode(), interpolateOnDomain(), m_finleyMesh, Nodes, finley::Mesh::Nodes, and escript::Vector().
|
virtual |
Returns all tag names in a single string sperated by commas.
Implements escript::AbstractDomain.
References m_finleyMesh, and finley::Mesh::tagMap.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
Implements escript::AbstractDomain.
|
virtual |
Write the current mesh to a file with the given name.
fileName | Input - The name of the file to write to. |
Implements escript::AbstractDomain.
References finley::checkFinleyError(), and m_finleyMesh.
Referenced by BOOST_PYTHON_MODULE().
|
friend |
Creates a rectangular mesh with n0 x n1 x n2 elements over the brick [0,l0] x [0,l1] x [0,l2].
n0,n1,n2 | number of elements in each dimension |
order | =1, =-1 or =2 gives the order of shape function (-1= macro elements of order 1) |
l0,l1,l2 | length of each side of brick |
periodic0,periodic1,periodic2 | whether or not boundary conditions of the dimension are periodic |
integrationOrder | order of the quadrature scheme. If integrationOrder<0 the integration order is selected independently. |
reducedIntegrationOrder | order of the reduced quadrature scheme. If reducedIntegrationOrder<0 the integration order is selected independently. |
useElementsOnFace | whether or not to use elements on face |
useFullElementOrder | whether to use second order elements |
optimize | whether to apply optimization |
points | |
tags | |
tagNamesToNums |
|
friend |
|
friend |
Python driver for readGMesh()
args | see readGMesh() definition for order of params |
|
friend |
|
friend |
Python driver for readMesh()
args | see readMesh() definition for order of params |
|
friend |
Creates a rectangular mesh with n0 x n1 elements over the brick [0,l0] x [0,l1].
n0,n1 | number of elements in each dimension |
l0,l1 | length of each side of brick |
order | =1, =-1 or =2 gives the order of shape function (-1= macro elements of order 1) |
periodic0,periodic1 | whether or not the boundary conditions of the dimension are periodic |
integrationOrder | order of the quadrature scheme. If integrationOrder<0 the integration order is selected independently. |
reducedIntegrationOrder | order of the reduced quadrature scheme. If reducedIntegrationOrder<0 the integration order is selected independently. |
useElementsOnFace | whether or not to use elements on face |
useFullElementOrder | |
optimize | |
points | |
tags | |
tagNamesToNums |
|
static |
Referenced by borrowListOfTagsInUse(), borrowSampleReferenceIDs(), canTag(), commonFunctionSpace(), getApproximationOrder(), getDataShape(), getFunctionOnContactOneCode(), getNumberOfTagsInUse(), getTagFromSampleNo(), interpolateOnDomain(), isCellOriented(), probeInterpolationOnDomain(), setFunctionSpaceTypeNames(), setTags(), setToGradient(), setToIntegrals(), setToNormal(), and setToSize().
|
static |
Referenced by borrowListOfTagsInUse(), borrowSampleReferenceIDs(), canTag(), commonFunctionSpace(), getApproximationOrder(), getDataShape(), getFunctionOnContactZeroCode(), getNumberOfTagsInUse(), getTagFromSampleNo(), interpolateOnDomain(), isCellOriented(), probeInterpolationOnDomain(), setFunctionSpaceTypeNames(), setTags(), setToGradient(), setToIntegrals(), setToNormal(), and setToSize().
|
static |
Referenced by borrowListOfTagsInUse(), borrowSampleReferenceIDs(), commonFunctionSpace(), getApproximationOrder(), getDataShape(), getNumberOfTagsInUse(), getSolutionCode(), getTagFromSampleNo(), interpolateOnDomain(), isCellOriented(), newSystemMatrix(), newTransportProblem(), probeInterpolationOnDomain(), setFunctionSpaceTypeNames(), setTags(), setToGradient(), setToIntegrals(), setToNormal(), and setToSize().
|
static |
Referenced by borrowListOfTagsInUse(), borrowSampleReferenceIDs(), canTag(), commonFunctionSpace(), getApproximationOrder(), getDataShape(), getFunctionCode(), getNumberOfTagsInUse(), getTagFromSampleNo(), interpolateOnDomain(), isCellOriented(), probeInterpolationOnDomain(), setFunctionSpaceTypeNames(), setTags(), setToGradient(), setToIntegrals(), setToNormal(), and setToSize().
|
static |
Referenced by borrowListOfTagsInUse(), borrowSampleReferenceIDs(), canTag(), commonFunctionSpace(), getApproximationOrder(), getDataShape(), getFunctionOnBoundaryCode(), getNumberOfTagsInUse(), getTagFromSampleNo(), interpolateOnDomain(), isCellOriented(), probeInterpolationOnDomain(), setFunctionSpaceTypeNames(), setTags(), setToGradient(), setToIntegrals(), setToNormal(), and setToSize().
|
private |
Referenced by addDiracPoints(), addPDEToLumpedSystem(), addPDEToRHS(), addPDEToSystem(), addPDEToTransportProblem(), borrowListOfTagsInUse(), borrowSampleReferenceIDs(), dump(), getApproximationOrder(), getDataShape(), getDim(), getFinley_Mesh(), getMPIComm(), getMPIRank(), getMPISize(), getNumberOfTagsInUse(), getNumDataPointsGlobal(), getStatus(), getSystemMatrixTypeId(), getTag(), getTagFromSampleNo(), getTransportTypeId(), interpolateOnDomain(), isValidTagName(), MPIBarrier(), onMasterProcessor(), operator==(), ownSample(), Print_Mesh_Info(), setNewX(), setTagMap(), setTags(), setToGradient(), setToIntegrals(), setToNormal(), setToSize(), setToX(), showTagNames(), write(), and ~MeshAdapter().
|
staticprivate |
Referenced by functionSpaceTypeAsString(), isValidFunctionSpaceType(), and setFunctionSpaceTypeNames().
|
static |
Referenced by borrowListOfTagsInUse(), borrowSampleReferenceIDs(), canTag(), commonFunctionSpace(), getApproximationOrder(), getContinuousFunctionCode(), getDataShape(), getNumberOfTagsInUse(), getTagFromSampleNo(), interpolateOnDomain(), isCellOriented(), probeInterpolationOnDomain(), setFunctionSpaceTypeNames(), setTags(), setToGradient(), setToIntegrals(), setToNormal(), setToSize(), and setToX().
|
static |
Referenced by borrowListOfTagsInUse(), borrowSampleReferenceIDs(), canTag(), commonFunctionSpace(), getApproximationOrder(), getDataShape(), getDiracDeltaFunctionsCode(), getNumberOfTagsInUse(), getTagFromSampleNo(), interpolateOnDomain(), isCellOriented(), probeInterpolationOnDomain(), setFunctionSpaceTypeNames(), setTags(), setToGradient(), setToIntegrals(), setToNormal(), and setToSize().
|
static |
Referenced by borrowListOfTagsInUse(), borrowSampleReferenceIDs(), canTag(), commonFunctionSpace(), getApproximationOrder(), getDataShape(), getNumberOfTagsInUse(), getReducedFunctionOnContactOneCode(), getTagFromSampleNo(), interpolateOnDomain(), isCellOriented(), probeInterpolationOnDomain(), setFunctionSpaceTypeNames(), setTags(), setToGradient(), setToIntegrals(), setToNormal(), and setToSize().
|
static |
Referenced by borrowListOfTagsInUse(), borrowSampleReferenceIDs(), canTag(), commonFunctionSpace(), getApproximationOrder(), getDataShape(), getNumberOfTagsInUse(), getReducedFunctionOnContactZeroCode(), getTagFromSampleNo(), interpolateOnDomain(), isCellOriented(), probeInterpolationOnDomain(), setFunctionSpaceTypeNames(), setTags(), setToGradient(), setToIntegrals(), setToNormal(), and setToSize().
|
static |
Referenced by borrowListOfTagsInUse(), borrowSampleReferenceIDs(), commonFunctionSpace(), getApproximationOrder(), getDataShape(), getNumberOfTagsInUse(), getReducedSolutionCode(), getTagFromSampleNo(), interpolateOnDomain(), isCellOriented(), newSystemMatrix(), newTransportProblem(), probeInterpolationOnDomain(), setFunctionSpaceTypeNames(), setTags(), setToGradient(), setToIntegrals(), setToNormal(), and setToSize().
|
static |
Referenced by borrowListOfTagsInUse(), borrowSampleReferenceIDs(), canTag(), commonFunctionSpace(), getApproximationOrder(), getDataShape(), getNumberOfTagsInUse(), getReducedFunctionCode(), getTagFromSampleNo(), interpolateOnDomain(), isCellOriented(), probeInterpolationOnDomain(), setFunctionSpaceTypeNames(), setTags(), setToGradient(), setToIntegrals(), setToNormal(), and setToSize().
|
static |
Referenced by borrowListOfTagsInUse(), borrowSampleReferenceIDs(), canTag(), commonFunctionSpace(), getApproximationOrder(), getDataShape(), getNumberOfTagsInUse(), getReducedFunctionOnBoundaryCode(), getTagFromSampleNo(), interpolateOnDomain(), isCellOriented(), probeInterpolationOnDomain(), setFunctionSpaceTypeNames(), setTags(), setToGradient(), setToIntegrals(), setToNormal(), and setToSize().
|
static |
Referenced by borrowListOfTagsInUse(), borrowSampleReferenceIDs(), commonFunctionSpace(), getApproximationOrder(), getDataShape(), getNumberOfTagsInUse(), getReducedContinuousFunctionCode(), getTagFromSampleNo(), interpolateOnDomain(), probeInterpolationOnDomain(), setFunctionSpaceTypeNames(), setTags(), setToGradient(), setToIntegrals(), setToNormal(), and setToSize().