finley/src/FinleyDomain.h
Go to the documentation of this file.
/*****************************************************************************
*
* Copyright (c) 2003-2020 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-2017 by Centre for Geoscience Computing (GeoComp)
* Development from 2019 by School of Earth and Environmental Sciences
**
*****************************************************************************/
#ifndef __FINLEY_DOMAIN_H__
#define __FINLEY_DOMAIN_H__
/****************************************************************************
Finley: 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. Finley domains have four ElementFiles
containing the elements, surface, contact and point sources, respectively.
Notice that the surface elements do not necessarily cover the entire
surface of the domain.
The element type is fixed by the reference element, see ReferenceElement.h.
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.
In some cases it is useful to refer to a mesh entirely built from
order 1 (=linear) elements. The linear version of the mesh can be
accessed by referring to the first few nodes of each element
(thanks to the way the nodes are ordered). As the numbering of
these nodes is not continuous a relabeling vector is introduced
in the NodeFile. This feature is not fully implemented yet.
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.
The spatial dimensionality is determined by the type of elements
used and can be queried using getDim(). Notice that the element type
also determines the type of surface elements to be used.
*****************************************************************************/
#include <finley/Finley.h>
#include <finley/ElementFile.h>
#include <finley/NodeFile.h>
#include <finley/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 finley {
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 FinleyDomain : 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,
int integrationOrder = -1,
int reducedIntegrationOrder = -1,
bool optimize = false);
static escript::Domain_ptr readGmsh(escript::JMPI mpiInfo,
const std::string& filename,
int numDim, int integrationOrder = -1,
int reducedIntegrationOrder = -1,
bool optimize = false,
bool useMacroElements = false);
static escript::Domain_ptr createRec4(dim_t NE0, dim_t NE1,
double L0, double L1,
bool periodic0, bool periodic1, int order,
int reducedOrder, bool useElementsOnFace,
bool optimize, escript::JMPI jmpi);
static escript::Domain_ptr createRec8(dim_t NE0, dim_t NE1,
double l0, double l1,
bool periodic0, bool periodic1, int order,
int reducedOrder, bool useElementsOnFace,
bool useFullElementOrder,
bool useMacroElements, bool optimize,
escript::JMPI jmpi);
static escript::Domain_ptr createHex8(dim_t NE0, dim_t NE1, dim_t NE2,
double l0, double l1, double l2,
bool periodic0, bool periodic1, bool periodic2,
int order, int reducedOrder,
bool useElementsOnFace,
bool optimize, escript::JMPI jmpi);
static escript::Domain_ptr createHex20(dim_t NE0, dim_t NE1, dim_t NE2,
double l0, double l1, double l2,
bool periodic0, bool periodic1, bool periodic2,
int order, int reducedOrder,
bool useElementsOnFace,
bool useFullElementOrder,
bool useMacroElements, bool optimize,
escript::JMPI jmpi);
FinleyDomain(const std::string& name, int numDim, escript::JMPI jmpi);
FinleyDomain(const FinleyDomain& in);
~FinleyDomain();
void addDiracPoints(const std::vector<double>& points,
const std::vector<int>& tags);
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 setContactElements(ElementFile* elements);
ElementFile* getContactElements() const { return m_contactElements; }
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;
#ifdef ESYS_HAVE_BOOST_NUMPY
virtual boost::python::numpy::ndarray getNumpyX() const;
virtual boost::python::numpy::ndarray getConnectivityInfo() const;
#endif
virtual int getVTKElementType() 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 true; }
virtual escript::Data randomFill(const escript::DataTypes::ShapeType& shape,
const escript::FunctionSpace& what, long seed,
const boost::python::tuple& filter) const;
const TagMap& getTagMap() const { return m_tagMap; }
void createMappings(const IndexVector& dofDistribution,
const IndexVector& nodeDistribution);
#ifdef ESYS_HAVE_PASO
paso::SystemMatrixPattern_ptr getPasoPattern(bool reducedRowOrder,
bool reducedColOrder) const;
#endif
#ifdef ESYS_HAVE_TRILINOS
esys_trilinos::const_TrilinosGraph_ptr getTrilinosGraph(bool reducedOrder) const;
#endif
void glueFaces(double safetyFactor, double tolerance, bool optimize);
void joinFaces(double safetyFactor, double tolerance, bool optimize);
static FinleyDomain* merge(const std::vector<const FinleyDomain*>& meshes);
private:
void prepare(bool optimize);
void setOrders();
void resolveNodeIds();
void relabelElementNodes(const IndexVector& 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 makePasoPattern(bool reducedRowOrder,
bool reducedColOrder) const;
#endif
#ifdef ESYS_HAVE_TRILINOS
esys_trilinos::GraphType* createTrilinosGraph(bool reducedOrder) const;
#endif
void createColoring(const IndexVector& dofMap);
void distributeByRankOfDOF(const IndexVector& distribution);
void markNodes(std::vector<short>& mask, index_t offset, bool useLinear) const;
void optimizeDOFDistribution(IndexVector& distribution);
void optimizeDOFLabeling(const IndexVector& distribution);
void optimizeElementOrdering();
void findMatchingFaces(double safetyFactor, double tolerance, int* numPairs,
int* elem0, int* elem1, int* matchingNodes) const;
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;
int approximationOrder;
int reducedApproximationOrder;
int integrationOrder;
int reducedIntegrationOrder;
NodeFile* m_nodes;
ElementFile* m_elements;
ElementFile* m_faceElements;
ElementFile* m_contactElements;
ElementFile* m_points;
TagMap m_tagMap;
#ifdef ESYS_HAVE_PASO
// pointer to the sparse matrix patterns
mutable paso::SystemMatrixPattern_ptr FullFullPattern;
mutable paso::SystemMatrixPattern_ptr FullReducedPattern;
mutable paso::SystemMatrixPattern_ptr ReducedFullPattern;
mutable paso::SystemMatrixPattern_ptr ReducedReducedPattern;
#endif
#ifdef ESYS_HAVE_TRILINOS
mutable esys_trilinos::TrilinosGraph_ptr m_fullGraph;
mutable esys_trilinos::TrilinosGraph_ptr m_reducedGraph;
#endif
static FunctionSpaceNamesMapType m_functionSpaceTypeNames;
};
} // end of namespace
#endif // __FINLEY_DOMAIN_H__
finley::FinleyDomain::optimizeDOFLabeling
void optimizeDOFLabeling(const IndexVector &distribution)
optimizes the labeling of the DOFs on each processor
Definition: finley/src/FinleyDomain.cpp:2889
finley::FinleyDomain::getNumDataPointsGlobal
virtual dim_t getNumDataPointsGlobal() const
Return the number of data points summed across all MPI processes.
Definition: finley/src/FinleyDomain.cpp:1048
finley::NodeFile::updateTagList
void updateTagList()
Definition: finley/src/NodeFile.h:326
finley::FinleyDomain::setContactElements
void setContactElements(ElementFile *elements)
replaces the contact element file by elements
Definition: finley/src/FinleyDomain.cpp:134
dudley::DudleyDomain::getFaceElements
ElementFile * getFaceElements() const
returns a pointer to this domain's face element file
Definition: DudleyDomain.h:240
finley::brick_driver
Domain_ptr brick_driver(const bp::list &args)
Definition: finley/src/DomainFactory.cpp:1105
escript::SolverOptions
SolverOptions
Definition: SolverOptions.h:94
MPI_Status
int MPI_Status
Definition: EsysMPI.h:45
escript::SolverBuddy
Definition: SolverOptions.h:172
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:2768
escript::Data::isComplex
bool isComplex() const
True if components of this data are stored as complex.
Definition: Data.cpp:1160
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:1172
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:1646
escript::FunctionSpace::getSize
escript::Data getSize() const
Returns the sample size (e.g. the diameter of elements, radius of particles).
Definition: FunctionSpace.cpp:295
finley::FinleyDomain::joinFaces
void joinFaces(double safetyFactor, double tolerance, bool optimize)
Definition: Mesh_joinFaces.cpp:53
finley::FinleyDomain
FinleyDomain implements the AbstractContinuousDomain interface for the Finley library.
Definition: finley/src/FinleyDomain.h:143
finley::FinleyDomain::relabelElementNodes
void relabelElementNodes(const IndexVector &newNode, index_t offset)
Definition: finley/src/FinleyDomain.cpp:203
finley::Assemble_NodeCoordinates
void Assemble_NodeCoordinates(const NodeFile *nodes, escript::Data &x)
copies node coordinates into expanded Data object x
Definition: finley/src/Assemble_NodeCoordinates.cpp:52
finley::SMT_COMPLEX
@ SMT_COMPLEX
Definition: finley/src/FinleyDomain.h:134
finley::FaceElements
@ FaceElements
Definition: Finley.h:86
finley::NodeFile::globalReducedNodesIndex
index_t * globalReducedNodesIndex
Definition: finley/src/NodeFile.h:181
escript::DataTypes::real_t
double real_t
type of all real-valued scalars in escript
Definition: DataTypes.h:79
finley::FinleyDomain::approximationOrder
int approximationOrder
Definition: finley/src/FinleyDomain.h:937
REGISTER_ESCRIPT_EXCEPTION_TRANSLATORS
#define REGISTER_ESCRIPT_EXCEPTION_TRANSLATORS
Definition: ExceptionTranslators.h:26
finley::FinleyDomain::createRec8
static escript::Domain_ptr createRec8(dim_t NE0, dim_t NE1, double l0, double l1, bool periodic0, bool periodic1, int order, int reducedOrder, bool useElementsOnFace, bool useFullElementOrder, bool useMacroElements, bool optimize, escript::JMPI jmpi)
Creates a 2-dimensional rectangular domain with second order (Rec8 or Rec9) elements in the rectangle...
Definition: Mesh_rec8.cpp:26
finley::FinleyDomain::m_mpiInfo
escript::JMPI m_mpiInfo
MPI information.
Definition: finley/src/FinleyDomain.h:934
finley::FinleyDomain::functionSpaceTypeAsString
virtual std::string functionSpaceTypeAsString(int functionSpaceType) const
Return a description for the given function space type code.
Definition: finley/src/FinleyDomain.cpp:932
weipa::FinleyDomain::writeToSilo
virtual bool writeToSilo(DBfile *dbfile, const std::string &pathInSilo, const StringVec &labels, const StringVec &units, bool writeMeshData)
Writes the domain to a Silo file.
Definition: weipa/src/FinleyDomain.cpp:507
escript::reducedContinuousFunction
FunctionSpace reducedContinuousFunction(const AbstractDomain &domain)
Return a continuous with reduced order FunctionSpace (overlapped node values on reduced element order...
Definition: FunctionSpaceFactory.cpp:51
finley::Rec9
@ Rec9
Definition: ReferenceElements.h:50
weipa::FinleyDomain::~FinleyDomain
virtual ~FinleyDomain()
Definition: weipa/src/FinleyDomain.cpp:79
finley::FinleyDomain::m_tagMap
TagMap m_tagMap
the tag map mapping names to tag keys
Definition: finley/src/FinleyDomain.h:952
FINLEY_REDUCED_FACE_ELEMENTS
#define FINLEY_REDUCED_FACE_ELEMENTS
Definition: Finley.h:75
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:2569
finley::FinleyDomain::updateTagList
void updateTagList()
regenerates list of tags in use for node file and element files
Definition: finley/src/FinleyDomain.cpp:3070
finley::NodeFile::createDenseDOFLabeling
dim_t createDenseDOFLabeling()
Definition: finley/src/NodeFile.cpp:539
finley::FinleyDomain::getSolutionCode
virtual int getSolutionCode() const
Return a Solution code.
Definition: finley/src/FinleyDomain.cpp:1030
paso::SystemMatrix
this class holds a (distributed) stiffness matrix
Definition: SystemMatrix.h:62
finley::FinleyDomain::borrowListOfTagsInUse
virtual const int * borrowListOfTagsInUse(int functionSpaceCode) const
Definition: finley/src/FinleyDomain.cpp:2671
finley::Assemble_integrate
void Assemble_integrate(const NodeFile *nodes, const ElementFile *elements, const escript::Data &data, Scalar *integrals)
integrates data on quadrature points
Definition: finley/src/Assemble_integrate.cpp:52
paso::Pattern::fromIndexListArray
static Pattern_ptr fromIndexListArray(dim_t n0, dim_t n, const escript::IndexList *index_list_array, index_t range_min, index_t range_max, index_t index_offset)
Definition: Pattern.cpp:102
finley::NodeFile::globalDegreesOfFreedom
index_t * globalDegreesOfFreedom
Definition: finley/src/NodeFile.h:173
weipa::FinleyDomain::removeGhostZones
virtual void removeGhostZones(int ownIndex)
Removes 'ghost' elements and nodes.
Definition: weipa/src/FinleyDomain.cpp:488
escript::SO_METHOD_DIRECT
@ SO_METHOD_DIRECT
Definition: SolverOptions.h:128
finley::FinleyDomain::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,...
Definition: finley/src/FinleyDomain.cpp:2360
FINLEY_REDUCED_ELEMENTS
#define FINLEY_REDUCED_ELEMENTS
Definition: Finley.h:74
finley::FinleyDomain::glueFaces
void glueFaces(double safetyFactor, double tolerance, bool optimize)
Definition: Mesh_glueFaces.cpp:53
finley::FinleyDomain::borrowSampleReferenceIDs
const index_t * borrowSampleReferenceIDs(int functionSpaceType) const
Return the reference number of the given sample number.
Definition: finley/src/FinleyDomain.cpp:2488
finley::FinleyDomain::getFunctionOnContactZeroCode
virtual int getFunctionOnContactZeroCode() const
Return a FunctionOnContactZero code.
Definition: finley/src/FinleyDomain.cpp:1010
finley::NodeFile::getNumReducedNodes
dim_t getNumReducedNodes() const
returns the number of reduced order FEM nodes (on this rank)
Definition: finley/src/NodeFile.h:261
FINLEY_REDUCED_CONTACT_ELEMENTS_1
#define FINLEY_REDUCED_CONTACT_ELEMENTS_1
Definition: Finley.h:76
finley::FinleyDomain::getReducedFunctionOnContactOneCode
virtual int getReducedFunctionOnContactOneCode() const
Return a FunctionOnContactOne code with reduced integration order.
Definition: finley/src/FinleyDomain.cpp:1025
weipa::FinleyDomain::getElementsForFunctionSpace
virtual ElementData_ptr getElementsForFunctionSpace(int fsCode) const
Returns the element data for given function space code.
Definition: weipa/src/FinleyDomain.cpp:253
finley::FinleyDomain::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.
finley::FinleyDomain::operator==
virtual bool operator==(const escript::AbstractDomain &other) const
comparison operators
Definition: finley/src/FinleyDomain.cpp:2282
finley::const_ReferenceElementSet_ptr
boost::shared_ptr< const ReferenceElementSet > const_ReferenceElementSet_ptr
Definition: ReferenceElementSets.h:94
finley::FinleyDomain::canTag
virtual bool canTag(int functionSpaceCode) const
Checks if this domain allows tags for the specified functionSpace code.
Definition: finley/src/FinleyDomain.cpp:2717
weipa::FinleyDomain::faces
FinleyElements_ptr faces
Definition: weipa/src/FinleyDomain.h:73
finley::NodeFile::assignMPIRankToDOFs
void assignMPIRankToDOFs(std::vector< int > &mpiRankOfDOF, const IndexVector &distribution)
Definition: finley/src/NodeFile.cpp:452
weipa::FinleyDomain::getMeshNames
virtual StringVec getMeshNames() const
Returns the names of all meshes within this domain.
Definition: weipa/src/FinleyDomain.cpp:334
finley::NodeFile::Tag
int * Tag
Tag[i] is the tag of node i.
Definition: finley/src/NodeFile.h:166
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:2300
weipa::VisItControl::initialized
bool initialized
Definition: VisItControl.cpp:66
finley::ReducedContactElementsOne
@ ReducedContactElementsOne
Definition: Finley.h:92
escript::SolverBuddy::getPackage
SolverOptions getPackage() const
Definition: SolverOptions.cpp:472
finley::NodeFile::getFirstNode
index_t getFirstNode() const
Definition: finley/src/NodeFile.h:216
weipa::FinleyDomain::nodes
FinleyNodes_ptr nodes
Definition: weipa/src/FinleyDomain.h:71
finley::Tet10
@ Tet10
Definition: ReferenceElements.h:54
escript::continuousFunction
FunctionSpace continuousFunction(const AbstractDomain &domain)
Create function space objects.
Definition: FunctionSpaceFactory.cpp:45
finley::ElementFile::Tag
int * Tag
Tag[i] is the tag of element i.
Definition: finley/src/ElementFile.h:143
weipa::FinleyDomain::getDataVarByName
virtual DataVar_ptr getDataVarByName(const std::string &name) const
Creates and returns a variable with domain data.
Definition: weipa/src/FinleyDomain.cpp:372
finley::FinleyDomain::getTagFromSampleNo
int getTagFromSampleNo(int functionSpaceType, index_t sampleNo) const
Return the tag key for the given sample number.
Definition: finley/src/FinleyDomain.cpp:2529
escript::NotImplementedError
An exception class for features which are not (yet) implemented.
Definition: EsysException.h:93
finley::FinleyException
Definition: FinleyException.h:40
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:1139
FINLEY_NODES
#define FINLEY_NODES
Definition: Finley.h:66
finley::Tet10Macro
@ Tet10Macro
Definition: ReferenceElements.h:114
dudley::DudleyDomain::getElements
ElementFile * getElements() const
returns a pointer to this domain's element file
Definition: DudleyDomain.h:228
weipa::FinleyDomain::reorderGhostZones
virtual void reorderGhostZones(int ownIndex)
Reorders elements so that 'ghost' elements (i.e. those that do not belong to ownIndex) appear last.
Definition: weipa/src/FinleyDomain.cpp:470
finley::NodeFile::nodesDistribution
escript::Distribution_ptr nodesDistribution
MPI distribution of nodes.
Definition: finley/src/NodeFile.h:186
paso::SystemMatrix_ptr
boost::shared_ptr< SystemMatrix > SystemMatrix_ptr
Definition: SystemMatrix.h:55
finley::FinleyDomain::integrationOrder
int integrationOrder
Definition: finley/src/FinleyDomain.h:939
paso::TransportProblem::borrowMassMatrix
SystemMatrix_ptr borrowMassMatrix() const
Definition: Transport.h:70
escript::DataTypes::DataVectorAlt< real_t >
escript::SolverBuddy::getSolverMethod
SolverOptions getSolverMethod() const
Definition: SolverOptions.cpp:409
escript::randomFillArray
void randomFillArray(long seed, double *array, size_t n)
Definition: Random.cpp:75
finley::FinleyDomain::m_faceElements
ElementFile * m_faceElements
the table of face elements
Definition: finley/src/FinleyDomain.h:946
escript::AbstractDomain::StatusType
int StatusType
Definition: AbstractDomain.h:67
paso::SystemMatrixPattern_ptr
boost::shared_ptr< SystemMatrixPattern > SystemMatrixPattern_ptr
Definition: SystemMatrixPattern.h:54
finley::NodeFile::reducedNodesId
index_t * reducedNodesId
Definition: finley/src/NodeFile.h:203
finley::NodeFile::globalReducedDOFIndex
index_t * globalReducedDOFIndex
Definition: finley/src/NodeFile.h:178
finley::FinleyDomain::probeInterpolationOnDomain
virtual bool probeInterpolationOnDomain(int functionSpaceType_source, int functionSpaceType_target) const
True if interpolation is possible from source to target.
Definition: finley/src/FinleyDomain.cpp:2138
finley::FinleyDomain::showTagNames
virtual std::string showTagNames() const
Returns all tag names in a single string sperated by commas.
Definition: finley/src/FinleyDomain.cpp:2627
finley::ElementFile::createColoring
void createColoring(const IndexVector &dofMap)
Tries to reduce the number of colours used to colour the elements.
Definition: finley/src/ElementFile.cpp:263
DUDLEY_NODES
#define DUDLEY_NODES
Definition: Dudley.h:56
finley::const_ReferenceElement_ptr
boost::shared_ptr< const ReferenceElement > const_ReferenceElement_ptr
Definition: ReferenceElements.h:214
finley::FinleyDomain::getMPISize
virtual int getMPISize() const
returns the number of processors used for this domain
Definition: finley/src/FinleyDomain.h:394
finley::ElementFile::relabelNodes
void relabelNodes(const IndexVector &newNode, index_t offset)
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:2640
escript::Domain_ptr
boost::shared_ptr< AbstractDomain > Domain_ptr
Definition: AbstractDomain.h:55
escript::AbstractTransportProblem
Give a short description of what AbstractTransportProblem does.
Definition: AbstractTransportProblem.h:58
finley::ReducedNodes
@ ReducedNodes
Definition: Finley.h:83
finley::FinleyDomain::readGmsh
static escript::Domain_ptr readGmsh(escript::JMPI mpiInfo, const std::string &filename, int numDim, int integrationOrder=-1, int reducedIntegrationOrder=-1, bool optimize=false, bool useMacroElements=false)
reads a gmsh mesh file.
Definition: finley/src/Mesh_readGmsh.cpp:1572
escript::SO_PRECONDITIONER_ILUT
@ SO_PRECONDITIONER_ILUT
Definition: SolverOptions.h:148
finley::FinleyDomain::getSize
virtual escript::Data getSize() const
returns the element size
Definition: finley/src/FinleyDomain.cpp:2483
escript::SolverBuddy::isComplex
bool isComplex() const
Definition: SolverOptions.cpp:638
finley::ElementFile::setTags
void setTags(const int newTag, const escript::Data &mask)
Definition: finley/src/ElementFile.cpp:230
finley::FinleyDomain::getApproximationOrder
virtual int getApproximationOrder(int functionSpaceCode) const
returns the approximation order used for a function space functionSpaceCode
Definition: finley/src/FinleyDomain.cpp:2741
finley::ElementFile::Nodes
index_t * Nodes
Definition: finley/src/ElementFile.h:158
escript::FunctionSpace
Definition: FunctionSpace.h:49
finley::FinleyDomain::createHex20
static escript::Domain_ptr createHex20(dim_t NE0, dim_t NE1, dim_t NE2, double l0, double l1, double l2, bool periodic0, bool periodic1, bool periodic2, int order, int reducedOrder, bool useElementsOnFace, bool useFullElementOrder, bool useMacroElements, bool optimize, escript::JMPI jmpi)
Creates a 3-dimensional rectangular domain with second order (Hex20 or Hex27) elements.
Definition: Mesh_hex20.cpp:39
finley::ElementFile::getNodeRange
std::pair< index_t, index_t > getNodeRange() const
Definition: finley/src/ElementFile.h:188
finley::FinleyDomain::m_nodes
NodeFile * m_nodes
the table of the nodes
Definition: finley/src/FinleyDomain.h:942
finley::Points
@ Points
Definition: Finley.h:88
finley::ElementFile::distributeByRankOfDOF
void distributeByRankOfDOF(const std::vector< int > &mpiRankOfDOF, index_t *nodesId)
redistributes the elements including overlap by rank
Definition: finley/src/ElementFile.cpp:344
finley::SystemMatrixType
SystemMatrixType
Definition: finley/src/FinleyDomain.h:131
finley::FinleyDomain::resolveNodeIds
void resolveNodeIds()
Definition: finley/src/FinleyDomain.cpp:2970
escript::Data::getFunctionSpace
const FunctionSpace & getFunctionSpace() const
Return the function space.
Definition: Data.h:463
FINLEY_REDUCED_DEGREES_OF_FREEDOM
#define FINLEY_REDUCED_DEGREES_OF_FREEDOM
Definition: Finley.h:72
finley::NodeFile::getNumReducedDegreesOfFreedom
dim_t getNumReducedDegreesOfFreedom() const
returns the number of reduced order degrees of freedom (on this rank)
Definition: finley/src/NodeFile.h:271
weipa::DataVar_ptr
boost::shared_ptr< DataVar > DataVar_ptr
Definition: weipa.h:65
weipa
Definition: DataVar.cpp:51
finley::FinleyDomain::getElements
ElementFile * getElements() const
returns a pointer to this domain's element file
Definition: finley/src/FinleyDomain.h:346
finley::Rec9Macro
@ Rec9Macro
Definition: ReferenceElements.h:113
finley::FinleyDomain::getDiracDeltaFunctionsCode
virtual int getDiracDeltaFunctionsCode() const
Return a DiracDeltaFunctions code.
Definition: finley/src/FinleyDomain.cpp:1040
escript::FunctionSpace::getDomain
const_Domain_ptr getDomain() const
Returns the function space domain.
Definition: FunctionSpace.cpp:103
MPI_INT
#define MPI_INT
Definition: EsysMPI.h:46
escript::DataTypes::index_t_max
index_t index_t_max()
Returns the maximum finite value for the index_t type.
Definition: DataTypes.h:108
finley::Hex27
@ Hex27
Definition: ReferenceElements.h:58
weipa::VisItControl::initialize
bool initialize(const std::string &simFile, const std::string &comment)
Definition: VisItControl.cpp:206
finley::FinleyDomain::getDescription
virtual std::string getDescription() const
Return a description for this domain.
Definition: finley/src/FinleyDomain.cpp:927
finley::FinleyDomain::findMatchingFaces
void findMatchingFaces(double safetyFactor, double tolerance, int *numPairs, int *elem0, int *elem1, int *matchingNodes) const
Definition: Mesh_findMatchingFaces.cpp:90
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:1820
finley::SMT_UNROLL
@ SMT_UNROLL
Definition: finley/src/FinleyDomain.h:135
MPI_MAX
#define MPI_MAX
Definition: EsysMPI.h:54
weipa::FinleyDomain::siloPath
std::string siloPath
Definition: weipa/src/FinleyDomain.h:75
finley::FinleyDomain::m_points
ElementFile * m_points
the table of points (treated as elements of dimension 0)
Definition: finley/src/FinleyDomain.h:950
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:1210
finley::NodeFile::getNumNodes
dim_t getNumNodes() const
returns the number of FEM nodes (on this rank)
Definition: finley/src/NodeFile.h:256
finley::FinleyDomain::getReducedFunctionOnContactZeroCode
virtual int getReducedFunctionOnContactZeroCode() const
Return a FunctionOnContactZero code with reduced integration order.
Definition: finley/src/FinleyDomain.cpp:1015
weipa::FinleyDomain::contacts
FinleyElements_ptr contacts
Definition: weipa/src/FinleyDomain.h:74
weipa::ZONE_CENTERED
@ ZONE_CENTERED
Definition: DomainChunk.h:33
finley::NodeFile::createNodeMappings
void createNodeMappings(const IndexVector &indexReducedNodes, const IndexVector &dofDistribution, const IndexVector &nodeDistribution)
Definition: finley/src/NodeFile.cpp:1018
finley::FinleyDomain::getReducedFunctionCode
virtual int getReducedFunctionCode() const
Return a function with reduced integration order FunctionSpace code.
Definition: finley/src/FinleyDomain.cpp:995
escript::FunctionSpace::getNormal
escript::Data getNormal() const
Returns the surface normal field.
Definition: FunctionSpace.cpp:286
finley::NodeFile::Coordinates
double * Coordinates
Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of node i.
Definition: finley/src/NodeFile.h:175
finley::FinleyDomain::getReducedFunctionOnBoundaryCode
virtual int getReducedFunctionOnBoundaryCode() const
Return a function on boundary with reduced integration order FunctionSpace code.
Definition: finley/src/FinleyDomain.cpp:1005
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:2276
finley::ElementFile::numElements
dim_t numElements
number of elements
Definition: finley/src/ElementFile.h:136
finley::FinleyDomain::getFunctionCode
virtual int getFunctionCode() const
Return a function FunctionSpace code.
Definition: finley/src/FinleyDomain.cpp:990
finley::ElementFile::Owner
int * Owner
Owner[i] contains the rank that owns element i.
Definition: finley/src/ElementFile.h:146
escript::Data
Data represents a collection of datapoints.
Definition: Data.h:64
paso::TransportProblem_ptr
boost::shared_ptr< TransportProblem > TransportProblem_ptr
Definition: Transport.h:32
paso::util::l2
double l2(dim_t n, const double *x, escript::JMPI mpiinfo)
returns the global L2 norm of x
Definition: PasoUtil.cpp:530
paso::TransportProblem::borrowTransportMatrix
SystemMatrix_ptr borrowTransportMatrix() const
Definition: Transport.h:65
finley::NodeFile::getLastNode
index_t getLastNode() const
Definition: finley/src/NodeFile.h:221
weipa::FinleyElements_ptr
boost::shared_ptr< FinleyElements > FinleyElements_ptr
Definition: FinleyElements.h:64
finley::FinleyDomain::getStatus
virtual StatusType getStatus() const
Returns a status indicator of the domain. The status identifier should be unique over the live time i...
Definition: finley/src/FinleyDomain.cpp:2736
finley::FinleyDomain::getFunctionOnBoundaryCode
virtual int getFunctionOnBoundaryCode() const
Return a function on boundary FunctionSpace code.
Definition: finley/src/FinleyDomain.cpp:1000
escript::AbstractSystemMatrix::getPtr
ASM_ptr getPtr()
Returns smart pointer which is managing this object. If one does not exist yet it creates one.
Definition: AbstractSystemMatrix.cpp:56
finley::FinleyDomain::Print_Mesh_Info
void Print_Mesh_Info(bool full=false) const
Definition: finley/src/Mesh_write.cpp:148
escript::FunctionSpace::getX
escript::Data getX() const
Returns the spatial locations of the data points.
Definition: FunctionSpace.cpp:229
escript::DataTypes::dim_t
index_t dim_t
Definition: DataTypes.h:93
escript::DataTypes::ShapeType
std::vector< int > ShapeType
The shape of a single datapoint.
Definition: DataTypes.h:71
weipa::FinleyDomain::initFromFile
virtual bool initFromFile(const std::string &filename)
Reads the domain from a dump file.
Definition: weipa/src/FinleyDomain.cpp:184
finley::ContactElementsZero
@ ContactElementsZero
Definition: Finley.h:89
escript::JMPI
boost::shared_ptr< JMPI_ > JMPI
Definition: EsysMPI.h:72
FINLEY_FACE_ELEMENTS
#define FINLEY_FACE_ELEMENTS
Definition: Finley.h:68
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:1992
finley::ReducedDegreesOfFreedom
@ ReducedDegreesOfFreedom
Definition: Finley.h:81
escript::ATP_ptr
boost::shared_ptr< AbstractTransportProblem > ATP_ptr
Definition: AbstractTransportProblem.h:175
escript::AbstractSystemMatrix
Base class for escript system matrices.
Definition: AbstractSystemMatrix.h:57
finley::FinleyDomain::getFaceElements
ElementFile * getFaceElements() const
returns a pointer to this domain's face element file
Definition: finley/src/FinleyDomain.h:358
weipa::FinleyDomain::cells
FinleyElements_ptr cells
Definition: weipa/src/FinleyDomain.h:72
finley::DegreesOfFreedom
@ DegreesOfFreedom
Definition: Finley.h:80
finley::NodeFile::borrowGlobalNodesIndex
const index_t * borrowGlobalNodesIndex() const
Definition: finley/src/NodeFile.h:231
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:1057
finley::NodeFile::createDenseReducedLabeling
dim_t createDenseReducedLabeling(const std::vector< short > &reducedMask, bool useNodes)
Definition: finley/src/NodeFile.cpp:716
finley::Tri6Macro
@ Tri6Macro
Definition: ReferenceElements.h:112
finley::FinleyDomain::createColoring
void createColoring(const IndexVector &dofMap)
tries to reduce the number of colours for all element files
Definition: finley/src/FinleyDomain.cpp:3052
finley::Hex27Macro
@ Hex27Macro
Definition: ReferenceElements.h:115
IndexList.h
finley::FinleyDomain::setToIntegralsWorker
void setToIntegralsWorker(std::vector< Scalar > &integrals, const escript::Data &arg) const
Definition: finley/src/FinleyDomain.cpp:1712
finley::FinleyDomain::addDiracPoints
void addDiracPoints(const std::vector< double > &points, const std::vector< int > &tags)
adds Dirac delta points. Do NOT call this at any time other than construction! Using them later creat...
Definition: Mesh_addPoints.cpp:49
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:1251
weipa::ElementData_ptr
boost::shared_ptr< ElementData > ElementData_ptr
Definition: weipa.h:67
FINLEY_DEGREES_OF_FREEDOM
#define FINLEY_DEGREES_OF_FREEDOM
Definition: Finley.h:65
finley::ElementFile::Color
index_t * Color
Definition: finley/src/ElementFile.h:164
finley::FinleyDomain::m_name
std::string m_name
domain description
Definition: finley/src/FinleyDomain.h:936
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:1754
finley::FinleyDomain::getNodes
NodeFile * getNodes() const
returns a pointer to this domain's node file
Definition: finley/src/FinleyDomain.h:334
weipa::FinleyElements::getReducedElements
virtual ElementData_ptr getReducedElements() const
Returns the reduced elements.
Definition: FinleyElements.h:155
weipa::NODE_CENTERED
@ NODE_CENTERED
Definition: DomainChunk.h:32
finley::readGmsh_driver
Domain_ptr readGmsh_driver(const bp::list &args)
Definition: finley/src/DomainFactory.cpp:985
finley::FinleyDomain::getDim
virtual int getDim() const
returns the dimensionality of this domain
Definition: finley/src/FinleyDomain.h:563
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:1665
finley::FinleyDomain::optimizeElementOrdering
void optimizeElementOrdering()
redistributes elements to minimize communication during assemblage
Definition: finley/src/FinleyDomain.cpp:3061
FINLEY_ELEMENTS
#define FINLEY_ELEMENTS
Definition: Finley.h:67
finley::FinleyDomain::reducedApproximationOrder
int reducedApproximationOrder
Definition: finley/src/FinleyDomain.h:938
finley::NodeFile::Id
index_t * Id
Id[i] is the unique ID number of FEM node i.
Definition: finley/src/NodeFile.h:164
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:2017
finley::FinleyDomain::getFunctionOnContactOneCode
virtual int getFunctionOnContactOneCode() const
Return a FunctionOnContactOne code.
Definition: finley/src/FinleyDomain.cpp:1020
DUDLEY_REDUCED_ELEMENTS
#define DUDLEY_REDUCED_ELEMENTS
Definition: Dudley.h:60
finley::ElementFile::Id
index_t * Id
Definition: finley/src/ElementFile.h:140
weipa::FinleyDomain::FinleyDomain
FinleyDomain()
Definition: weipa/src/FinleyDomain.cpp:58
finley::NodeFile::createDenseNodeLabeling
dim_t createDenseNodeLabeling(IndexVector &nodeDistribution, const IndexVector &dofDistribution)
Definition: finley/src/NodeFile.cpp:602
finley::ReferenceElementInfo
this struct holds the definition of the reference element
Definition: ReferenceElements.h:121
finley::FinleyDomain::FunctionSpaceNamesMapType
std::map< int, std::string > FunctionSpaceNamesMapType
Definition: finley/src/FinleyDomain.h:558
finley::FinleyDomain::FinleyDomain
FinleyDomain(const std::string &name, int numDim, escript::JMPI jmpi)
Constructor for FinleyDomain.
Definition: finley/src/FinleyDomain.cpp:73
finley::FinleyDomain::getReducedContinuousFunctionCode
virtual int getReducedContinuousFunctionCode() const
Return a continuous on reduced order nodes FunctionSpace code.
Definition: finley/src/FinleyDomain.cpp:985
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:1186
dudley::DudleyDomain::getNodes
NodeFile * getNodes() const
returns a pointer to this domain's node file
Definition: DudleyDomain.h:216
finley::NodeFile::status
int status
Definition: finley/src/NodeFile.h:209
weipa::FinleyDomain::cleanup
void cleanup()
Definition: weipa/src/FinleyDomain.cpp:87
finley::NodeFile::setCoordinates
void setCoordinates(const escript::Data &newX)
copies the array newX into this->coordinates
Definition: finley/src/NodeFile.cpp:256
finley::FinleyDomain::m_functionSpaceTypeNames
static FunctionSpaceNamesMapType m_functionSpaceTypeNames
Definition: finley/src/FinleyDomain.h:965
escript::SO_PRECONDITIONER_AMG
@ SO_PRECONDITIONER_AMG
Definition: SolverOptions.h:145
DUDLEY_ELEMENTS
#define DUDLEY_ELEMENTS
Definition: Dudley.h:57
finley::joinFaces
Domain_ptr joinFaces(const bp::list &meshList, double safetyFactor, double tolerance, bool optimize)
Definition: finley/src/DomainFactory.cpp:1300
finley::FinleyDomain::reducedIntegrationOrder
int reducedIntegrationOrder
Definition: finley/src/FinleyDomain.h:940
finley::FinleyDomain::operator!=
virtual bool operator!=(const escript::AbstractDomain &other) const
Return true if given domains are not equal.
Definition: finley/src/FinleyDomain.cpp:2295
paso::TransportProblem
Definition: Transport.h:36
finley::SMT_TRILINOS
@ SMT_TRILINOS
Definition: finley/src/FinleyDomain.h:133
paso::TransportProblem::getTypeId
static int getTypeId(int solver, int preconditioner, int package, bool symmetry, const escript::JMPI &mpi_info)
Definition: Transport.h:95
finley::FinleyDomain::getTagMap
const TagMap & getTagMap() const
returns a reference to the tag name->value map
Definition: finley/src/FinleyDomain.h:865
finley::Assemble_getSize
void Assemble_getSize(const NodeFile *nodes, const ElementFile *elements, escript::Data &size)
Definition: finley/src/Assemble_getSize.cpp:52
finley::SMT_PASO
@ SMT_PASO
Definition: finley/src/FinleyDomain.h:132
escript::SolverBuddy::isSymmetric
bool isSymmetric() const
Definition: SolverOptions.cpp:648
DUDLEY_REDUCED_FACE_ELEMENTS
#define DUDLEY_REDUCED_FACE_ELEMENTS
Definition: Dudley.h:61
finley::ReducedFaceElements
@ ReducedFaceElements
Definition: Finley.h:87
finley::FinleyDomain::m_contactElements
ElementFile * m_contactElements
the table of contact elements
Definition: finley/src/FinleyDomain.h:948
finley::FinleyDomain::getMPI
virtual escript::JMPI getMPI() const
returns a reference to the MPI information wrapper for this domain
Definition: finley/src/FinleyDomain.h:388
escript::SolverBuddy::getPreconditioner
SolverOptions getPreconditioner() const
Definition: SolverOptions.cpp:353
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:2265
finley::FinleyDomain::getContactElements
ElementFile * getContactElements() const
returns a pointer to this domain's contact element file
Definition: finley/src/FinleyDomain.h:370
finley::Tri6
@ Tri6
Definition: ReferenceElements.h:45
weipa::FinleyDomain::getElementsByName
virtual ElementData_ptr getElementsByName(const std::string &name) const
Returns element data with given name.
Definition: weipa/src/FinleyDomain.cpp:433
MPI_MIN
#define MPI_MIN
Definition: EsysMPI.h:53
escript::isDirectSolver
bool isDirectSolver(const SolverOptions &method)
returns true if the passed solver method refers to a direct solver type
Definition: SolverOptions.h:157
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:1689
finley::FinleyDomain::getNormal
virtual escript::Data getNormal() const
returns boundary normals at the quadrature point on the face elements
Definition: finley/src/FinleyDomain.cpp:2478
finley::FinleyDomain::read
static escript::Domain_ptr read(escript::JMPI mpiInfo, const std::string &fileName, int integrationOrder=-1, int reducedIntegrationOrder=-1, bool optimize=false)
reads a mesh from a fly file. For MPI parallel runs fans out the mesh to multiple processes.
Definition: finley/src/Mesh_read.cpp:153
finley::FinleyDomain::onMasterProcessor
virtual bool onMasterProcessor() const
returns true if on MPI processor 0, else false
Definition: finley/src/FinleyDomain.h:412
finley::NodeFile::degreesOfFreedomDistribution
escript::Distribution_ptr degreesOfFreedomDistribution
Definition: finley/src/NodeFile.h:188
finley::FinleyDomain::getContinuousFunctionCode
virtual int getContinuousFunctionCode() const
Return a continuous FunctionSpace code.
Definition: finley/src/FinleyDomain.cpp:980
finley::FinleyDomain::ownSample
virtual bool ownSample(int fsCode, index_t id) const
Definition: finley/src/FinleyDomain.cpp:1871
finley::NodeFile::getDOFRange
std::pair< index_t, index_t > getDOFRange() const
Definition: finley/src/NodeFile.cpp:229
finley::FinleyDomain::dump
void dump(const std::string &fileName) const
dumps the mesh to a file with the given name.
Definition: finley/src/FinleyDomain.cpp:564
finley::Assemble_LumpedSystem
void Assemble_LumpedSystem(const NodeFile *nodes, const ElementFile *elements, escript::Data &lumpedMat, const escript::Data &D, bool useHRZ)
Definition: finley/src/Assemble_LumpedSystem.cpp:58
escript::RuntimeErrorTranslator
void RuntimeErrorTranslator(const EsysException &e)
Function which translates an EsysException into a python RuntimeError.
Definition: ExceptionTranslators.cpp:51
escript::DataTypes::index_t
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:88
finley::FinleyDomain::load
static escript::Domain_ptr load(const std::string &filename)
recovers domain from a dump file
Definition: finley/src/DomainFactory.cpp:491
finley::Line3Macro
@ Line3Macro
Definition: ReferenceElements.h:111
finley::NodeFile::getGlobalNumNodes
dim_t getGlobalNumNodes() const
Definition: finley/src/NodeFile.h:226
finley::glueFaces
Domain_ptr glueFaces(const bp::list &meshList, double safetyFactor, double tolerance, bool optimize)
Definition: finley/src/DomainFactory.cpp:1288
finley::FinleyDomain::setElements
void setElements(ElementFile *elements)
replaces the element file by elements
Definition: finley/src/FinleyDomain.cpp:122
finley::NodeFile
Definition: finley/src/NodeFile.h:41
finley::FinleyDomain::getPoints
ElementFile * getPoints() const
returns a pointer to this domain's point (nodal) element file
Definition: finley/src/FinleyDomain.h:382
finley::FinleyDomain::isValidTagName
virtual bool isValidTagName(const std::string &name) const
Returns true if name is a defined tag name.
Definition: finley/src/FinleyDomain.cpp:2622
escript::DataTypes::DataVectorAlt::size
size_type size() const
Return the number of elements in this DataVectorAlt.
Definition: DataVectorAlt.h:243
finley::FinleyDomain::getMPIRank
virtual int getMPIRank() const
returns the number MPI rank of this processor
Definition: finley/src/FinleyDomain.h:400
finley::ElementFile::markNodes
void markNodes(std::vector< short > &mask, int offset, bool useLinear)
Definition: finley/src/ElementFile.cpp:319
finley::NodeFile::reducedDegreesOfFreedomId
index_t * reducedDegreesOfFreedomId
Definition: finley/src/NodeFile.h:205
finley::FinleyDomain::newTransportProblem
escript::ATP_ptr newTransportProblem(int blocksize, const escript::FunctionSpace &functionspace, int type) const
creates a TransportProblem
Definition: finley/src/FinleyDomain.cpp:1960
finley::Nodes
@ Nodes
Definition: Finley.h:82
weipa::FinleyDomain::initialized
bool initialized
Definition: weipa/src/FinleyDomain.h:70
weipa::NodeData_ptr
boost::shared_ptr< NodeData > NodeData_ptr
Definition: weipa.h:69
finley::Assemble_PDE
void Assemble_PDE(const NodeFile *nodes, const ElementFile *elements, escript::ASM_ptr S, escript::Data &F, const escript::Data &A, const escript::Data &B, const escript::Data &C, const escript::Data &D, const escript::Data &X, const escript::Data &Y)
Definition: finley/src/Assemble_PDE.cpp:128
FINLEY_REDUCED_CONTACT_ELEMENTS_2
#define FINLEY_REDUCED_CONTACT_ELEMENTS_2
Definition: Finley.h:77
escript::SO_DEFAULT
@ SO_DEFAULT
Definition: SolverOptions.h:110
finley::FinleyDomain::setOrders
void setOrders()
Definition: finley/src/FinleyDomain.cpp:146
weipa::StringVec
std::vector< std::string > StringVec
Definition: weipa.h:61
finley::FinleyDomain::setPoints
void setPoints(ElementFile *elements)
replaces the point element file by elements
Definition: finley/src/FinleyDomain.cpp:140
BOOST_PYTHON_MODULE
BOOST_PYTHON_MODULE(finleycpp)
Definition: finleycpp.cpp:32
escript::FunctionSpace::getTypeCode
int getTypeCode() const
Returns the function space type code.
Definition: FunctionSpace.cpp:95
finley::NodeFile::globalNodesIndex
index_t * globalNodesIndex
assigns each local node a global unique ID in a dense labeling
Definition: finley/src/NodeFile.h:183
finley::ReducedElements
@ ReducedElements
Definition: Finley.h:85
finley::IndexList_insertElementsWithRowRangeNoMainDiagonal
void IndexList_insertElementsWithRowRangeNoMainDiagonal(IndexList *index_list, index_t firstRow, index_t lastRow, ElementFile *elements, index_t *row_map, index_t *col_map)
Definition: finley/src/IndexList.cpp:107
FinleyException.h
dudley::DudleyDomain
DudleyDomain implements the AbstractContinuousDomain interface for the Dudley library.
Definition: DudleyDomain.h:125
escript::function
FunctionSpace function(const AbstractDomain &domain)
Return a function FunctionSpace.
Definition: FunctionSpaceFactory.cpp:57
escript::Vector
Data Vector(double value, const FunctionSpace &what, bool expanded)
Return a Data object containing vector data-points. ie: rank 1 data-points.
Definition: DataFactory.cpp:139
finley::ElementFile::tagsInUse
std::vector< int > tagsInUse
array of tags which are actually used
Definition: finley/src/ElementFile.h:149
finley::FinleyDomain::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: finley/src/FinleyDomain.cpp:1897
paso::M
static dim_t M
Definition: SparseMatrix_saveHB.cpp:52
finley::ElementFile
Definition: finley/src/ElementFile.h:76
FinleyDomain.h
finley::FinleyDomain::distributeByRankOfDOF
void distributeByRankOfDOF(const IndexVector &distribution)
Definition: finley/src/FinleyDomain.cpp:2839
weipa::FinleyDomain::getVarNames
virtual StringVec getVarNames() const
Returns the names of all 'special' domain variables.
Definition: weipa/src/FinleyDomain.cpp:352
escript::functionOnBoundary
FunctionSpace functionOnBoundary(const AbstractDomain &domain)
Return a function on boundary FunctionSpace.
Definition: FunctionSpaceFactory.cpp:69
finley::FinleyDomain::createMappings
void createMappings(const IndexVector &dofDistribution, const IndexVector &nodeDistribution)
Definition: finley/src/FinleyDomain.cpp:185
finley::FinleyDomain::getMPIComm
MPI_Comm getMPIComm() const
get the communicator for this domain. Returns an integer on non-MPI builds Routine must be implemente...
Definition: finley/src/FinleyDomain.h:414
MPI_Comm
int MPI_Comm
Definition: EsysMPI.h:42
finley::FinleyDomain::optimizeDOFDistribution
void optimizeDOFDistribution(IndexVector &distribution)
Definition: finley/src/Mesh_optimizeDOFDistribution.cpp:80
FINLEY_REDUCED_NODES
#define FINLEY_REDUCED_NODES
Definition: Finley.h:73
paso::Pattern_ptr
boost::shared_ptr< Pattern > Pattern_ptr
Definition: Pattern.h:52
finley::FinleyDomain::setTagMap
virtual void setTagMap(const std::string &name, int tag)
sets a map from a clear tag name to a tag key
Definition: finley/src/FinleyDomain.cpp:2606
finley::Assemble_getNormal
void Assemble_getNormal(const NodeFile *nodes, const ElementFile *elements, escript::Data &normals)
calculates the normal vector at quadrature points on face elements
Definition: finley/src/Assemble_getNormal.cpp:52
weipa::FinleyDomain::getNodes
virtual NodeData_ptr getNodes() const
Returns a pointer to the full nodes.
Definition: weipa/src/FinleyDomain.h:63
finley::NodeFile::getNumDegreesOfFreedom
dim_t getNumDegreesOfFreedom() const
returns the number of degrees of freedom (on this rank)
Definition: finley/src/NodeFile.h:266
finley::FinleyDomain::getTag
virtual int getTag(const std::string &name) const
Return the tag key for tag name.
Definition: finley/src/FinleyDomain.cpp:2611
finley::TagMap
std::map< std::string, int > TagMap
Definition: finley/src/FinleyDomain.h:129
escript::AbstractDomain
Base class for all escript domains.
Definition: AbstractDomain.h:64
finley::FinleyDomain::printElementInfo
void printElementInfo(const ElementFile *e, const std::string &title, const std::string &defaultType, bool full) const
Definition: finley/src/Mesh_write.cpp:53
weipa::FinleyNodes
Stores and manipulates finley mesh nodes.
Definition: FinleyNodes.h:51
weipa::FinleyDomain::getMeshByName
virtual NodeData_ptr getMeshByName(const std::string &name) const
Returns the node mesh with given name.
Definition: weipa/src/FinleyDomain.cpp:455
weipa::FinleyNodes_ptr
boost::shared_ptr< FinleyNodes > FinleyNodes_ptr
Definition: FinleyNodes.h:43
paso::SystemMatrix::getSystemMatrixTypeId
static int getSystemMatrixTypeId(int solver, int preconditioner, int package, bool symmetry, const escript::JMPI &mpi_info)
Definition: SystemMatrix.cpp:547
finley::FinleyDomain::setFaceElements
void setFaceElements(ElementFile *elements)
replaces the face element file by elements
Definition: finley/src/FinleyDomain.cpp:128
finley::NodeFile::degreesOfFreedomId
index_t * degreesOfFreedomId
Definition: finley/src/NodeFile.h:204
weipa::FinleyDomain::getMeshForFunctionSpace
virtual NodeData_ptr getMeshForFunctionSpace(int fsCode) const
Returns the node mesh for given function space code.
Definition: weipa/src/FinleyDomain.cpp:236
escript::IndexList
Definition: escriptcore/src/IndexList.h:29
finley::ElementFile::referenceElementSet
const_ReferenceElementSet_ptr referenceElementSet
the reference element to be used
Definition: finley/src/ElementFile.h:134
escript::Data::getExpandedVectorReference
DataTypes::RealVectorType & getExpandedVectorReference(DataTypes::real_t dummy=0)
Ensures that the Data is expanded and returns its underlying vector Does not check for exclusive writ...
Definition: Data.cpp:5841
finley::ContactElementsOne
@ ContactElementsOne
Definition: Finley.h:91
escript::SO_PACKAGE_TRILINOS
@ SO_PACKAGE_TRILINOS
Definition: SolverOptions.h:119
escript::ASM_ptr
boost::shared_ptr< AbstractSystemMatrix > ASM_ptr
Definition: AbstractSystemMatrix.h:47
finley::NodeFile::gather_global
void gather_global(const index_t *index, const NodeFile *in)
Definition: finley/src/NodeFile.cpp:343
escript::DataTypes::cplx_t
std::complex< real_t > cplx_t
complex data type
Definition: DataTypes.h:82
finley::rectangle_driver
Domain_ptr rectangle_driver(const bp::list &args)
Definition: finley/src/DomainFactory.cpp:1207
ReferenceElements.h
weipa::Centering
Centering
Definition: DomainChunk.h:31
finley::NodeFile::tagsInUse
std::vector< int > tagsInUse
vector of tags which are actually used
Definition: finley/src/NodeFile.h:168
finley::ElementFile::optimizeOrdering
void optimizeOrdering()
reorders the elements so that they are stored close to the nodes
Definition: finley/src/ElementFile.cpp:188
finley::ElementFile::updateTagList
void updateTagList()
Definition: finley/src/ElementFile.h:193
escript::Data::expand
void expand()
Whatever the current Data type make this into a DataExpanded.
Definition: Data.cpp:1180
weipa::IntVec
std::vector< int > IntVec
Definition: weipa.h:60
weipa::FinleyElements
Stores and manipulates one type of finley mesh elements (cells, faces or contacts).
Definition: FinleyElements.h:76
finley::ReducedContactElementsZero
@ ReducedContactElementsZero
Definition: Finley.h:90
finley::FinleyDomain::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: finley/src/Mesh_write.cpp:88
finley
A suite of factory methods for creating various finley domains.
Definition: finley/src/Assemble.h:32
finley::NodeFile::setTags
void setTags(int newTag, const escript::Data &mask)
set tags to newTag where mask > 0
Definition: finley/src/NodeFile.cpp:281
finley::NodeFile::numDim
int numDim
number of spatial dimensions
Definition: finley/src/NodeFile.h:162
ESYS_ASSERT
#define ESYS_ASSERT(a, b)
EsysAssert is a MACRO that will throw an exception if the boolean condition specified is false.
Definition: Assert.h:79
finley::FinleyDomain::supportsContactElements
virtual bool supportsContactElements() const
Definition: finley/src/FinleyDomain.h:855
finley::util::packMask
std::vector< index_t > packMask(const std::vector< short > &mask)
Definition: finley/src/Util.cpp:360
finley::FinleyDomain::setFunctionSpaceTypeNames
void setFunctionSpaceTypeNames()
Build the table of function space type names.
Definition: finley/src/FinleyDomain.cpp:950
finley::NodeFile::allocTable
void allocTable(dim_t numNodes)
allocates the node table within this node file to hold numNodes nodes.
Definition: finley/src/NodeFile.cpp:141
finley::FinleyDomain::getVTKElementType
virtual int getVTKElementType() const
returns the VTK element type
Definition: finley/src/FinleyDomain.cpp:2421
escript::ValueError
An exception class that signals an invalid argument value.
Definition: EsysException.h:103
DUDLEY_FACE_ELEMENTS
#define DUDLEY_FACE_ELEMENTS
Definition: Dudley.h:58
finley::FinleyDomain::prepare
void prepare(bool optimize)
prepares the mesh for further use
Definition: finley/src/FinleyDomain.cpp:2782
finley::FinleyDomain::MPIBarrier
virtual void MPIBarrier() const
If compiled for MPI then execute an MPI_Barrier, else do nothing.
Definition: finley/src/FinleyDomain.cpp:115
finley::FinleyDomain::m_elements
ElementFile * m_elements
the table of the elements
Definition: finley/src/FinleyDomain.h:944
weipa::DataVar
A class that provides functionality to read an escript data object from a dump file or an escript::Da...
Definition: DataVar.h:36
finley::FinleyDomain::setNewX
virtual void setNewX(const escript::Data &arg)
assigns new location to the domain
Definition: finley/src/FinleyDomain.cpp:1858
finley::Elements
@ Elements
Definition: Finley.h:84
escript::AbstractContinuousDomain
AbstractContinuousDomain, base class for continuous domains.
Definition: AbstractContinuousDomain.h:60
finley::FinleyDomain::getX
virtual escript::Data getX() const
returns locations in the FEM nodes
Definition: finley/src/FinleyDomain.cpp:2372
finley::FinleyDomain::isValidFunctionSpaceType
virtual bool isValidFunctionSpaceType(int functionSpaceType) const
Returns true if the given integer is a valid function space type for this domain.
Definition: finley/src/FinleyDomain.cpp:943
FINLEY_CONTACT_ELEMENTS_2
#define FINLEY_CONTACT_ELEMENTS_2
Definition: Finley.h:71
weipa::FinleyDomain::initFromEscript
virtual bool initFromEscript(const escript::AbstractDomain *domain)
Initialises the domain using an escript domain instance.
Definition: weipa/src/FinleyDomain.cpp:99
finley::FinleyDomain::getReducedSolutionCode
virtual int getReducedSolutionCode() const
Return a ReducedSolution code.
Definition: finley/src/FinleyDomain.cpp:1035
Assemble.h
finley::FinleyDomain::createHex8
static escript::Domain_ptr createHex8(dim_t NE0, dim_t NE1, dim_t NE2, double l0, double l1, double l2, bool periodic0, bool periodic1, bool periodic2, int order, int reducedOrder, bool useElementsOnFace, bool optimize, escript::JMPI jmpi)
Creates a 3-dimensional rectangular domain with first order (Hex8) elements.
Definition: Mesh_hex8.cpp:40
finley::FinleyDomain::markNodes
void markNodes(std::vector< short > &mask, index_t offset, bool useLinear) const
Definition: finley/src/FinleyDomain.cpp:194
finley::readMesh_driver
Domain_ptr readMesh_driver(const bp::list &args)
Definition: finley/src/DomainFactory.cpp:904
FINLEY_CONTACT_ELEMENTS_1
#define FINLEY_CONTACT_ELEMENTS_1
Definition: Finley.h:70
finley::meshMerge
Domain_ptr meshMerge(const bp::list &meshList)
Definition: finley/src/DomainFactory.cpp:1272
finley::FinleyDomain::merge
static FinleyDomain * merge(const std::vector< const FinleyDomain * > &meshes)
Definition: Mesh_merge.cpp:25
escript::DataTypes::IndexVector
std::vector< index_t > IndexVector
Definition: DataTypes.h:91
weipa::FinleyDomain::getCenteringForFunctionSpace
virtual Centering getCenteringForFunctionSpace(int fsCode) const
Returns whether data on given function space is node or cell centered.
Definition: weipa/src/FinleyDomain.cpp:219
finley::ElementFile::numNodes
int numNodes
number of nodes per element
Definition: finley/src/ElementFile.h:152
finley::ReferenceElementInfo::Name
const char * Name
the name in text form e.g. "Line1", "Rec12", ...
Definition: ReferenceElements.h:125
finley::FinleyDomain::~FinleyDomain
~FinleyDomain()
Destructor for FinleyDomain.
Definition: finley/src/FinleyDomain.cpp:106
finley::FinleyDomain::writeElementInfo
void writeElementInfo(std::ostream &stream, const ElementFile *e, const std::string &defaultType) const
Definition: finley/src/Mesh_write.cpp:34
weipa::FinleyDomain
Represents a full Finley or Dudley domain including nodes and elements.
Definition: weipa/src/FinleyDomain.h:42
finley::FinleyDomain::createRec4
static escript::Domain_ptr createRec4(dim_t NE0, dim_t NE1, double L0, double L1, bool periodic0, bool periodic1, int order, int reducedOrder, bool useElementsOnFace, bool optimize, escript::JMPI jmpi)
Creates a 2-dimensional rectangular domain with first order (Rec4) elements in the rectangle [0,...
Definition: Mesh_rec4.cpp:26