dudley/src/DomainFactory.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 __DUDLEY_DOMAINFACTORY_H__
#define __DUDLEY_DOMAINFACTORY_H__
#include <dudley/DudleyDomain.h>
#include <boost/python/list.hpp>
#include <sstream>
namespace dudley {
escript::Domain_ptr readMesh(const std::string& fileName,
int integrationOrder = -1,
int reducedIntegrationOrder = -1,
bool optimize = false);
escript::Domain_ptr readGmsh(const std::string& fileName, int numDim,
int integrationOrder = -1,
int reducedIntegrationOrder = -1,
bool optimize = false);
escript::Domain_ptr brick(escript::JMPI jmpi,
dim_t n0=1, dim_t n1=1, dim_t n2=1, int order=1,
double l0=1.0, double l1=1.0, double l2=1.0,
bool periodic0=false, bool periodic1=false, bool periodic2=false,
int integrationOrder=-1, int reducedIntegrationOrder=-1,
bool useElementsOnFace=false, bool useFullElementOrder=false,
bool optimize=false);
escript::Domain_ptr brick_driver(const boost::python::list& args);
escript::Domain_ptr rectangle(escript::JMPI jmpi,
dim_t n0 = 1, dim_t n1 = 1, int order = 1,
double l0 = 1.0, double l1 = 1.0,
bool periodic0 = false, bool periodic1 = false,
int integrationOrder = -1,
int reducedIntegrationOrder = -1,
bool useElementsOnFace = false,
bool useFullElementOrder = false,
bool optimize = false);
escript::Domain_ptr rectangle_driver(const boost::python::list& args);
} // end of namespace
#endif // __DUDLEY_DOMAINFACTORY_H__
dudley::NodeFile::globalDegreesOfFreedom
index_t * globalDegreesOfFreedom
Definition: dudley/src/NodeFile.h:157
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
finley::brick_driver
Domain_ptr brick_driver(const bp::list &args)
Definition: finley/src/DomainFactory.cpp:1105
dudley::ElementFile::Tag
int * Tag
Tag[i] is the tag of element i.
Definition: dudley/src/ElementFile.h:135
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::FinleyDomain
FinleyDomain implements the AbstractContinuousDomain interface for the Finley library.
Definition: finley/src/FinleyDomain.h:143
finley::NodeFile::globalReducedNodesIndex
index_t * globalReducedNodesIndex
Definition: finley/src/NodeFile.h:181
message
Definition: blocktools.h:69
dudley::DudleyException
Definition: DudleyException.h:39
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
dudley::rectangle
Domain_ptr rectangle(JMPI info, dim_t n0, dim_t n1, int order, double l0, double l1, bool periodic0, bool periodic1, int integrationOrder, int reducedIntegrationOrder, bool useElementsOnFace, bool useFullElementOrder, bool optimize)
Creates a 2-dimensional rectangular mesh with n0 x n1 x 2 Tri3 elements over the rectangle [0,...
Definition: dudley/src/DomainFactory.cpp:737
finley::NodeFile::globalDegreesOfFreedom
index_t * globalDegreesOfFreedom
Definition: finley/src/NodeFile.h:173
finley::FinleyDomain::glueFaces
void glueFaces(double safetyFactor, double tolerance, bool optimize)
Definition: Mesh_glueFaces.cpp:53
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
finley::NodeFile::Tag
int * Tag
Tag[i] is the tag of node i.
Definition: finley/src/NodeFile.h:166
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::DudleyDomain::setElements
void setElements(ElementFile *elements)
replaces the element file by elements
Definition: DudleyDomain.cpp:107
finley::FinleyException
Definition: FinleyException.h:40
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
finley::NodeFile::globalReducedDOFIndex
index_t * globalReducedDOFIndex
Definition: finley/src/NodeFile.h:178
dudley::readGmsh
Domain_ptr readGmsh(const string &fileName, int numDim, int, int, bool optimize)
reads a gmsh mesh file
Definition: dudley/src/DomainFactory.cpp:681
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
dudley::DudleyDomain::createMappings
void createMappings(const std::vector< index_t > &dofDistribution, const std::vector< index_t > &nodeDistribution)
Definition: DudleyDomain.cpp:125
dudley::NodeFile::updateTagList
void updateTagList()
Definition: dudley/src/NodeFile.h:239
finley::ElementFile::Nodes
index_t * Nodes
Definition: finley/src/ElementFile.h:158
escript::makeInfo
JMPI makeInfo(MPI_Comm comm, bool owncom)
Definition: EsysMPI.cpp:43
finley::ElementFile::maxColor
index_t maxColor
maximum color value
Definition: finley/src/ElementFile.h:170
dudley::ElementFile::maxColor
index_t maxColor
maximum color value
Definition: dudley/src/ElementFile.h:158
dudley::rectangle_driver
Domain_ptr rectangle_driver(const bp::list &args)
Definition: dudley/src/DomainFactory.cpp:754
finley::NodeFile::Coordinates
double * Coordinates
Coordinates[INDEX2(k,i,numDim)] is the k-th coordinate of node i.
Definition: finley/src/NodeFile.h:175
dudley::ElementFile::minColor
index_t minColor
minimum color value
Definition: dudley/src/ElementFile.h:155
finley::rectangle
Domain_ptr rectangle(JMPI info, dim_t n0, dim_t n1, int order, double l0, double l1, bool periodic0, bool periodic1, int integrationOrder, int reducedIntegrationOrder, bool useElementsOnFace, bool useFullElementOrder, bool optimize, const vector< double > &points, const vector< int > &tags, const std::map< std::string, int > &tagNamesToNums)
Creates a 2-dimensional rectangular mesh with n0 x n1 elements over the rectangle [0,...
Definition: finley/src/DomainFactory.cpp:1170
dudley
A suite of factory methods for creating 2D and 3D dudley domains.
Definition: dudley/src/Assemble.h:32
MPI_COMM_WORLD
#define MPI_COMM_WORLD
Definition: EsysMPI.h:48
finley::ElementFile::Owner
int * Owner
Owner[i] contains the rank that owns element i.
Definition: finley/src/ElementFile.h:146
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
escript::DataTypes::dim_t
index_t dim_t
Definition: DataTypes.h:93
escript::JMPI
boost::shared_ptr< JMPI_ > JMPI
Definition: EsysMPI.h:72
dudley::ElementFile
Definition: dudley/src/ElementFile.h:66
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::ElementFile::Color
index_t * Color
Definition: finley/src/ElementFile.h:164
finley::FinleyDomain::getNodes
NodeFile * getNodes() const
returns a pointer to this domain's node file
Definition: finley/src/FinleyDomain.h:334
finley::readGmsh_driver
Domain_ptr readGmsh_driver(const bp::list &args)
Definition: finley/src/DomainFactory.cpp:985
finley::NodeFile::Id
index_t * Id
Id[i] is the unique ID number of FEM node i.
Definition: finley/src/NodeFile.h:164
finley::ElementFile::Id
index_t * Id
Definition: finley/src/ElementFile.h:140
dudley::DudleyDomain::getNodes
NodeFile * getNodes() const
returns a pointer to this domain's node file
Definition: DudleyDomain.h:216
finley::joinFaces
Domain_ptr joinFaces(const bp::list &meshList, double safetyFactor, double tolerance, bool optimize)
Definition: finley/src/DomainFactory.cpp:1300
dudley::ElementFile::updateTagList
void updateTagList()
Definition: dudley/src/ElementFile.h:189
finley::FinleyDomain::getTagMap
const TagMap & getTagMap() const
returns a reference to the tag name->value map
Definition: finley/src/FinleyDomain.h:865
dudley::brick_driver
Domain_ptr brick_driver(const bp::list &args)
Definition: dudley/src/DomainFactory.cpp:712
finley::cleanupAndThrow
void cleanupAndThrow(FinleyDomain *dom, string msg)
Definition: finley/src/DomainFactory.cpp:91
finley::brick
Domain_ptr brick(JMPI info, dim_t n0, dim_t n1, dim_t n2, int order, double l0, double l1, double l2, bool periodic0, bool periodic1, bool periodic2, int integrationOrder, int reducedIntegrationOrder, bool useElementsOnFace, bool useFullElementOrder, bool optimize, const std::vector< double > &points, const std::vector< int > &tags, const std::map< std::string, int > &tagNamesToNums)
Creates a rectangular mesh with n0 x n1 x n2 elements over the brick [0,l0] x [0,l1] x [0,...
Definition: finley/src/DomainFactory.cpp:1066
escript::load
Data load(const std::string fileName, const AbstractDomain &domain)
reads Data on domain from file in netCDF format
Definition: DataFactory.cpp:722
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::ElementTypeId
ElementTypeId
Definition: ReferenceElements.h:39
escript::DataTypes::index_t
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:88
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
escript
Definition: AbstractContinuousDomain.cpp:23
finley::FinleyDomain::getPoints
ElementFile * getPoints() const
returns a pointer to this domain's point (nodal) element file
Definition: finley/src/FinleyDomain.h:382
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
dudley::readMesh
Domain_ptr readMesh(const string &fileName, int, int, bool optimize)
reads a mesh from a fly file. For MPI parallel runs fans out the mesh to multiple processes.
Definition: dudley/src/DomainFactory.cpp:674
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
dudley::DudleyDomain::setPoints
void setPoints(ElementFile *elements)
replaces the point element file by elements
Definition: DudleyDomain.cpp:119
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
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
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
finley::FinleyDomain::createMappings
void createMappings(const IndexVector &dofDistribution, const IndexVector &nodeDistribution)
Definition: finley/src/FinleyDomain.cpp:185
dudley::ElementFile::Color
index_t * Color
Definition: dudley/src/ElementFile.h:152
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::TagMap
std::map< std::string, int > TagMap
Definition: finley/src/FinleyDomain.h:129
finley::ReferenceElementSet
Definition: ReferenceElementSets.h:41
finley::FinleyDomain::setFaceElements
void setFaceElements(ElementFile *elements)
replaces the face element file by elements
Definition: finley/src/FinleyDomain.cpp:128
finley::rectangle_driver
Domain_ptr rectangle_driver(const bp::list &args)
Definition: finley/src/DomainFactory.cpp:1207
finley::ElementFile::updateTagList
void updateTagList()
Definition: finley/src/ElementFile.h:193
finley
A suite of factory methods for creating various finley domains.
Definition: finley/src/Assemble.h:32
dudley::cleanupAndThrow
void cleanupAndThrow(DudleyDomain *dom, string msg)
Definition: dudley/src/DomainFactory.cpp:86
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
escript::AbstractContinuousDomain
AbstractContinuousDomain, base class for continuous domains.
Definition: AbstractContinuousDomain.h:60
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::readMesh_driver
Domain_ptr readMesh_driver(const bp::list &args)
Definition: finley/src/DomainFactory.cpp:904
finley::meshMerge
Domain_ptr meshMerge(const bp::list &meshList)
Definition: finley/src/DomainFactory.cpp:1272
dudley::brick
Domain_ptr brick(JMPI info, dim_t n0, dim_t n1, dim_t n2, int order, double l0, double l1, double l2, bool periodic0, bool periodic1, bool periodic2, int integrationOrder, int reducedIntegrationOrder, bool useElementsOnFace, bool useFullElementOrder, bool optimize)
Creates a rectangular mesh with n0 x n1 x n2 elements over the brick [0,l0] x [0,l1] x [0,...
Definition: dudley/src/DomainFactory.cpp:689
escript::DataTypes::IndexVector
std::vector< index_t > IndexVector
Definition: DataTypes.h:91