MKL.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
**
*****************************************************************************/
/****************************************************************************/
/* Paso: interface to intel MKL sparse solver */
/****************************************************************************/
/* Copyrights by ACcESS Australia 2006 */
/* Author: Lutz Gross, l.gross@uq.edu.au */
/****************************************************************************/
#ifndef __PASO_MKL_H__
#define __PASO_MKL_H__
#include "SparseMatrix.h"
namespace paso {
#ifdef ESYS_INDEXTYPE_LONG
#define ES_PARDISO pardiso_64
#define ES_MKL_INT MKL_INT64
#else
#define ES_PARDISO pardiso
#define ES_MKL_INT MKL_INT
#endif
#ifdef ESYS_HAVE_MKL
#include <mkl_pardiso.h>
#endif
#define MKL_ERROR_NO 0
#define MKL_MTYPE_REAL_SYM -2
#define MKL_MTYPE_REAL_UNSYM 11
#define MKL_REORDERING_MINIMUM_DEGREE 0
#define MKL_REORDERING_NESTED_DISSECTION 2
#define MKL_REORDERING_NESTED_DISSECTION_OMP 3
#define MKL_PHASE_SYMBOLIC_FACTORIZATION 11
#define MKL_PHASE_FACTORIZATION 22
#define MKL_PHASE_SOLVE 33
#define MKL_PHASE_RELEASE_MEMORY -1
void MKL_free(SparseMatrix* A);
void MKL_solve(SparseMatrix_ptr A, double* out, double* in, index_t reordering,
dim_t numRefinements, bool verbose);
} // namespace paso
#endif // __PASO_MKL_H__
MATRIX_FORMAT_BLK1
#define MATRIX_FORMAT_BLK1
Definition: Paso.h:64
dudley::NodeFile::globalDegreesOfFreedom
index_t * globalDegreesOfFreedom
Definition: dudley/src/NodeFile.h:157
finley::FinleyDomain::setContactElements
void setContactElements(ElementFile *elements)
replaces the contact element file by elements
Definition: finley/src/FinleyDomain.cpp:134
MKL.h
ES_MKL_INT
#define ES_MKL_INT
Definition: MKL.h:56
paso::LARGE_POSITIVE_FLOAT
static const real_t LARGE_POSITIVE_FLOAT
Definition: FCT_Solver.cpp:44
MPI_Status
int MPI_Status
Definition: EsysMPI.h:45
PASO_ONE
#define PASO_ONE
Definition: Paso.h:68
MKL_REORDERING_NESTED_DISSECTION_OMP
#define MKL_REORDERING_NESTED_DISSECTION_OMP
Definition: MKL.h:70
dudley::ElementFile::Tag
int * Tag
Tag[i] is the tag of element i.
Definition: dudley/src/ElementFile.h:135
dudley::DudleyDomain::m_mpiInfo
escript::JMPI m_mpiInfo
MPI information.
Definition: DudleyDomain.h:776
finley::ElementFile::minColor
index_t minColor
minimum color value
Definition: finley/src/ElementFile.h:167
finley::FinleyDomain::joinFaces
void joinFaces(double safetyFactor, double tolerance, bool optimize)
Definition: Mesh_joinFaces.cpp:53
finley::Rec4_Contact
@ Rec4_Contact
Definition: ReferenceElements.h:87
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::Line3
@ Line3
Definition: ReferenceElements.h:42
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:51
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
MPI_Op
int MPI_Op
Definition: EsysMPI.h:44
finley::FinleyDomain::approximationOrder
int approximationOrder
Definition: finley/src/FinleyDomain.h:937
MKL_REORDERING_MINIMUM_DEGREE
#define MKL_REORDERING_MINIMUM_DEGREE
Definition: MKL.h:68
dudley::Dudley_Point1
@ Dudley_Point1
Definition: ElementType.h:54
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
dudley::DudleyException
Definition: DudleyException.h:39
finley::Rec9
@ Rec9
Definition: ReferenceElements.h:50
finley::FinleyDomain::m_tagMap
TagMap m_tagMap
the tag map mapping names to tag keys
Definition: finley/src/FinleyDomain.h:952
dudley::NodeFile::numDim
int numDim
number of spatial dimensions
Definition: dudley/src/NodeFile.h:146
finley::Rec8Face_Contact
@ Rec8Face_Contact
Definition: ReferenceElements.h:100
paso::Solver_MINRES
SolverResult Solver_MINRES(SystemMatrix_ptr A, double *R, double *X, dim_t *iter, double *tolerance, Performance *pp)
Definition: MINRES.cpp:74
finley::Hex20Face_Contact
@ Hex20Face_Contact
Definition: ReferenceElements.h:108
dudley::DudleyDomain::resolveNodeIds
void resolveNodeIds()
Definition: Mesh_resolveNodeIds.cpp:37
dudley::ElementFile::getNodeRange
std::pair< index_t, index_t > getNodeRange() const
Definition: dudley/src/ElementFile.h:184
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
dudley::NodeFile
Definition: dudley/src/NodeFile.h:39
finley::ElementFile::allocTable
void allocTable(dim_t NE)
allocates the element table within an element file to hold NE elements
Definition: finley/src/ElementFile.cpp:79
DudleyDomain.h
finley::NodeFile::globalDegreesOfFreedom
index_t * globalDegreesOfFreedom
Definition: finley/src/NodeFile.h:173
escript::Distribution_ptr
boost::shared_ptr< Distribution > Distribution_ptr
Definition: Distribution.h:39
MKL_PHASE_SYMBOLIC_FACTORIZATION
#define MKL_PHASE_SYMBOLIC_FACTORIZATION
Definition: MKL.h:71
finley::FinleyDomain::glueFaces
void glueFaces(double safetyFactor, double tolerance, bool optimize)
Definition: Mesh_glueFaces.cpp:53
dudley::DudleyDomain::m_name
std::string m_name
domain description
Definition: DudleyDomain.h:778
INDEX2
#define INDEX2(_X1_, _X2_, _N1_)
Definition: index.h:23
finley::const_ReferenceElementSet_ptr
boost::shared_ptr< const ReferenceElementSet > const_ReferenceElementSet_ptr
Definition: ReferenceElementSets.h:94
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:84
dudley::NodeFile::borrowTargetDegreesOfFreedom
const index_t * borrowTargetDegreesOfFreedom() const
returns the mapping from local degrees of freedom to a target
Definition: dudley/src/NodeFile.h:234
MISSING_NODES
#define MISSING_NODES
Definition: finley/src/Mesh_readGmsh.cpp:30
finley::NodeFile::Tag
int * Tag
Tag[i] is the tag of node i.
Definition: finley/src/NodeFile.h:166
finley::Line3_Contact
@ Line3_Contact
Definition: ReferenceElements.h:81
finley::ReferenceElement::getTypeId
static ElementTypeId getTypeId(const char *)
returns the element type id from its textual representation
Definition: ReferenceElements.cpp:670
finley::Tet10
@ Tet10
Definition: ReferenceElements.h:54
finley::ElementFile::Tag
int * Tag
Tag[i] is the tag of element i.
Definition: finley/src/ElementFile.h:143
dudley::ElementFile::Nodes
index_t * Nodes
Nodes[INDEX(k, i, numNodes)] is the k-th node in the i-th element.
Definition: dudley/src/ElementFile.h:147
dudley::IndexList_insertElementsWithRowRangeNoMainDiagonal
void IndexList_insertElementsWithRowRangeNoMainDiagonal(IndexList *indexList, index_t firstRow, index_t lastRow, const ElementFile *elements, const index_t *map)
Definition: dudley/src/IndexList.cpp:77
dudley::DudleyDomain::setElements
void setElements(ElementFile *elements)
replaces the element file by elements
Definition: DudleyDomain.cpp:107
escript::NotImplementedError
An exception class for features which are not (yet) implemented.
Definition: EsysException.h:93
finley::FinleyException
Definition: FinleyException.h:40
finley::Tet10Macro
@ Tet10Macro
Definition: ReferenceElements.h:114
ERROR
#define ERROR
Definition: finley/src/Mesh_readGmsh.cpp:34
paso::SystemMatrix_ptr
boost::shared_ptr< SystemMatrix > SystemMatrix_ptr
Definition: SystemMatrix.h:55
finley::FinleyDomain::integrationOrder
int integrationOrder
Definition: finley/src/FinleyDomain.h:939
finley::FaceCenter::refId
int refId
Definition: Mesh_findMatchingFaces.cpp:61
dudley::DudleyDomain::m_elements
ElementFile * m_elements
the table of the elements
Definition: DudleyDomain.h:782
dudley::ElementFile::allocTable
void allocTable(dim_t NE)
allocates the element table within an element file to hold NE elements
Definition: dudley/src/ElementFile.cpp:68
dudley::NodeFile::getNumNodes
dim_t getNumNodes() const
returns the number of FEM nodes (on this rank)
Definition: dudley/src/NodeFile.h:204
finley::FinleyDomain::m_faceElements
ElementFile * m_faceElements
the table of face elements
Definition: finley/src/FinleyDomain.h:946
paso::SystemMatrixPattern_ptr
boost::shared_ptr< SystemMatrixPattern > SystemMatrixPattern_ptr
Definition: SystemMatrixPattern.h:54
finley::NodeFile::globalReducedDOFIndex
index_t * globalReducedDOFIndex
Definition: finley/src/NodeFile.h:178
dudley::DudleyDomain::DudleyDomain
DudleyDomain(const std::string &name, int numDim, escript::JMPI jmpi)
Constructor for DudleyDomain.
Definition: DudleyDomain.cpp:69
PASO_MINIMUM_FILL_IN
#define PASO_MINIMUM_FILL_IN
Definition: Options.h:53
dudley::DudleyDomain::writeElementInfo
void writeElementInfo(std::ostream &stream, const ElementFile *e, const std::string &defaultType) const
Definition: dudley/src/Mesh_write.cpp:33
IndexList.h
finley::NodeFile::getNumDegreesOfFreedomTargets
dim_t getNumDegreesOfFreedomTargets() const
returns the number of degrees of freedom targets (own and shared)
Definition: finley/src/NodeFile.h:276
finley::FaceCenter::x
std::vector< double > x
Definition: Mesh_findMatchingFaces.cpp:62
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
paso::MKL_solve
void MKL_solve(SparseMatrix_ptr A, double *out, double *in, index_t reordering, dim_t numRefinements, bool verbose)
Definition: MKL.cpp:81
dudley::ElementFile::Owner
int * Owner
Owner[i] contains the rank that owns element i.
Definition: dudley/src/ElementFile.h:138
escript::Domain_ptr
boost::shared_ptr< AbstractDomain > Domain_ptr
Definition: AbstractDomain.h:55
paso::util::AXPY
void AXPY(dim_t N, double *x, double a, const double *y)
x = x+a*y
Definition: PasoUtil.h:128
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::DataTypes::real_t_max
real_t real_t_max()
Returns the maximum finite value for the real_t type.
Definition: DataTypes.h:117
MAX3
#define MAX3(_arg1_, _arg2_, _arg3_)
Definition: Mesh_hex20.cpp:33
finley::Rec8Face
@ Rec8Face
Definition: ReferenceElements.h:68
finley::NodeFile::gather
void gather(const index_t *index, const NodeFile *in)
Definition: finley/src/NodeFile.cpp:335
Util.h
paso::InputError
@ InputError
Definition: Paso.h:74
finley::lockingGridSize
static double lockingGridSize
Definition: Mesh_findMatchingFaces.cpp:56
finley::ElementFile::Nodes
index_t * Nodes
Definition: finley/src/ElementFile.h:158
finley::Rec8_Contact
@ Rec8_Contact
Definition: ReferenceElements.h:88
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
SUCCESS
#define SUCCESS
Definition: finley/src/Mesh_readGmsh.cpp:33
finley::FinleyDomain::m_nodes
NodeFile * m_nodes
the table of the nodes
Definition: finley/src/FinleyDomain.h:942
dudley::ElementFile::ename
const char * ename
name of element type
Definition: dudley/src/ElementFile.h:170
finley::FinleyDomain::resolveNodeIds
void resolveNodeIds()
Definition: finley/src/FinleyDomain.cpp:2970
dudley::ElementFile::distributeByRankOfDOF
void distributeByRankOfDOF(const int *mpiRankOfDOF, const index_t *nodesId)
redistributes the elements including overlap by rank
Definition: ElementFile_distributeByRankOfDOF.cpp:38
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
PASO_MKL
#define PASO_MKL
Definition: Options.h:50
finley::FinleyDomain::getElements
ElementFile * getElements() const
returns a pointer to this domain's element file
Definition: finley/src/FinleyDomain.h:346
MATRIX_FORMAT_OFFSET1
#define MATRIX_FORMAT_OFFSET1
Definition: Paso.h:65
finley::Tri3
@ Tri3
Definition: ReferenceElements.h:44
finley::ElementFile::maxColor
index_t maxColor
maximum color value
Definition: finley/src/ElementFile.h:170
SparseMatrix.h
finley::Rec9Macro
@ Rec9Macro
Definition: ReferenceElements.h:113
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
Options.h
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:150
finley::Hex27
@ Hex27
Definition: ReferenceElements.h:58
finley::Rec9_Contact
@ Rec9_Contact
Definition: ReferenceElements.h:89
finley::FinleyDomain::findMatchingFaces
void findMatchingFaces(double safetyFactor, double tolerance, int *numPairs, int *elem0, int *elem1, int *matchingNodes) const
Definition: Mesh_findMatchingFaces.cpp:90
dudley::ElementFile::maxColor
index_t maxColor
maximum color value
Definition: dudley/src/ElementFile.h:158
MPI_MAX
#define MPI_MAX
Definition: EsysMPI.h:54
finley::FinleyDomain::m_points
ElementFile * m_points
the table of points (treated as elements of dimension 0)
Definition: finley/src/FinleyDomain.h:950
ES_PARDISO
#define ES_PARDISO
Definition: MKL.h:55
paso::NegativeNormError
@ NegativeNormError
Definition: Paso.h:77
dudley::DudleyDomain::m_points
ElementFile * m_points
the table of points (treated as elements of dimension 0)
Definition: DudleyDomain.h:786
finley::NodeFile::getNumNodes
dim_t getNumNodes() const
returns the number of FEM nodes (on this rank)
Definition: finley/src/NodeFile.h:256
finley::Point1_Contact
@ Point1_Contact
Definition: ReferenceElements.h:79
dudley::IndexList_insertElements
void IndexList_insertElements(IndexList *index_list, const ElementFile *elements, const index_t *map)
Definition: dudley/src/IndexList.cpp:49
Solver.h
paso::util::copy
void copy(dim_t N, double *out, const double *in)
out = in
Definition: PasoUtil.h:116
dudley::NodeFile::getNumDegreesOfFreedomTargets
dim_t getNumDegreesOfFreedomTargets() const
returns the number of degrees of freedom targets (own and shared)
Definition: dudley/src/NodeFile.h:214
finley::NodeFile::Coordinates
double * Coordinates
Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of node i.
Definition: finley/src/NodeFile.h:175
paso::Breakdown
@ Breakdown
Definition: Paso.h:76
dudley::ElementFile::minColor
index_t minColor
minimum color value
Definition: dudley/src/ElementFile.h:155
finley::ElementFile::numElements
dim_t numElements
number of elements
Definition: finley/src/ElementFile.h:136
dudley
A suite of factory methods for creating 2D and 3D dudley domains.
Definition: dudley/src/Assemble.h:32
MKL_PHASE_RELEASE_MEMORY
#define MKL_PHASE_RELEASE_MEMORY
Definition: MKL.h:74
finley::ElementFile::Owner
int * Owner
Owner[i] contains the rank that owns element i.
Definition: finley/src/ElementFile.h:146
dudley::NodeFile::assignMPIRankToDOFs
void assignMPIRankToDOFs(int *mpiRankOfDOF, const IndexVector &distribution)
Definition: dudley/src/NodeFile.cpp:234
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:28
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
escript::IOError
An exception class for Input/Output errors.
Definition: EsysException.h:83
finley::FinleyDomain::Print_Mesh_Info
void Print_Mesh_Info(bool full=false) const
Definition: finley/src/Mesh_write.cpp:148
INDEX3
#define INDEX3(_X1_, _X2_, _X3_, _N1_, _N2_)
Definition: index.h:25
escript::DataTypes::dim_t
index_t dim_t
Definition: DataTypes.h:93
dudley::ElementFile::numElements
dim_t numElements
number of elements
Definition: dudley/src/ElementFile.h:127
escript::JMPI
boost::shared_ptr< JMPI_ > JMPI
Definition: EsysMPI.h:72
finley::FinleyDomain::getFaceElements
ElementFile * getFaceElements() const
returns a pointer to this domain's face element file
Definition: finley/src/FinleyDomain.h:358
dudley::ElementFile
Definition: dudley/src/ElementFile.h:66
finley::Tri6Macro
@ Tri6Macro
Definition: ReferenceElements.h:112
dudley::DudleyDomain::optimizeDOFDistribution
void optimizeDOFDistribution(IndexVector &distribution)
Definition: dudley/src/Mesh_optimizeDOFDistribution.cpp:78
finley::Hex27Macro
@ Hex27Macro
Definition: ReferenceElements.h:115
finley::Rec8
@ Rec8
Definition: ReferenceElements.h:49
IndexList.h
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:26
dudley::DudleyDomain::m_nodes
NodeFile * m_nodes
the table of the nodes
Definition: DudleyDomain.h:780
dudley::ElementFile::Id
index_t * Id
Definition: dudley/src/ElementFile.h:132
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::NoRef
@ NoRef
Definition: ReferenceElements.h:116
dudley::DudleyDomain::markNodes
void markNodes(std::vector< short > &mask, index_t offset) const
Definition: DudleyDomain.cpp:151
finley::Rec4Face
@ Rec4Face
Definition: ReferenceElements.h:67
dudley::DudleyDomain::optimizeDOFLabeling
void optimizeDOFLabeling(const IndexVector &distribution)
optimizes the labeling of the DOFs on each processor
Definition: Mesh_optimizeDOFLabeling.cpp:40
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
paso::SystemMatrixPattern
Definition: SystemMatrixPattern.h:59
finley::FinleyDomain::getNodes
NodeFile * getNodes() const
returns a pointer to this domain's node file
Definition: finley/src/FinleyDomain.h:334
finley::util::getMaxInt
index_t getMaxInt(int dim, dim_t N, const index_t *values)
calculates the maximum value from a dim X N integer array
Definition: finley/src/Util.cpp:286
paso::SolverResult
SolverResult
Definition: Paso.h:57
dudley::DudleyDomain::m_tagMap
TagMap m_tagMap
the tag map mapping names to tag keys
Definition: DudleyDomain.h:788
finley::Hex8Face_Contact
@ Hex8Face_Contact
Definition: ReferenceElements.h:107
MAX3
#define MAX3(_arg1_, _arg2_, _arg3_)
Definition: Mesh_tet4.cpp:24
SystemMatrix.h
finley::Point1
@ Point1
Definition: ReferenceElements.h:40
finley::FinleyDomain::getDim
virtual int getDim() const
returns the dimensionality of this domain
Definition: finley/src/FinleyDomain.h:563
finley::FinleyDomain::reducedApproximationOrder
int reducedApproximationOrder
Definition: finley/src/FinleyDomain.h:938
dudley::DudleyDomain::Print_Mesh_Info
void Print_Mesh_Info(bool full=false) const
Definition: dudley/src/Mesh_write.cpp:140
paso::MaxIterReached
@ MaxIterReached
Definition: Paso.h:73
finley::NodeFile::Id
index_t * Id
Id[i] is the unique ID number of FEM node i.
Definition: finley/src/NodeFile.h:164
MKL_REORDERING_NESTED_DISSECTION
#define MKL_REORDERING_NESTED_DISSECTION
Definition: MKL.h:69
finley::util::gather
void gather(int len, const index_t *index, int numData, const double *in, double *out)
Definition: finley/src/Util.cpp:72
finley::ElementFile::Id
index_t * Id
Definition: finley/src/ElementFile.h:140
dudley::util::packMask
std::vector< index_t > packMask(const std::vector< short > &mask)
Definition: dudley/src/Util.cpp:241
paso::MKL_free
void MKL_free(SparseMatrix *A)
Definition: MKL.cpp:50
MKL_ERROR_NO
#define MKL_ERROR_NO
Definition: MKL.h:64
finley::Hex20
@ Hex20
Definition: ReferenceElements.h:57
finley::FinleyDomain::FinleyDomain
FinleyDomain(const std::string &name, int numDim, escript::JMPI jmpi)
Constructor for FinleyDomain.
Definition: finley/src/FinleyDomain.cpp:73
MKL_MTYPE_REAL_UNSYM
#define MKL_MTYPE_REAL_UNSYM
Definition: MKL.h:66
MAX_numNodes_gmsh
#define MAX_numNodes_gmsh
Definition: finley/src/Mesh_readGmsh.cpp:27
dudley::DudleyDomain::getNodes
NodeFile * getNodes() const
returns a pointer to this domain's node file
Definition: DudleyDomain.h:216
finley::getDist
double getDist(int e0, int i0, int e1, int i1, int numDim, int NN, const double *X)
Definition: Mesh_findMatchingFaces.cpp:79
finley::Tri6_Contact
@ Tri6_Contact
Definition: ReferenceElements.h:84
finley::FinleyDomain::reducedIntegrationOrder
int reducedIntegrationOrder
Definition: finley/src/FinleyDomain.h:940
finley::Rec4Face_Contact
@ Rec4Face_Contact
Definition: ReferenceElements.h:99
paso::SparseMatrix_ptr
boost::shared_ptr< SparseMatrix > SparseMatrix_ptr
Definition: SparseMatrix.h:50
finley::NodeFile::reducedDegreesOfFreedomDistribution
escript::Distribution_ptr reducedDegreesOfFreedomDistribution
Definition: finley/src/NodeFile.h:189
finley::FinleyDomain::m_contactElements
ElementFile * m_contactElements
the table of contact elements
Definition: finley/src/FinleyDomain.h:948
finley::Hex8Face
@ Hex8Face
Definition: ReferenceElements.h:75
MPI_DOUBLE
#define MPI_DOUBLE
Definition: EsysMPI.h:47
finley::Hex8
@ Hex8
Definition: ReferenceElements.h:56
finley::FinleyDomain::getContactElements
ElementFile * getContactElements() const
returns a pointer to this domain's contact element file
Definition: finley/src/FinleyDomain.h:370
dudley::NodeFile::getDOFRange
std::pair< index_t, index_t > getDOFRange() const
Definition: dudley/src/NodeFile.cpp:160
finley::Tri6
@ Tri6
Definition: ReferenceElements.h:45
dudley::NodeFile::allocTable
void allocTable(dim_t numNodes)
allocates the node table within this node file to hold numNodes nodes.
Definition: dudley/src/NodeFile.cpp:77
finley::Tri3_Contact
@ Tri3_Contact
Definition: ReferenceElements.h:83
paso::PasoException
PasoException exception class.
Definition: PasoException.h:47
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::Line2
@ Line2
Definition: ReferenceElements.h:41
finley::NodeFile::degreesOfFreedomDistribution
escript::Distribution_ptr degreesOfFreedomDistribution
Definition: finley/src/NodeFile.h:188
escript::gettime
double gettime()
returns the current ticks for timing
Definition: EsysMPI.h:187
finley::ElementTypeId
ElementTypeId
Definition: ReferenceElements.h:39
paso::util::scale
void scale(dim_t N, double *x, double a)
x = a*x
Definition: PasoUtil.h:122
escript::DataTypes::index_t
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:88
MAX_numNodes_gmsh
#define MAX_numNodes_gmsh
Definition: dudley/src/Mesh_readGmsh.cpp:26
finley::Line3Macro
@ Line3Macro
Definition: ReferenceElements.h:111
finley::Tet4
@ Tet4
Definition: ReferenceElements.h:53
EARLY_EOF
#define EARLY_EOF
Definition: finley/src/Mesh_readGmsh.cpp:29
dudley::NodeFile::dofDistribution
escript::Distribution_ptr dofDistribution
MPI distribution of degrees of freedom.
Definition: dudley/src/NodeFile.h:167
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:29
finley::FinleyDomain::setElements
void setElements(ElementFile *elements)
replaces the element file by elements
Definition: finley/src/FinleyDomain.cpp:122
dudley::DudleyDomain::createColoring
void createColoring(const index_t *dofMap)
tries to reduce the number of colours for all element files
Definition: DudleyDomain.cpp:2147
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
dudley::Dudley_Tet4
@ Dudley_Tet4
Definition: ElementType.h:57
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:1956
finley::ElementFile::copyTable
void copyTable(index_t offset, index_t nodeOffset, index_t idOffset, const ElementFile *in)
Definition: finley/src/ElementFile.cpp:120
dudley::DudleyDomain::relabelElementNodes
void relabelElementNodes(const index_t *newNode, index_t offset)
Definition: DudleyDomain.cpp:158
escript::AbstractDomain::getPtr
Domain_ptr getPtr()
Returns smart pointer which is managing this object. If one does not exist yet it creates one.
Definition: AbstractDomain.cpp:39
finley::FaceCenterCompare
bool FaceCenterCompare(const FaceCenter &e1, const FaceCenter &e2)
comparison function for findMatchingFaces
Definition: Mesh_findMatchingFaces.cpp:66
dudley::DudleyDomain::setPoints
void setPoints(ElementFile *elements)
replaces the point element file by elements
Definition: DudleyDomain.cpp:119
Util.h
PasoUtil.h
MKL_PHASE_FACTORIZATION
#define MKL_PHASE_FACTORIZATION
Definition: MKL.h:72
finley::Hex20Face
@ Hex20Face
Definition: ReferenceElements.h:76
finley::FinleyDomain::setPoints
void setPoints(ElementFile *elements)
replaces the point element file by elements
Definition: finley/src/FinleyDomain.cpp:140
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::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
dudley::DudleyDomain::distributeByRankOfDOF
void distributeByRankOfDOF(const IndexVector &distribution)
Definition: Mesh_distributeByRankOfDOF.cpp:39
FinleyException.h
dudley::DudleyDomain
DudleyDomain implements the AbstractContinuousDomain interface for the Dudley library.
Definition: DudleyDomain.h:125
dudley::NodeFile::Id
index_t * Id
Id[i] is the unique ID number of FEM node i.
Definition: dudley/src/NodeFile.h:148
DIM
#define DIM
finley::IndexList_insertElements
void IndexList_insertElements(IndexList *index_list, ElementFile *elements, bool reduce_row_order, const index_t *row_map, bool reduce_col_order, const index_t *col_map)
Definition: finley/src/IndexList.cpp:54
finley::ElementFile
Definition: finley/src/ElementFile.h:76
dudley::NodeFile::Tag
int * Tag
Tag[i] is the tag of node i.
Definition: dudley/src/NodeFile.h:150
FinleyDomain.h
PasoException.h
dudley::DudleyDomain::prepare
void prepare(bool optimize)
prepares the mesh for further use
Definition: DudleyDomain.cpp:2101
finley::FinleyDomain::optimizeDOFDistribution
void optimizeDOFDistribution(IndexVector &distribution)
Definition: finley/src/Mesh_optimizeDOFDistribution.cpp:80
paso::Connector_ptr
boost::shared_ptr< Connector > Connector_ptr
Definition: Coupler.h:52
dudley::ElementFile::Color
index_t * Color
Definition: dudley/src/ElementFile.h:152
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
dudley::DudleyDomain::setFaceElements
void setFaceElements(ElementFile *elements)
replaces the face element file by elements
Definition: DudleyDomain.cpp:113
finley::NodeFile::borrowTargetDegreesOfFreedom
const index_t * borrowTargetDegreesOfFreedom() const
Definition: finley/src/NodeFile.h:316
THROW_ERROR
#define THROW_ERROR
Definition: finley/src/Mesh_readGmsh.cpp:32
finley::NodeFile::getNumDegreesOfFreedom
dim_t getNumDegreesOfFreedom() const
returns the number of degrees of freedom (on this rank)
Definition: finley/src/NodeFile.h:266
dudley::DudleyDomain::getDim
virtual int getDim() const
Returns the spatial dimension of the domain.
Definition: DudleyDomain.h:433
dudley::Dudley_NoRef
@ Dudley_NoRef
Definition: ElementType.h:61
finley::NodeFile::getNumReducedDegreesOfFreedomTargets
dim_t getNumReducedDegreesOfFreedomTargets() const
returns the number of reduced degrees of freedom targets (own and shared)
Definition: finley/src/NodeFile.h:281
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
finley::ReferenceElementSet
Definition: ReferenceElementSets.h:41
finley::NodeFile::borrowTargetReducedDegreesOfFreedom
const index_t * borrowTargetReducedDegreesOfFreedom() const
Definition: finley/src/NodeFile.h:321
MAX3
#define MAX3(_arg1_, _arg2_, _arg3_)
Definition: Mesh_hex8.cpp:34
finley::FinleyDomain::setFaceElements
void setFaceElements(ElementFile *elements)
replaces the face element file by elements
Definition: finley/src/FinleyDomain.cpp:128
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
paso
Definition: BiCGStab.cpp:26
MKL_PHASE_SOLVE
#define MKL_PHASE_SOLVE
Definition: MKL.h:73
dudley::Dudley_Line2
@ Dudley_Line2
Definition: ElementType.h:55
paso::NoError
@ NoError
Definition: Paso.h:72
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::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
dudley::Dudley_Tri3
@ Dudley_Tri3
Definition: ElementType.h:56
dudley::NodeFile::getNumDegreesOfFreedom
dim_t getNumDegreesOfFreedom() const
returns the number of degrees of freedom (on this rank)
Definition: dudley/src/NodeFile.h:209
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
dudley::NodeFile::Coordinates
double * Coordinates
Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of node i.
Definition: dudley/src/NodeFile.h:159
escript::ValueError
An exception class that signals an invalid argument value.
Definition: EsysException.h:103
dudley::ElementTypeId
ElementTypeId
Definition: ElementType.h:39
finley::FinleyDomain::prepare
void prepare(bool optimize)
prepares the mesh for further use
Definition: finley/src/FinleyDomain.cpp:2782
finley::FinleyDomain::m_elements
ElementFile * m_elements
the table of the elements
Definition: finley/src/FinleyDomain.h:944
paso::util::innerProduct
double innerProduct(dim_t n, const double *x, const double *y, escript::JMPI mpiinfo)
returns the inner product of global arrays x and y
Definition: PasoUtil.cpp:457
dudley::ElementFile::etype
ElementTypeId etype
element type ID
Definition: dudley/src/ElementFile.h:167
finley::Line2_Contact
@ Line2_Contact
Definition: ReferenceElements.h:80
dudley::DudleyDomain::m_faceElements
ElementFile * m_faceElements
the table of face elements
Definition: DudleyDomain.h:784
dudley::eltTypeFromString
ElementTypeId eltTypeFromString(const std::string &s)
Definition: ElementType.h:50
MATRIX_FORMAT_DEFAULT
#define MATRIX_FORMAT_DEFAULT
Definition: Paso.h:62
finley::NodeFile::copyTable
void copyTable(index_t offset, index_t idOffset, index_t dofOffset, const NodeFile *in)
Definition: finley/src/NodeFile.cpp:299
MISSING_ELEMENTS
#define MISSING_ELEMENTS
Definition: finley/src/Mesh_readGmsh.cpp:31
dudley::ElementFile::numNodes
int numNodes
number of nodes per element
Definition: dudley/src/ElementFile.h:144
dudley::NodeFile::globalNodesIndex
index_t * globalNodesIndex
assigns each local node a global unique ID in a dense labeling
Definition: dudley/src/NodeFile.h:161
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
PASO_ZERO
#define PASO_ZERO
Definition: Paso.h:69
finley::Rec4
@ Rec4
Definition: ReferenceElements.h:48
finley::FinleyDomain::merge
static FinleyDomain * merge(const std::vector< const FinleyDomain * > &meshes)
Definition: Mesh_merge.cpp:25
SSCANF_CHECK
#define SSCANF_CHECK(scan_ret)
Definition: finley/src/Mesh_readGmsh.cpp:26
escript::DataTypes::IndexVector
std::vector< index_t > IndexVector
Definition: DataTypes.h:91
finley::ElementFile::numNodes
int numNodes
number of nodes per element
Definition: finley/src/ElementFile.h:152
finley::FinleyDomain::writeElementInfo
void writeElementInfo(std::ostream &stream, const ElementFile *e, const std::string &defaultType) const
Definition: finley/src/Mesh_write.cpp:34
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