DudleyDomain.h
Go to the documentation of this file.
/*****************************************************************************
*
* Copyright (c) 2003-2017 by The University of Queensland
* http://www.uq.edu.au
*
* Primary Business: Queensland, Australia
* Licensed under the Apache License, version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Development until 2012 by Earth Systems Science Computational Center (ESSCC)
* Development 2012-2013 by School of Earth Sciences
* Development from 2014 by Centre for Geoscience Computing (GeoComp)
*
*****************************************************************************/
#ifndef __DUDLEY_DOMAIN_H__
#define __DUDLEY_DOMAIN_H__
/****************************************************************************
Dudley: Domain
A mesh is built from nodes and elements which describe the domain, surface,
and point sources (the latter are needed to establish links with other
codes, in particular particle codes). The nodes are stored in a NodeFile
and elements in ElementFiles. Dudley domains have three ElementFiles
containing the elements, surface and point sources, respectively.
Notice that the surface elements do not necessarily cover the entire
surface of the domain.
The element type is either Tri3 or Tet4 depending on dimensionality
and also determines the type of surface elements to be used.
The numbering of the nodes starts with 0.
Important: it is assumed that every node appears in at least one element or
surface element and that any node used in an element, surface element or as
a point is specified in the NodeFile, see also resolveNodeIds.
All nodes and elements are tagged. The tag allows to group nodes and
elements. A typical application is to mark surface elements on a
certain portion of the domain with the same tag. All these surface
elements can then be assigned the same value e.g. for the pressure.
*****************************************************************************/
#include <dudley/Dudley.h>
#include <dudley/ElementFile.h>
#include <dudley/NodeFile.h>
#include <dudley/Util.h>
#include <escript/AbstractContinuousDomain.h>
#include <escript/FunctionSpace.h>
#include <escript/FunctionSpaceFactory.h>
#ifdef ESYS_HAVE_PASO
#include <paso/SystemMatrixPattern.h>
#endif
#ifdef ESYS_HAVE_TRILINOS
#include <trilinoswrap/types.h>
#endif
#include <map>
#include <string>
#include <vector>
namespace dudley {
typedef std::map<std::string, int> TagMap;
enum SystemMatrixType {
SMT_PASO = 1<<8,
SMT_TRILINOS = 1<<10,
SMT_COMPLEX = 1<<16,
SMT_UNROLL = 1<<17
};
class DudleyDomain : public escript::AbstractContinuousDomain
{
public:
static escript::Domain_ptr load(const std::string& filename);
static escript::Domain_ptr read(escript::JMPI mpiInfo,
const std::string& filename, bool optimize);
static escript::Domain_ptr readGmsh(escript::JMPI mpiInfo,
const std::string& filename, int numDim,
bool optimize);
static escript::Domain_ptr create2D(dim_t NE0, dim_t NE1, double l0,
double l1, bool optimize,
escript::JMPI jmpi);
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);
DudleyDomain(const std::string& name, int numDim, escript::JMPI jmpi);
DudleyDomain(const DudleyDomain& in);
~DudleyDomain();
NodeFile* getNodes() const { return m_nodes; }
void setElements(ElementFile* elements);
ElementFile* getElements() const { return m_elements; }
void setFaceElements(ElementFile* elements);
ElementFile* getFaceElements() const { return m_faceElements; }
void setPoints(ElementFile* elements);
ElementFile* getPoints() const { return m_points; }
virtual escript::JMPI getMPI() const { return m_mpiInfo; }
virtual int getMPISize() const { return m_mpiInfo->size; }
virtual int getMPIRank() const { return m_mpiInfo->rank; }
virtual void MPIBarrier() const;
virtual bool onMasterProcessor() const { return getMPIRank() == 0; }
MPI_Comm getMPIComm() const { return m_mpiInfo->comm; }
void write(const std::string& fileName) const;
void Print_Mesh_Info(bool full=false) const;
void dump(const std::string& fileName) const;
int getTagFromSampleNo(int functionSpaceType, index_t sampleNo) const;
const index_t* borrowSampleReferenceIDs(int functionSpaceType) const;
virtual bool isValidFunctionSpaceType(int functionSpaceType) const;
virtual std::string getDescription() const;
virtual std::string functionSpaceTypeAsString(int functionSpaceType) const;
void setFunctionSpaceTypeNames();
virtual int getContinuousFunctionCode() const;
virtual int getReducedContinuousFunctionCode() const;
virtual int getFunctionCode() const;
virtual int getReducedFunctionCode() const;
virtual int getFunctionOnBoundaryCode() const;
virtual int getReducedFunctionOnBoundaryCode() const;
virtual int getFunctionOnContactZeroCode() const;
virtual int getReducedFunctionOnContactZeroCode() const;
virtual int getFunctionOnContactOneCode() const;
virtual int getReducedFunctionOnContactOneCode() const;
virtual int getSolutionCode() const;
virtual int getReducedSolutionCode() const;
virtual int getDiracDeltaFunctionsCode() const;
typedef std::map<int, std::string> FunctionSpaceNamesMapType;
virtual int getDim() const { return m_nodes->numDim; }
virtual StatusType getStatus() const;
virtual dim_t getNumDataPointsGlobal() const;
virtual std::pair<int,dim_t> getDataShape(int functionSpaceCode) const;
virtual void setToX(escript::Data& arg) const;
virtual void setTagMap(const std::string& name, int tag);
virtual int getTag(const std::string& name) const;
virtual bool isValidTagName(const std::string& name) const;
virtual std::string showTagNames() const;
virtual void setNewX(const escript::Data& arg);
virtual void interpolateOnDomain(escript::Data& target,
const escript::Data& source) const;
virtual bool probeInterpolationOnDomain(int functionSpaceType_source,
int functionSpaceType_target) const;
virtual signed char preferredInterpolationOnDomain(int functionSpaceType_source, int functionSpaceType_target) const;
bool commonFunctionSpace(const std::vector<int>& fs, int& resultcode) const;
virtual void interpolateAcross(escript::Data& target, const escript::Data& source) const;
virtual bool probeInterpolationAcross(int functionSpaceType_source,
const escript::AbstractDomain& targetDomain,
int functionSpaceType_target) const;
virtual void setToNormal(escript::Data& out) const;
virtual void setToSize(escript::Data& out) const;
virtual void setToGradient(escript::Data& grad, const escript::Data& arg) const;
virtual void setToIntegrals(std::vector<escript::DataTypes::real_t>& integrals,
const escript::Data& arg) const;
virtual void setToIntegrals(std::vector<escript::DataTypes::cplx_t>& integrals,
const escript::Data& arg) const;
virtual int getSystemMatrixTypeId(const boost::python::object& options) const;
virtual int getTransportTypeId(int solver, int preconditioner, int package,
bool symmetry) const;
virtual bool isCellOriented(int functionSpaceCode) const;
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;
virtual void addPDEToLumpedSystem(escript::Data& mat,
const escript::Data& D,
const escript::Data& d,
const escript::Data& d_dirac,
bool useHRZ) const;
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;
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;
escript::ASM_ptr newSystemMatrix(
int row_blocksize,
const escript::FunctionSpace& row_functionspace,
int column_blocksize,
const escript::FunctionSpace& column_functionspace,
int type) const;
escript::ATP_ptr newTransportProblem(int blocksize,
const escript::FunctionSpace& functionspace,
int type) const;
virtual escript::Data getX() const;
virtual escript::Data getNormal() const;
virtual escript::Data getSize() const;
virtual bool operator==(const escript::AbstractDomain& other) const;
virtual bool operator!=(const escript::AbstractDomain& other) const;
virtual void setTags(int functionSpaceType, int newTag,
const escript::Data& mask) const;
virtual int getNumberOfTagsInUse(int functionSpaceCode) const;
virtual const int* borrowListOfTagsInUse(int functionSpaceCode) const;
virtual bool canTag(int functionSpaceCode) const;
virtual int getApproximationOrder(int functionSpaceCode) const;
virtual bool supportsContactElements() const { return false; }
virtual escript::Data randomFill(const escript::DataTypes::ShapeType& shape,
const escript::FunctionSpace& what, long seed,
const boost::python::tuple& filter) const;
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;
#ifdef ESYS_HAVE_PASO
paso::SystemMatrixPattern_ptr getPasoPattern() const;
#endif
#ifdef ESYS_HAVE_TRILINOS
esys_trilinos::const_TrilinosGraph_ptr getTrilinosGraph() const {
return m_nodes->getTrilinosGraph();
}
#endif
private:
void prepare(bool optimize);
void resolveNodeIds();
#ifdef ESYS_HAVE_PASO
paso::SystemMatrixPattern_ptr makePasoPattern() const;
#endif
void createColoring(const index_t* dofMap);
void distributeByRankOfDOF(const IndexVector& distribution);
void markNodes(std::vector<short>& mask, index_t offset) const;
void optimizeDOFDistribution(IndexVector& distribution);
void optimizeDOFLabeling(const IndexVector& distribution);
void optimizeElementOrdering();
void updateTagList();
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;
escript::JMPI m_mpiInfo;
std::string m_name;
NodeFile* m_nodes;
ElementFile* m_elements;
ElementFile* m_faceElements;
ElementFile* m_points;
TagMap m_tagMap;
#ifdef ESYS_HAVE_PASO
// pointer to the sparse matrix pattern
mutable paso::SystemMatrixPattern_ptr pasoPattern;
#endif
static FunctionSpaceNamesMapType m_functionSpaceTypeNames;
};
} // end of namespace
#endif // __DUDLEY_DOMAIN_H__
dudley::DudleyDomain::createMappings
void createMappings(const std::vector< index_t > &dofDistribution, const std::vector< index_t > &nodeDistribution)
Definition: DudleyDomain.cpp:124
escript::AbstractContinuousDomain
AbstractContinuousDomain, base class for continuous domains.
Definition: AbstractContinuousDomain.h:45
dudley::DudleyDomain::showTagNames
virtual std::string showTagNames() const
Returns all tag names in a single string sperated by commas.
Definition: DudleyDomain.cpp:1928
escript::FunctionSpace
Definition: FunctionSpace.h:34
dudley::DudleyDomain::commonFunctionSpace
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...
Definition: DudleyDomain.cpp:1552
dudley::DudleyDomain::getMPI
virtual escript::JMPI getMPI() const
returns a reference to the MPI information wrapper for this domain
Definition: DudleyDomain.h:217
dudley::DudleyDomain::getSize
virtual escript::Data getSize() const
returns the element size
Definition: DudleyDomain.cpp:1810
dudley::DudleyDomain::preferredInterpolationOnDomain
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...
Definition: DudleyDomain.cpp:1694
paso::util::l2
double l2(dim_t n, const double *x, escript::JMPI mpiinfo)
returns the global L2 norm of x
Definition: PasoUtil.cpp:501
dudley::DudleyDomain::setElements
void setElements(ElementFile *elements)
replaces the element file by elements
Definition: DudleyDomain.cpp:106
dudley::DudleyDomain::getX
virtual escript::Data getX() const
returns locations in the FEM nodes
Definition: DudleyDomain.cpp:1800
dudley::DudleyDomain::getFunctionOnContactZeroCode
virtual int getFunctionOnContactZeroCode() const
Return a FunctionOnContactZero code.
Definition: DudleyDomain.cpp:839
dudley::SMT_TRILINOS
Definition: DudleyDomain.h:74
dudley::DudleyDomain::setFunctionSpaceTypeNames
void setFunctionSpaceTypeNames()
Build the table of function space type names.
Definition: DudleyDomain.cpp:791
dudley::DudleyDomain::getNormal
virtual escript::Data getNormal() const
returns boundary normals at the quadrature point on the face elements
Definition: DudleyDomain.cpp:1805
dudley::DudleyDomain::m_functionSpaceTypeNames
static FunctionSpaceNamesMapType m_functionSpaceTypeNames
Definition: DudleyDomain.h:744
dudley::DudleyDomain::m_name
std::string m_name
domain description
Definition: DudleyDomain.h:728
dudley::DudleyDomain::getNumDataPointsGlobal
virtual dim_t getNumDataPointsGlobal() const
Return the number of data points summed across all MPI processes.
Definition: DudleyDomain.cpp:877
escript::Domain_ptr
boost::shared_ptr< AbstractDomain > Domain_ptr
Definition: AbstractDomain.h:36
dudley::DudleyDomain::m_nodes
NodeFile * m_nodes
the table of the nodes
Definition: DudleyDomain.h:730
dudley::DudleyDomain::m_mpiInfo
escript::JMPI m_mpiInfo
MPI information.
Definition: DudleyDomain.h:726
dudley::DudleyDomain::getFunctionCode
virtual int getFunctionCode() const
Return a function FunctionSpace code.
Definition: DudleyDomain.cpp:819
dudley::DudleyDomain::getReducedFunctionOnBoundaryCode
virtual int getReducedFunctionOnBoundaryCode() const
Return a function on boundary with reduced integration order FunctionSpace code.
Definition: DudleyDomain.cpp:834
dudley::SystemMatrixType
SystemMatrixType
Definition: DudleyDomain.h:72
dudley::DudleyDomain::distributeByRankOfDOF
void distributeByRankOfDOF(const IndexVector &distribution)
Definition: Mesh_distributeByRankOfDOF.cpp:24
dudley::DudleyDomain::supportsContactElements
virtual bool supportsContactElements() const
Definition: DudleyDomain.h:667
dudley::DudleyDomain::getDataShape
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. ...
Definition: DudleyDomain.cpp:886
dudley::DudleyDomain::functionSpaceTypeAsString
virtual std::string functionSpaceTypeAsString(int functionSpaceType) const
Return a description for the given function space type code.
Definition: DudleyDomain.cpp:773
dudley::DudleyDomain::write
void write(const std::string &fileName) const
writes the current mesh to a file with the given name in the fly file format.
Definition: dudley/src/Mesh_write.cpp:83
dudley::DudleyDomain::prepare
void prepare(bool optimize)
prepares the mesh for further use
Definition: DudleyDomain.cpp:2052
dudley::DudleyDomain::probeInterpolationOnDomain
virtual bool probeInterpolationOnDomain(int functionSpaceType_source, int functionSpaceType_target) const
True if interpolation is possible from source to target.
Definition: DudleyDomain.cpp:1636
dudley::DudleyDomain::m_faceElements
ElementFile * m_faceElements
the table of face elements
Definition: DudleyDomain.h:734
dudley::DudleyDomain::setToX
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 implement...
Definition: DudleyDomain.cpp:1248
dudley::DudleyDomain::markNodes
void markNodes(std::vector< short > &mask, index_t offset) const
Definition: DudleyDomain.cpp:150
dudley::DudleyDomain::setFaceElements
void setFaceElements(ElementFile *elements)
replaces the face element file by elements
Definition: DudleyDomain.cpp:112
dudley::DudleyDomain::getNodes
NodeFile * getNodes() const
returns a pointer to this domain&#39;s node file
Definition: DudleyDomain.h:175
escript::DataTypes::IndexVector
std::vector< index_t > IndexVector
Definition: DataTypes.h:62
dudley::DudleyDomain::getStatus
virtual StatusType getStatus() const
Returns a status indicator of the domain. The status identifier should be unique over the live time i...
Definition: DudleyDomain.cpp:2013
dudley::DudleyDomain::DudleyDomain
DudleyDomain(const std::string &name, int numDim, escript::JMPI jmpi)
Constructor for DudleyDomain.
Definition: DudleyDomain.cpp:68
dudley::DudleyDomain::setToIntegrals
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...
dudley::DudleyDomain::getTransportTypeId
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.
Definition: DudleyDomain.cpp:1788
escript::JMPI
boost::shared_ptr< JMPI_ > JMPI
Definition: EsysMPI.h:71
dudley::DudleyDomain::interpolateOnDomain
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 do...
Definition: DudleyDomain.cpp:1057
dudley::DudleyDomain::operator==
virtual bool operator==(const escript::AbstractDomain &other) const
comparison operators
Definition: DudleyDomain.cpp:1711
dudley::DudleyDomain::dump
void dump(const std::string &fileName) const
dumps the mesh to a file with the given name.
Definition: DudleyDomain.cpp:464
dudley::DudleyDomain::setToIntegralsWorker
void setToIntegralsWorker(std::vector< Scalar > &integrals, const escript::Data &arg) const
Definition: DudleyDomain.cpp:1309
dudley::DudleyDomain::setToSize
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...
Definition: DudleyDomain.cpp:1391
dudley::DudleyDomain::updateTagList
void updateTagList()
regenerates list of tags in use for node file and element files
Definition: DudleyDomain.cpp:2114
dudley::DudleyDomain::ownSample
virtual bool ownSample(int fsCode, index_t id) const
Definition: DudleyDomain.cpp:1432
dudley::DudleyDomain::getPoints
ElementFile * getPoints() const
returns a pointer to this domain&#39;s point (nodal) element file
Definition: DudleyDomain.h:211
dudley::DudleyDomain::m_points
ElementFile * m_points
the table of points (treated as elements of dimension 0)
Definition: DudleyDomain.h:736
escript::DataTypes::ShapeType
std::vector< int > ShapeType
The shape of a single datapoint.
Definition: DataTypes.h:42
paso::M
static dim_t M
Definition: SparseMatrix_saveHB.cpp:37
dudley::DudleyDomain::getContinuousFunctionCode
virtual int getContinuousFunctionCode() const
Return a continuous FunctionSpace code.
Definition: DudleyDomain.cpp:809
dudley::DudleyDomain
DudleyDomain implements the AbstractContinuousDomain interface for the Dudley library.
Definition: DudleyDomain.h:84
dudley::DudleyDomain::newTransportProblem
escript::ATP_ptr newTransportProblem(int blocksize, const escript::FunctionSpace &functionspace, int type) const
creates a TransportProblem
Definition: DudleyDomain.cpp:1505
dudley::DudleyDomain::getReducedFunctionCode
virtual int getReducedFunctionCode() const
Return a function with reduced integration order FunctionSpace code.
Definition: DudleyDomain.cpp:824
dudley::DudleyDomain::randomFill
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.
Definition: DudleyDomain.cpp:2038
dudley::DudleyDomain::writeElementInfo
void writeElementInfo(std::ostream &stream, const ElementFile *e, const std::string &defaultType) const
Definition: dudley/src/Mesh_write.cpp:32
paso::SystemMatrixPattern_ptr
boost::shared_ptr< SystemMatrixPattern > SystemMatrixPattern_ptr
Definition: SystemMatrixPattern.h:39
escript::ATP_ptr
boost::shared_ptr< AbstractTransportProblem > ATP_ptr
Definition: AbstractTransportProblem.h:160
dudley::DudleyDomain::load
static escript::Domain_ptr load(const std::string &filename)
recovers domain from a dump file
Definition: dudley/src/DomainFactory.cpp:365
dudley::DudleyDomain::addPDEToTransportProblem
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
Definition: DudleyDomain.cpp:1014
dudley::DudleyDomain::getApproximationOrder
virtual int getApproximationOrder(int functionSpaceCode) const
returns the approximation order used for a function space functionSpaceCode
Definition: DudleyDomain.cpp:2018
dudley::DudleyDomain::printElementInfo
void printElementInfo(const ElementFile *e, const std::string &title, const std::string &defaultType, bool full) const
Definition: dudley/src/Mesh_write.cpp:50
dudley::DudleyDomain::probeInterpolationAcross
virtual bool probeInterpolationAcross(int functionSpaceType_source, const escript::AbstractDomain &targetDomain, int functionSpaceType_target) const
determines whether interpolation from source to target is possible.
Definition: DudleyDomain.cpp:1705
dudley::DudleyDomain::interpolateAcross
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...
Definition: DudleyDomain.cpp:1286
dudley::DudleyDomain::operator!=
virtual bool operator!=(const escript::AbstractDomain &other) const
Return true if given domains are not equal.
Definition: DudleyDomain.cpp:1723
dudley::DudleyDomain::onMasterProcessor
virtual bool onMasterProcessor() const
returns true if on MPI processor 0, else false
Definition: DudleyDomain.h:241
dudley::DudleyDomain::createColoring
void createColoring(const index_t *dofMap)
tries to reduce the number of colours for all element files
Definition: DudleyDomain.cpp:2098
escript::DataTypes::index_t
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:59
dudley::DudleyDomain::getDiracDeltaFunctionsCode
virtual int getDiracDeltaFunctionsCode() const
Return a DiracDeltaFunctions code.
Definition: DudleyDomain.cpp:869
dudley::DudleyDomain::read
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...
Definition: dudley/src/Mesh_read.cpp:149
dudley::DudleyDomain::optimizeDOFDistribution
void optimizeDOFDistribution(IndexVector &distribution)
Definition: dudley/src/Mesh_optimizeDOFDistribution.cpp:63
dudley::DudleyDomain::getElements
ElementFile * getElements() const
returns a pointer to this domain&#39;s element file
Definition: DudleyDomain.h:187
dudley::DudleyDomain::getReducedSolutionCode
virtual int getReducedSolutionCode() const
Return a ReducedSolution code.
Definition: DudleyDomain.cpp:864
dudley::DudleyDomain::getReducedContinuousFunctionCode
virtual int getReducedContinuousFunctionCode() const
Return a continuous on reduced order nodes FunctionSpace code.
Definition: DudleyDomain.cpp:814
dudley::DudleyDomain::relabelElementNodes
void relabelElementNodes(const index_t *newNode, index_t offset)
Definition: DudleyDomain.cpp:157
dudley::SMT_COMPLEX
Definition: DudleyDomain.h:75
dudley::DudleyDomain::getFunctionOnContactOneCode
virtual int getFunctionOnContactOneCode() const
Return a FunctionOnContactOne code.
Definition: DudleyDomain.cpp:849
dudley::SMT_PASO
Definition: DudleyDomain.h:73
dudley::DudleyDomain::optimizeElementOrdering
void optimizeElementOrdering()
redistributes elements to minimize communication during assemblage
Definition: DudleyDomain.cpp:2106
escript::AbstractDomain::StatusType
int StatusType
Definition: AbstractDomain.h:48
dudley::DudleyDomain::addPDEToSystem
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
Definition: DudleyDomain.cpp:944
dudley::DudleyDomain::isCellOriented
virtual bool isCellOriented(int functionSpaceCode) const
returns true if data on this domain and a function space of type functionSpaceCode has to considered ...
Definition: DudleyDomain.cpp:1532
escript::Data
Data represents a collection of datapoints.
Definition: Data.h:63
dudley::DudleyDomain::getTag
virtual int getTag(const std::string &name) const
Return the tag key for tag name.
Definition: DudleyDomain.cpp:1912
dudley::DudleyDomain::create2D
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.
Definition: Mesh_tri3.cpp:25
dudley::ElementFile
Definition: dudley/src/ElementFile.h:51
dudley::TagMap
std::map< std::string, int > TagMap
Definition: DudleyDomain.h:70
dudley
A suite of factory methods for creating 2D and 3D dudley domains.
Definition: dudley/src/Assemble.h:31
dudley::DudleyDomain::getFaceElements
ElementFile * getFaceElements() const
returns a pointer to this domain&#39;s face element file
Definition: DudleyDomain.h:199
dudley::DudleyDomain::newSystemMatrix
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
Definition: DudleyDomain.cpp:1452
dudley::DudleyDomain::getReducedFunctionOnContactZeroCode
virtual int getReducedFunctionOnContactZeroCode() const
Return a FunctionOnContactZero code with reduced integration order.
Definition: DudleyDomain.cpp:844
dudley::DudleyDomain::setTags
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 samp...
Definition: DudleyDomain.cpp:1879
dudley::DudleyDomain::FunctionSpaceNamesMapType
std::map< int, std::string > FunctionSpaceNamesMapType
Definition: DudleyDomain.h:387
dudley::DudleyDomain::Print_Mesh_Info
void Print_Mesh_Info(bool full=false) const
Definition: dudley/src/Mesh_write.cpp:139
dudley::DudleyDomain::getMPISize
virtual int getMPISize() const
returns the number of processors used for this domain
Definition: DudleyDomain.h:223
dudley::DudleyDomain::MPIBarrier
virtual void MPIBarrier() const
If compiled for MPI then execute an MPI_Barrier, else do nothing.
Definition: DudleyDomain.cpp:99
MPI_Comm
int MPI_Comm
Definition: EsysMPI.h:41
dudley::DudleyDomain::setToNormal
virtual void setToNormal(escript::Data &out) const
copies the surface normals at data points into out. The actual function space to be considered is def...
Definition: DudleyDomain.cpp:1267
dudley::DudleyDomain::getDescription
virtual std::string getDescription() const
Return a description for this domain.
Definition: DudleyDomain.cpp:768
dudley::SMT_UNROLL
Definition: DudleyDomain.h:76
dudley::DudleyDomain::setToGradient
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 ...
Definition: DudleyDomain.cpp:1344
dudley::DudleyDomain::getTagFromSampleNo
int getTagFromSampleNo(int functionSpaceType, index_t sampleNo) const
Return the tag key for the given sample number.
Definition: DudleyDomain.cpp:1849
dudley::DudleyDomain::isValidFunctionSpaceType
virtual bool isValidFunctionSpaceType(int functionSpaceType) const
Returns true if the given integer is a valid function space type for this domain. ...
Definition: DudleyDomain.cpp:784
dudley::DudleyDomain::setNewX
virtual void setNewX(const escript::Data &arg)
assigns new location to the domain
Definition: DudleyDomain.cpp:1419
dudley::DudleyDomain::getNumberOfTagsInUse
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 ...
Definition: DudleyDomain.cpp:1941
dudley::DudleyDomain::getSystemMatrixTypeId
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...
Definition: DudleyDomain.cpp:1728
escript::AbstractTransportProblem
Give a short description of what AbstractTransportProblem does.
Definition: AbstractTransportProblem.h:43
dudley::DudleyDomain::create3D
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.
Definition: Mesh_tet4.cpp:27
dudley::DudleyDomain::borrowListOfTagsInUse
virtual const int * borrowListOfTagsInUse(int functionSpaceCode) const
Definition: DudleyDomain.cpp:1963
dudley::DudleyDomain::setPoints
void setPoints(ElementFile *elements)
replaces the point element file by elements
Definition: DudleyDomain.cpp:118
dudley::DudleyDomain::setTagMap
virtual void setTagMap(const std::string &name, int tag)
sets a map from a clear tag name to a tag key
Definition: DudleyDomain.cpp:1907
dudley::DudleyDomain::addPDEToRHS
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
Definition: DudleyDomain.cpp:991
dudley::DudleyDomain::m_tagMap
TagMap m_tagMap
the tag map mapping names to tag keys
Definition: DudleyDomain.h:738
dudley::DudleyDomain::getSolutionCode
virtual int getSolutionCode() const
Return a Solution code.
Definition: DudleyDomain.cpp:859
escript::AbstractSystemMatrix
Base class for escript system matrices.
Definition: AbstractSystemMatrix.h:42
dudley::DudleyDomain::getMPIComm
MPI_Comm getMPIComm() const
get the communicator for this domain. Returns an integer on non-MPI builds Routine must be implemente...
Definition: DudleyDomain.h:243
escript::ASM_ptr
boost::shared_ptr< AbstractSystemMatrix > ASM_ptr
Definition: AbstractSystemMatrix.h:32
dudley::DudleyDomain::optimizeDOFLabeling
void optimizeDOFLabeling(const IndexVector &distribution)
optimizes the labeling of the DOFs on each processor
Definition: Mesh_optimizeDOFLabeling.cpp:25
dudley::NodeFile
Definition: dudley/src/NodeFile.h:38
dudley::DudleyDomain::borrowSampleReferenceIDs
const index_t * borrowSampleReferenceIDs(int functionSpaceType) const
Return the reference number of the given sample number.
Definition: DudleyDomain.cpp:1815
escript::AbstractDomain
Base class for all escript domains.
Definition: AbstractDomain.h:45
dudley::DudleyDomain::getDim
virtual int getDim() const
Returns the spatial dimension of the domain.
Definition: DudleyDomain.h:392
dudley::DudleyDomain::m_elements
ElementFile * m_elements
the table of the elements
Definition: DudleyDomain.h:732
dudley::DudleyDomain::getMPIRank
virtual int getMPIRank() const
returns the number MPI rank of this processor
Definition: DudleyDomain.h:229
dudley::DudleyDomain::isValidTagName
virtual bool isValidTagName(const std::string &name) const
Returns true if name is a defined tag name.
Definition: DudleyDomain.cpp:1923
dudley::DudleyDomain::getReducedFunctionOnContactOneCode
virtual int getReducedFunctionOnContactOneCode() const
Return a FunctionOnContactOne code with reduced integration order.
Definition: DudleyDomain.cpp:854
dudley::DudleyDomain::addPDEToLumpedSystem
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
Definition: DudleyDomain.cpp:977
dudley::NodeFile::numDim
int numDim
number of spatial dimensions
Definition: dudley/src/NodeFile.h:145
dudley::DudleyDomain::~DudleyDomain
~DudleyDomain()
Destructor for DudleyDomain.
Definition: DudleyDomain.cpp:91
dudley::DudleyDomain::getFunctionOnBoundaryCode
virtual int getFunctionOnBoundaryCode() const
Return a function on boundary FunctionSpace code.
Definition: DudleyDomain.cpp:829
escript::DataTypes::dim_t
index_t dim_t
Definition: DataTypes.h:64
dudley::DudleyDomain::resolveNodeIds
void resolveNodeIds()
Definition: Mesh_resolveNodeIds.cpp:22
dudley::DudleyDomain::readGmsh
static escript::Domain_ptr readGmsh(escript::JMPI mpiInfo, const std::string &filename, int numDim, bool optimize)
reads a gmsh mesh file.
Definition: dudley/src/Mesh_readGmsh.cpp:28
dudley::DudleyDomain::canTag
virtual bool canTag(int functionSpaceCode) const
Checks if this domain allows tags for the specified functionSpace code.
Definition: DudleyDomain.cpp:1998