escript Revision_
|
DudleyDomain implements the AbstractContinuousDomain interface for the Dudley library. More...
#include <DudleyDomain.h>
Public Types | |
typedef std::map< int, std::string > | FunctionSpaceNamesMapType |
![]() | |
typedef int | StatusType |
Public Member Functions | |
DudleyDomain (const std::string &name, int numDim, escript::JMPI jmpi) | |
Constructor for DudleyDomain. | |
DudleyDomain (const DudleyDomain &in) | |
Copy constructor. | |
~DudleyDomain () | |
Destructor for DudleyDomain. | |
NodeFile * | getNodes () const |
returns a pointer to this domain's node file | |
void | setElements (ElementFile *elements) |
replaces the element file by elements | |
ElementFile * | getElements () const |
returns a pointer to this domain's element file | |
void | setFaceElements (ElementFile *elements) |
replaces the face element file by elements | |
ElementFile * | getFaceElements () const |
returns a pointer to this domain's face element file | |
void | setPoints (ElementFile *elements) |
replaces the point element file by elements | |
ElementFile * | getPoints () const |
returns a pointer to this domain's point (nodal) element file | |
virtual escript::JMPI | getMPI () const |
returns a reference to the MPI information wrapper for this domain | |
virtual int | getMPISize () const |
returns the number of processors used for this domain | |
virtual int | getMPIRank () const |
returns 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 |
returns true if on MPI processor 0, else false | |
MPI_Comm | getMPIComm () const |
get the communicator for this domain. Returns an integer on non-MPI builds Routine must be implemented by the DomainAdapter. | |
void | write (const std::string &fileName) const |
writes the current mesh to a file with the given name in the fly file format. | |
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. | |
int | getTagFromSampleNo (int functionSpaceType, index_t sampleNo) const |
Return the tag key for the given sample number. | |
const index_t * | 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 |
Returns the spatial dimension of the domain. | |
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 dim_t | getNumDataPointsGlobal () const |
Return the number of data points summed across all MPI processes. | |
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. | |
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 tag 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 |
True if interpolation is possible from source to target. | |
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. | |
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. | |
virtual bool | probeInterpolationAcross (int functionSpaceType_source, const escript::AbstractDomain &targetDomain, int functionSpaceType_target) const |
determines whether interpolation from source to target is possible. | |
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< escript::DataTypes::real_t > &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 void | setToIntegrals (std::vector< escript::DataTypes::cplx_t > &integrals, const escript::Data &arg) const |
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. | |
virtual int | getTransportTypeId (int solver, int preconditioner, int package, 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 fsCode, 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 |
adds a PDE onto the stiffness matrix mat and a rhs | |
virtual void | addPDEToLumpedSystem (escript::Data &mat, const escript::Data &D, const escript::Data &d, const escript::Data &d_dirac, 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 (int row_blocksize, const escript::FunctionSpace &row_functionspace, int column_blocksize, const escript::FunctionSpace &column_functionspace, int type) const |
creates a stiffness matrix and initializes it with zeros | |
escript::ATP_ptr | newTransportProblem (int blocksize, const escript::FunctionSpace &functionspace, int type) const |
creates a TransportProblem | |
virtual escript::Data | getX () const |
returns locations in the FEM nodes | |
virtual escript::Data | getNormal () const |
returns locations in the FEM nodes as a numpy ndarray | |
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 |
Return true if given domains are not equal. | |
virtual void | setTags (int functionSpaceType, int newTag, const escript::Data &mask) const |
assigns new tag newTag to all samples of functionspace with a positive value of mask for any its sample point. | |
virtual int | getNumberOfTagsInUse (int functionSpaceCode) const |
returns 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 functionSpace code. | |
virtual int | getApproximationOrder (int functionSpaceCode) const |
returns the approximation order used for a function space functionSpaceCode | |
virtual 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. | |
void | createMappings (const std::vector< index_t > &dofDistribution, const std::vector< index_t > &nodeDistribution) |
void | relabelElementNodes (const index_t *newNode, index_t offset) |
template<typename Scalar > | |
void | setToIntegralsWorker (std::vector< Scalar > &integrals, const escript::Data &arg) const |
![]() | |
AbstractContinuousDomain () | |
Default constructor for AbstractContinuousDomain. | |
virtual | ~AbstractContinuousDomain () |
Destructor for AbstractContinuousDomain. | |
![]() | |
Domain_ptr | getPtr () |
Returns smart pointer which is managing this object. If one does not exist yet it creates one. | |
const_Domain_ptr | getPtr () const |
virtual | ~AbstractDomain () |
Destructor for AbstractDomain. | |
virtual int | getTagFromSampleNo (int functionSpaceType, DataTypes::index_t sampleNo) const =0 |
Return the tag key for the given sample number. | |
virtual bool | ownSample (int fs_code, DataTypes::index_t id) const =0 |
True if this rank owns the sample(id) Must be implemented by the Domain adapter. | |
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. | |
virtual bool | supportsFilter (const boost::python::tuple &t) const |
true if this domain can handle to specified tuple of filter options. | |
Static Public Member Functions | |
static escript::Domain_ptr | load (const std::string &filename) |
recovers domain from a dump file | |
static escript::Domain_ptr | read (escript::JMPI mpiInfo, const std::string &filename, bool optimize) |
reads a mesh from a fly file. For MPI parallel runs fans out the mesh to multiple processes. | |
static escript::Domain_ptr | readGmsh (escript::JMPI mpiInfo, const std::string &filename, int numDim, bool optimize) |
reads a gmsh mesh file. | |
static escript::Domain_ptr | create2D (dim_t NE0, dim_t NE1, double l0, double l1, bool optimize, escript::JMPI jmpi) |
Creates a 2-dimensional rectangular domain. | |
static escript::Domain_ptr | create3D (dim_t NE0, dim_t NE1, dim_t NE2, double l0, double l1, double l2, bool optimize, escript::JMPI jmpi) |
Creates a 3-dimensional rectangular domain. | |
Private Member Functions | |
void | prepare (bool optimize) |
prepares the mesh for further use | |
void | resolveNodeIds () |
void | createColoring (const index_t *dofMap) |
tries to reduce the number of colours for all element files | |
void | distributeByRankOfDOF (const IndexVector &distribution) |
void | markNodes (std::vector< short > &mask, index_t offset) const |
void | optimizeDOFDistribution (IndexVector &distribution) |
void | optimizeDOFLabeling (const IndexVector &distribution) |
optimizes the labeling of the DOFs on each processor | |
void | optimizeElementOrdering () |
redistributes elements to minimize communication during assemblage | |
void | updateTagList () |
regenerates list of tags in use for node file and element files | |
void | printElementInfo (const ElementFile *e, const std::string &title, const std::string &defaultType, bool full) const |
void | writeElementInfo (std::ostream &stream, const ElementFile *e, const std::string &defaultType) const |
Private Attributes | |
escript::JMPI | m_mpiInfo |
MPI information. | |
std::string | m_name |
domain description | |
NodeFile * | m_nodes |
the table of the nodes | |
ElementFile * | m_elements |
the table of the elements | |
ElementFile * | m_faceElements |
the table of face elements | |
ElementFile * | m_points |
the table of points (treated as elements of dimension 0) | |
TagMap | m_tagMap |
the tag map mapping names to tag keys | |
Static Private Attributes | |
static FunctionSpaceNamesMapType | m_functionSpaceTypeNames |
DudleyDomain implements the AbstractContinuousDomain interface for the Dudley library.
typedef std::map<int, std::string> dudley::DudleyDomain::FunctionSpaceNamesMapType |
dudley::DudleyDomain::DudleyDomain | ( | const std::string & | name, |
int | numDim, | ||
escript::JMPI | jmpi | ||
) |
Constructor for DudleyDomain.
name | a descriptive name for the domain |
numDim | dimensionality of the domain (2 or 3) |
jmpi | shared pointer to MPI Information to be used |
References m_mpiInfo, m_nodes, and setFunctionSpaceTypeNames().
dudley::DudleyDomain::DudleyDomain | ( | const DudleyDomain & | in | ) |
Copy constructor.
References setFunctionSpaceTypeNames().
dudley::DudleyDomain::~DudleyDomain | ( | ) |
Destructor for DudleyDomain.
References m_elements, m_faceElements, m_nodes, and m_points.
|
virtual |
adds a PDE onto the lumped stiffness matrix matrix
References dudley::Assemble_LumpedSystem(), m_elements, m_faceElements, m_nodes, and m_points.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
adds a PDE onto the stiffness matrix mat and a rhs
Reimplemented from escript::AbstractContinuousDomain.
References dudley::Assemble_PDE(), escript::Data::isEmpty(), m_elements, m_faceElements, m_nodes, and m_points.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
adds a PDE onto the stiffness matrix mat and a rhs
Reimplemented from escript::AbstractContinuousDomain.
References dudley::Assemble_PDE(), escript::AbstractSystemMatrix::getPtr(), escript::Data::isEmpty(), m_elements, m_faceElements, m_nodes, and m_points.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
adds a PDE onto a transport problem
Reimplemented from escript::AbstractContinuousDomain.
References dudley::Assemble_PDE(), paso::TransportProblem::borrowMassMatrix(), paso::TransportProblem::borrowTransportMatrix(), escript::Data::expand(), escript::Data::isEmpty(), m_elements, m_faceElements, m_nodes, and m_points.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
Implements escript::AbstractDomain.
References dudley::DegreesOfFreedom, dudley::Elements, dudley::FaceElements, dudley::Nodes, dudley::Points, dudley::ReducedElements, and dudley::ReducedFaceElements.
|
virtual |
Return the reference number of the given sample number.
functionSpaceType | Input - The function space type. |
Implements escript::AbstractDomain.
References dudley::DegreesOfFreedom, dudley::Elements, dudley::FaceElements, dudley::Nodes, dudley::Points, dudley::ReducedElements, and dudley::ReducedFaceElements.
|
virtual |
Checks if this domain allows tags for the specified functionSpace code.
Implements escript::AbstractDomain.
References dudley::Elements, dudley::FaceElements, dudley::Nodes, dudley::Points, dudley::ReducedElements, and dudley::ReducedFaceElements.
|
virtual |
given a vector of FunctionSpace typecodes, pass back a code which then can all be interpolated to.
Implements escript::AbstractDomain.
References dudley::DegreesOfFreedom, dudley::Elements, dudley::FaceElements, dudley::Nodes, dudley::Points, dudley::ReducedElements, and dudley::ReducedFaceElements.
|
static |
Creates a 2-dimensional rectangular domain.
NE0 | Input - number of elements in first dimension |
NE1 | Input - number of elements in second dimension |
l0 | Input - length of domain in first dimension (width) |
l1 | Input - length of domain in second dimension (height) |
optimize | Input - whether to optimize node/DOF labelling |
jmpi | Input - Shared pointer to MPI Information to be used |
References dudley::ElementFile::allocTable(), dudley::NodeFile::allocTable(), dudley::NodeFile::Coordinates, DIM, dudley::Dudley_Line2, dudley::Dudley_Point1, dudley::Dudley_Tri3, getNodes(), dudley::NodeFile::globalDegreesOfFreedom, dudley::ElementFile::Id, dudley::NodeFile::Id, INDEX2, dudley::ElementFile::Nodes, dudley::ElementFile::numNodes, dudley::ElementFile::Owner, prepare(), resolveNodeIds(), setElements(), setFaceElements(), setPoints(), setTagMap(), dudley::ElementFile::Tag, and dudley::NodeFile::Tag.
Referenced by dudley::rectangle().
|
static |
Creates a 3-dimensional rectangular domain.
NE0 | Input - number of elements in first dimension |
NE1 | Input - number of elements in second dimension |
NE2 | Input - number of elements in third dimension |
l0 | Input - length of domain in first dimension (width) |
l1 | Input - length of domain in second dimension (height) |
l2 | Input - length of domain in third dimension (depth) |
optimize | Input - whether to optimize node/DOF labelling |
jmpi | Input - Shared pointer to MPI Information to be used |
References dudley::ElementFile::allocTable(), dudley::NodeFile::allocTable(), dudley::NodeFile::Coordinates, DIM, dudley::Dudley_Point1, dudley::Dudley_Tet4, dudley::Dudley_Tri3, getNodes(), dudley::NodeFile::globalDegreesOfFreedom, dudley::ElementFile::Id, dudley::NodeFile::Id, INDEX2, MAX3, dudley::ElementFile::Nodes, dudley::ElementFile::numNodes, dudley::ElementFile::Owner, prepare(), resolveNodeIds(), setElements(), setFaceElements(), setPoints(), setTagMap(), dudley::ElementFile::Tag, and dudley::NodeFile::Tag.
Referenced by dudley::brick().
|
private |
tries to reduce the number of colours for all element files
Referenced by distributeByRankOfDOF().
void dudley::DudleyDomain::createMappings | ( | const std::vector< index_t > & | dofDistribution, |
const std::vector< index_t > & | nodeDistribution | ||
) |
|
private |
redistributes the Nodes and Elements including overlap according to the DOF distribution. It will create an element colouring but will not create any mappings.
References dudley::NodeFile::assignMPIRankToDOFs(), createColoring(), dudley::ElementFile::distributeByRankOfDOF(), ESYS_ASSERT, dudley::NodeFile::getDOFRange(), dudley::NodeFile::getNumNodes(), dudley::NodeFile::globalDegreesOfFreedom, dudley::NodeFile::Id, m_elements, m_faceElements, m_nodes, m_points, and resolveNodeIds().
|
virtual |
dumps the mesh to a file with the given name.
fileName | Input - The name of the file |
Implements escript::AbstractDomain.
References dudley::ElementFile::Color, dudley::NodeFile::Coordinates, dudley::NodeFile::dofDistribution, dudley::ElementFile::etype, getMPIComm(), getMPIRank(), getMPISize(), dudley::NodeFile::getNumNodes(), dudley::NodeFile::globalDegreesOfFreedom, dudley::NodeFile::globalNodesIndex, dudley::ElementFile::Id, dudley::NodeFile::Id, m_elements, m_faceElements, m_mpiInfo, m_name, m_nodes, m_points, m_tagMap, MPI_INT, dudley::ElementFile::Nodes, dudley::NodeFile::nodesDistribution, dudley::NodeFile::numDim, dudley::ElementFile::numElements, dudley::ElementFile::numNodes, dudley::ElementFile::Owner, dudley::ElementFile::Tag, and dudley::NodeFile::Tag.
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 dudley::DegreesOfFreedom, dudley::Elements, dudley::FaceElements, dudley::Nodes, dudley::Points, dudley::ReducedElements, and dudley::ReducedFaceElements.
|
virtual |
Return a continuous FunctionSpace code.
Reimplemented from escript::AbstractContinuousDomain.
References dudley::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 dudley::DegreesOfFreedom, dudley::Elements, dudley::FaceElements, getDescription(), dudley::NodeFile::getNumDegreesOfFreedom(), dudley::NodeFile::getNumNodes(), m_elements, m_faceElements, m_nodes, m_points, dudley::Nodes, dudley::ElementFile::numElements, dudley::ElementFile::numLocalDim, dudley::Points, dudley::ReducedElements, and dudley::ReducedFaceElements.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
Return a description for this domain.
Reimplemented from escript::AbstractContinuousDomain.
Referenced by BOOST_PYTHON_MODULE(), and getDataShape().
|
inlinevirtual |
Returns the spatial dimension of the domain.
This has to be implemented by the actual Domain adapter.
Implements escript::AbstractDomain.
Referenced by BOOST_PYTHON_MODULE(), Print_Mesh_Info(), resolveNodeIds(), and write().
|
virtual |
Return a DiracDeltaFunctions code.
Reimplemented from escript::AbstractContinuousDomain.
References dudley::Points.
|
inline |
returns a pointer to this domain's element file
Referenced by weipa::FinleyDomain::initFromEscript().
|
inline |
returns a pointer to this domain's face element file
Referenced by weipa::FinleyDomain::initFromEscript().
|
virtual |
Return a function FunctionSpace code.
Reimplemented from escript::AbstractContinuousDomain.
References dudley::Elements.
|
virtual |
Return a function on boundary FunctionSpace code.
Reimplemented from escript::AbstractContinuousDomain.
References dudley::FaceElements.
|
virtual |
Return a FunctionOnContactOne code.
Reimplemented from escript::AbstractContinuousDomain.
|
virtual |
Return a FunctionOnContactZero code.
Reimplemented from escript::AbstractContinuousDomain.
|
inlinevirtual |
returns a reference to the MPI information wrapper for this domain
Implements escript::AbstractDomain.
|
inlinevirtual |
get the communicator for this domain. Returns an integer on non-MPI builds Routine must be implemented by the DomainAdapter.
Implements escript::AbstractDomain.
Referenced by dump(), and MPIBarrier().
|
inlinevirtual |
returns the number MPI rank of this processor
Implements escript::AbstractDomain.
Referenced by BOOST_PYTHON_MODULE(), and dump().
|
inlinevirtual |
returns the number of processors used for this domain
Implements escript::AbstractDomain.
Referenced by BOOST_PYTHON_MODULE(), dump(), interpolateOnDomain(), ownSample(), and setToGradient().
|
inline |
returns a pointer to this domain's node file
Referenced by create2D(), create3D(), weipa::FinleyDomain::initFromEscript(), load(), read(), and readGmsh().
|
virtual |
returns locations in the FEM nodes as a numpy ndarray
returns boundary normals at the quadrature point on the face elements
Implements escript::AbstractDomain.
References escript::FunctionSpace::getNormal().
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
returns the number of tags in use and a pointer to an array with the number of tags in use
Implements escript::AbstractDomain.
References dudley::DegreesOfFreedom, dudley::Elements, dudley::FaceElements, dudley::Nodes, dudley::Points, dudley::ReducedElements, and dudley::ReducedFaceElements.
|
virtual |
Return the number of data points summed across all MPI processes.
Reimplemented from escript::AbstractContinuousDomain.
References dudley::NodeFile::getGlobalNumNodes(), and m_nodes.
Referenced by BOOST_PYTHON_MODULE().
|
inline |
returns a pointer to this domain's point (nodal) element file
|
virtual |
Return a continuous on reduced order nodes FunctionSpace code.
Reimplemented from escript::AbstractContinuousDomain.
References dudley::Nodes.
|
virtual |
Return a function with reduced integration order FunctionSpace code.
Reimplemented from escript::AbstractContinuousDomain.
References dudley::ReducedElements.
|
virtual |
Return a function on boundary with reduced integration order FunctionSpace code.
Reimplemented from escript::AbstractContinuousDomain.
References dudley::ReducedFaceElements.
|
virtual |
Return a FunctionOnContactOne code with reduced integration order.
Reimplemented from escript::AbstractContinuousDomain.
|
virtual |
Return a FunctionOnContactZero code with reduced integration order.
Reimplemented from escript::AbstractContinuousDomain.
|
virtual |
Return a ReducedSolution code.
Reimplemented from escript::AbstractContinuousDomain.
References dudley::DegreesOfFreedom.
|
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 dudley::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.
Reimplemented from escript::AbstractDomain.
|
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.
options | a SolverBuddy instance with the desired options set |
Reimplemented from escript::AbstractContinuousDomain.
References escript::SolverBuddy::getPackage(), escript::SolverBuddy::getPreconditioner(), escript::SolverBuddy::getSolverMethod(), paso::SystemMatrix< T >::getSystemMatrixTypeId(), escript::SolverBuddy::isComplex(), escript::isDirectSolver(), escript::SolverBuddy::isSymmetric(), dudley::SMT_COMPLEX, dudley::SMT_PASO, dudley::SMT_TRILINOS, dudley::SMT_UNROLL, escript::SO_DEFAULT, escript::SO_METHOD_DIRECT, escript::SO_PACKAGE_TRILINOS, escript::SO_PRECONDITIONER_AMG, and escript::SO_PRECONDITIONER_ILUT.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
Return the tag key for tag name.
name | Input - tag name |
Implements escript::AbstractDomain.
Referenced by BOOST_PYTHON_MODULE().
int dudley::DudleyDomain::getTagFromSampleNo | ( | int | functionSpaceType, |
index_t | sampleNo | ||
) | const |
Return the tag key for the given sample number.
functionSpaceType | Input - The function space type. |
sampleNo | Input - The sample number. |
References dudley::DegreesOfFreedom, dudley::Elements, dudley::FaceElements, dudley::Nodes, dudley::Points, dudley::ReducedElements, and dudley::ReducedFaceElements.
|
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 paso::TransportProblem::getTypeId().
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
returns locations in the FEM nodes
Implements escript::AbstractDomain.
References 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.
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 dudley::DegreesOfFreedom, dudley::Elements, escript::Data::expand(), dudley::FaceElements, escript::FunctionSpace::getDomain(), escript::Data::getFunctionSpace(), getMPISize(), escript::FunctionSpace::getTypeCode(), escript::Data::isComplex(), m_elements, m_faceElements, m_nodes, m_points, dudley::Nodes, dudley::Points, dudley::ReducedElements, and dudley::ReducedFaceElements.
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 dudley::DegreesOfFreedom, dudley::Elements, dudley::FaceElements, dudley::Nodes, dudley::Points, dudley::ReducedElements, and dudley::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 tag name.
name | Input - tag name to be checked. |
Reimplemented from escript::AbstractDomain.
Referenced by BOOST_PYTHON_MODULE().
|
static |
recovers domain from a dump file
filename | the name of the file |
References dudley::ElementFile::allocTable(), dudley::NodeFile::allocTable(), dudley::cleanupAndThrow(), dudley::ElementFile::Color, dudley::NodeFile::Coordinates, createMappings(), getNodes(), escript::AbstractDomain::getPtr(), dudley::NodeFile::globalDegreesOfFreedom, dudley::NodeFile::globalNodesIndex, dudley::ElementFile::Id, dudley::NodeFile::Id, INDEX2, escript::makeInfo(), dudley::ElementFile::maxColor, dudley::ElementFile::minColor, MPI_COMM_WORLD, dudley::ElementFile::Nodes, dudley::ElementFile::Owner, setElements(), setFaceElements(), setPoints(), setTagMap(), dudley::ElementFile::Tag, dudley::NodeFile::Tag, dudley::ElementFile::updateTagList(), and dudley::NodeFile::updateTagList().
Referenced by BOOST_PYTHON_MODULE().
|
private |
References m_elements, m_faceElements, m_points, and dudley::ElementFile::markNodes().
Referenced by resolveNodeIds().
|
virtual |
If compiled for MPI then execute an MPI_Barrier, else do nothing.
Implements escript::AbstractDomain.
References getMPIComm().
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
creates a stiffness matrix and initializes it with zeros
Reimplemented from escript::AbstractContinuousDomain.
References dudley::DegreesOfFreedom, escript::FunctionSpace::getDomain(), escript::FunctionSpace::getTypeCode(), m_mpiInfo, MATRIX_FORMAT_COMPLEX, dudley::SMT_COMPLEX, dudley::SMT_PASO, dudley::SMT_TRILINOS, and dudley::SMT_UNROLL.
Referenced by BOOST_PYTHON_MODULE().
|
virtual |
creates a TransportProblem
Reimplemented from escript::AbstractContinuousDomain.
References dudley::DegreesOfFreedom, escript::FunctionSpace::getDomain(), and escript::FunctionSpace::getTypeCode().
Referenced by BOOST_PYTHON_MODULE().
|
inlinevirtual |
returns true if on MPI processor 0, else false
Implements escript::AbstractDomain.
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_elements, m_faceElements, m_nodes, and m_points.
Referenced by operator!=().
|
private |
optimizes the distribution of DOFs across processors using ParMETIS. On return a new distribution is given and the globalDOF are relabeled accordingly but the mesh has not been redistributed yet
References dudley::NodeFile::Coordinates, dudley::NodeFile::getNumNodes(), dudley::NodeFile::globalDegreesOfFreedom, INDEX2, dudley::IndexList_insertElementsWithRowRangeNoMainDiagonal(), m_elements, m_faceElements, m_mpiInfo, m_nodes, m_points, and dudley::NodeFile::numDim.
|
private |
optimizes the labeling of the DOFs on each processor
References paso::Pattern::fromIndexListArray(), dudley::NodeFile::getNumNodes(), dudley::NodeFile::globalDegreesOfFreedom, dudley::IndexList_insertElementsWithRowRangeNoMainDiagonal(), m_elements, m_faceElements, m_mpiInfo, m_nodes, and m_points.
|
private |
redistributes elements to minimize communication during assemblage
|
virtual |
|
virtual |
Preferred direction of interpolation. If you really need to test for a particular direction, then use probeInterpolation.
Implements escript::AbstractDomain.
References probeInterpolationOnDomain().
|
private |
prepares the mesh for further use
Referenced by create2D(), create3D(), read(), and readGmsh().
|
virtual |
full | whether to include coordinate values and id's |
Reimplemented from escript::AbstractContinuousDomain.
References dudley::NodeFile::Coordinates, getDim(), dudley::NodeFile::getNumNodes(), dudley::NodeFile::globalDegreesOfFreedom, dudley::NodeFile::globalNodesIndex, dudley::NodeFile::Id, INDEX2, m_elements, m_faceElements, m_mpiInfo, m_name, m_nodes, m_points, m_tagMap, printElementInfo(), and dudley::NodeFile::Tag.
Referenced by BOOST_PYTHON_MODULE().
|
private |
References dudley::ElementFile::Color, dudley::ElementFile::ename, dudley::ElementFile::etype, dudley::ElementFile::Id, dudley::NodeFile::Id, INDEX2, m_mpiInfo, m_nodes, dudley::ElementFile::Nodes, dudley::ElementFile::numElements, dudley::ElementFile::numNodes, dudley::ElementFile::Owner, and dudley::ElementFile::Tag.
Referenced by Print_Mesh_Info().
|
virtual |
determines whether interpolation from source to target is possible.
Implements escript::AbstractDomain.
|
virtual |
True if interpolation is possible from source to target.
Implements escript::AbstractDomain.
References dudley::DegreesOfFreedom, dudley::Elements, dudley::FaceElements, dudley::Nodes, dudley::Points, dudley::ReducedElements, and dudley::ReducedFaceElements.
Referenced by preferredInterpolationOnDomain().
|
virtual |
Fills the data object with filtered random values.
Implements escript::AbstractDomain.
References escript::Data::getExpandedVectorReference(), escript::randomFillArray(), and escript::DataTypes::DataVectorAlt< T >::size().
|
static |
reads a mesh from a fly file. For MPI parallel runs fans out the mesh to multiple processes.
mpiInfo | the MPI information structure |
fileName | the name of the file |
optimize | whether to optimize the node labels |
References dudley::NodeFile::allocTable(), dudley::NodeFile::Coordinates, getNodes(), escript::AbstractDomain::getPtr(), dudley::NodeFile::globalDegreesOfFreedom, dudley::NodeFile::Id, INDEX2, MPI_DOUBLE, MPI_INT, prepare(), resolveNodeIds(), setElements(), setFaceElements(), setPoints(), setTagMap(), and dudley::NodeFile::Tag.
Referenced by dudley::readMesh().
|
static |
reads a gmsh mesh file.
reads a mesh from a gmsh file of name filename
mpiInfo | the MPI information structure |
filename | the name of the gmsh file |
numDim | spatial dimensionality |
optimize | whether to optimize the node labels |
References dudley::ElementFile::allocTable(), dudley::NodeFile::allocTable(), dudley::ElementFile::Color, dudley::NodeFile::Coordinates, dudley::Dudley_Line2, dudley::Dudley_NoRef, dudley::Dudley_Point1, dudley::Dudley_Tet4, dudley::Dudley_Tri3, getNodes(), escript::AbstractDomain::getPtr(), dudley::NodeFile::globalDegreesOfFreedom, dudley::ElementFile::Id, dudley::NodeFile::Id, INDEX2, MAX_numNodes_gmsh, dudley::ElementFile::maxColor, dudley::ElementFile::minColor, dudley::ElementFile::Nodes, dudley::ElementFile::numNodes, dudley::ElementFile::Owner, prepare(), resolveNodeIds(), setElements(), setFaceElements(), setPoints(), setTagMap(), dudley::ElementFile::Tag, and dudley::NodeFile::Tag.
Referenced by dudley::readGmsh().
void dudley::DudleyDomain::relabelElementNodes | ( | const index_t * | newNode, |
index_t | offset | ||
) |
assigns new node reference numbers to all element files. If k is the old node, the new node is newNode[k-offset].
References m_elements, m_faceElements, m_points, and dudley::ElementFile::relabelNodes().
Referenced by resolveNodeIds().
|
private |
Initially the element nodes refer to the numbering defined by the global id assigned to the nodes in the NodeFile. It is also not ensured that all nodes referred by an element are actually available on the process. At the output, a local node labeling is used and all nodes are available. In particular the numbering of the element nodes is between 0 and Nodes->numNodes. The function does not create a distribution of the degrees of freedom.
References dudley::NodeFile::allocTable(), ESYS_ASSERT, dudley::NodeFile::gather_global(), getDim(), dudley::ElementFile::getNodeRange(), escript::DataTypes::index_t_max(), m_elements, m_faceElements, m_mpiInfo, m_nodes, m_points, markNodes(), MPI_MAX, dudley::util::packMask(), and relabelElementNodes().
Referenced by create2D(), create3D(), distributeByRankOfDOF(), read(), and readGmsh().
void dudley::DudleyDomain::setElements | ( | ElementFile * | elements | ) |
replaces the element file by elements
References m_elements.
Referenced by create2D(), create3D(), load(), read(), and readGmsh().
void dudley::DudleyDomain::setFaceElements | ( | ElementFile * | elements | ) |
replaces the face element file by elements
References m_faceElements.
Referenced by create2D(), create3D(), load(), read(), and readGmsh().
void dudley::DudleyDomain::setFunctionSpaceTypeNames | ( | ) |
Build the table of function space type names.
References dudley::DegreesOfFreedom, dudley::Elements, dudley::FaceElements, m_functionSpaceTypeNames, dudley::Nodes, dudley::Points, dudley::ReducedElements, and dudley::ReducedFaceElements.
Referenced by DudleyDomain(), and DudleyDomain().
|
virtual |
assigns new location to the domain
Reimplemented from escript::AbstractContinuousDomain.
References escript::FunctionSpace::getDomain(), escript::Data::getFunctionSpace(), m_nodes, and dudley::NodeFile::setCoordinates().
Referenced by BOOST_PYTHON_MODULE().
void dudley::DudleyDomain::setPoints | ( | ElementFile * | elements | ) |
replaces the point element file by elements
References m_points.
Referenced by create2D(), create3D(), load(), read(), and readGmsh().
|
virtual |
sets a map from a clear tag name to a tag key
name | Input - tag name. |
tag | Input - tag key. |
Implements escript::AbstractDomain.
Referenced by BOOST_PYTHON_MODULE(), create2D(), create3D(), load(), read(), and readGmsh().
|
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 dudley::DegreesOfFreedom, dudley::Elements, dudley::FaceElements, dudley::Nodes, dudley::Points, dudley::ReducedElements, and dudley::ReducedFaceElements.
|
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 dudley::DegreesOfFreedom, dudley::Elements, dudley::FaceElements, escript::FunctionSpace::getDomain(), escript::Data::getFunctionSpace(), getMPISize(), escript::FunctionSpace::getTypeCode(), escript::Data::isComplex(), m_elements, m_faceElements, m_nodes, dudley::Nodes, dudley::Points, dudley::ReducedElements, and dudley::ReducedFaceElements.
|
virtual |
Reimplemented from escript::AbstractContinuousDomain.
|
virtual |
copies the integrals of the function defined by arg into integrals. arg has to be defined on this.
Reimplemented from escript::AbstractContinuousDomain.
void dudley::DudleyDomain::setToIntegralsWorker | ( | std::vector< Scalar > & | integrals, |
const escript::Data & | arg | ||
) | const |
References dudley::Assemble_integrate(), dudley::DegreesOfFreedom, dudley::Elements, dudley::FaceElements, escript::function(), escript::FunctionSpace::getDomain(), escript::Data::getFunctionSpace(), escript::FunctionSpace::getTypeCode(), m_elements, m_faceElements, m_nodes, dudley::Nodes, dudley::Points, dudley::ReducedElements, and dudley::ReducedFaceElements.
|
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 dudley::Assemble_getNormal(), dudley::FaceElements, escript::FunctionSpace::getDomain(), escript::Data::getFunctionSpace(), escript::FunctionSpace::getTypeCode(), m_faceElements, m_nodes, and dudley::ReducedFaceElements.
|
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 dudley::Assemble_getSize(), dudley::DegreesOfFreedom, dudley::Elements, dudley::FaceElements, escript::Data::getFunctionSpace(), escript::FunctionSpace::getTypeCode(), m_elements, m_faceElements, m_nodes, dudley::Nodes, dudley::Points, dudley::ReducedElements, and dudley::ReducedFaceElements.
|
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 dudley::Assemble_NodeCoordinates(), escript::FunctionSpace::getDomain(), escript::Data::getFunctionSpace(), escript::FunctionSpace::getTypeCode(), interpolateOnDomain(), m_nodes, and dudley::Nodes.
|
virtual |
Returns all tag names in a single string sperated by commas.
Implements escript::AbstractDomain.
Referenced by BOOST_PYTHON_MODULE().
|
inlinevirtual |
Implements escript::AbstractDomain.
|
private |
regenerates list of tags in use for node file and element files
|
virtual |
writes the current mesh to a file with the given name in the fly file format.
fileName | Input - The name of the file to write to. |
Implements escript::AbstractDomain.
References dudley::NodeFile::Coordinates, getDim(), dudley::NodeFile::getNumNodes(), dudley::NodeFile::globalDegreesOfFreedom, dudley::NodeFile::Id, INDEX2, m_elements, m_faceElements, m_mpiInfo, m_name, m_nodes, m_points, m_tagMap, dudley::NodeFile::Tag, and writeElementInfo().
Referenced by BOOST_PYTHON_MODULE().
|
private |
|
private |
the table of the elements
Referenced by addPDEToLumpedSystem(), addPDEToRHS(), addPDEToSystem(), addPDEToTransportProblem(), createMappings(), distributeByRankOfDOF(), dump(), getDataShape(), interpolateOnDomain(), markNodes(), operator==(), optimizeDOFDistribution(), optimizeDOFLabeling(), Print_Mesh_Info(), relabelElementNodes(), resolveNodeIds(), setElements(), setToGradient(), setToIntegralsWorker(), setToSize(), write(), and ~DudleyDomain().
|
private |
the table of face elements
Referenced by addPDEToLumpedSystem(), addPDEToRHS(), addPDEToSystem(), addPDEToTransportProblem(), createMappings(), distributeByRankOfDOF(), dump(), getDataShape(), interpolateOnDomain(), markNodes(), operator==(), optimizeDOFDistribution(), optimizeDOFLabeling(), Print_Mesh_Info(), relabelElementNodes(), resolveNodeIds(), setFaceElements(), setToGradient(), setToIntegralsWorker(), setToNormal(), setToSize(), write(), and ~DudleyDomain().
|
staticprivate |
Referenced by functionSpaceTypeAsString(), isValidFunctionSpaceType(), and setFunctionSpaceTypeNames().
|
private |
MPI information.
Referenced by DudleyDomain(), dump(), newSystemMatrix(), optimizeDOFDistribution(), optimizeDOFLabeling(), Print_Mesh_Info(), printElementInfo(), resolveNodeIds(), and write().
|
private |
domain description
Referenced by dump(), Print_Mesh_Info(), and write().
|
private |
the table of the nodes
Referenced by addPDEToLumpedSystem(), addPDEToRHS(), addPDEToSystem(), addPDEToTransportProblem(), createMappings(), distributeByRankOfDOF(), DudleyDomain(), dump(), getDataShape(), getNumDataPointsGlobal(), interpolateOnDomain(), operator==(), optimizeDOFDistribution(), optimizeDOFLabeling(), ownSample(), Print_Mesh_Info(), printElementInfo(), resolveNodeIds(), setNewX(), setToGradient(), setToIntegralsWorker(), setToNormal(), setToSize(), setToX(), write(), writeElementInfo(), and ~DudleyDomain().
|
private |
the table of points (treated as elements of dimension 0)
Referenced by addPDEToLumpedSystem(), addPDEToRHS(), addPDEToSystem(), addPDEToTransportProblem(), createMappings(), distributeByRankOfDOF(), dump(), getDataShape(), interpolateOnDomain(), markNodes(), operator==(), optimizeDOFDistribution(), optimizeDOFLabeling(), Print_Mesh_Info(), relabelElementNodes(), resolveNodeIds(), setPoints(), write(), and ~DudleyDomain().
|
private |
the tag map mapping names to tag keys
Referenced by dump(), Print_Mesh_Info(), and write().