escript  Revision_Unversioneddirectory
finley/src/CPPAdapter/MeshAdapterFactory.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2016 by The University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Apache License, version 2.0
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development 2012-2013 by School of Earth Sciences
13 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16 
17 
18 #ifndef __FINLEY_MESHADAPTERFACTORY_H__
19 #define __FINLEY_MESHADAPTERFACTORY_H__
20 
21 #include "system_dep.h"
22 
23 #include <finley/Finley.h>
24 #include <finley/Mesh.h>
25 #include <finley/RectangularMesh.h>
26 
27 #include "MeshAdapter.h"
28 
29 #include <escript/AbstractContinuousDomain.h>
30 #include <escript/SubWorld.h>
31 
32 #include <boost/python/list.hpp>
33 
34 #include <sstream>
35 
36 namespace finley {
37 
52 escript::Domain_ptr loadMesh(const std::string& fileName);
53 
67 escript::Domain_ptr readMesh(const std::string& fileName,
68  int integrationOrder=-1,
69  int reducedIntegrationOrder=-1,
70  bool optimize=false,
71  const std::vector<double>& points=std::vector<double>(),
72  const std::vector<int>& tags=std::vector<int>());
73 
79 escript::Domain_ptr readMesh_driver(const boost::python::list& args);
80 
94 escript::Domain_ptr readGmsh(const std::string& fileName, int numDim,
95  int integrationOrder=-1,
96  int reducedIntegrationOrder=-1,
97  bool optimize=false, bool useMacroElements=false,
98  const std::vector<double>& points=std::vector<double>(),
99  const std::vector<int>& tags=std::vector<int>());
100 
106 escript::Domain_ptr readGmsh_driver(const boost::python::list& args);
107 
132  dim_t n0=1, dim_t n1=1, dim_t n2=1, int order=1,
133  double l0=1., double l1=1., double l2=1.,
134  bool periodic0=false, bool periodic1=false,
135  bool periodic2=false, int integrationOrder=-1,
136  int reducedIntegrationOrder=-1,
137  bool useElementsOnFace=false,
138  bool useFullElementOrder=false, bool optimize=false,
139  const std::vector<double>& points=std::vector<double>(),
140  const std::vector<int>& tags=std::vector<int>(),
141  const std::map<std::string, int>& tagNamesToNums=std::map<std::string, int>());
142 
148  escript::Domain_ptr brick_driver(const boost::python::list& args);
149 
155  escript::Domain_ptr rectangle_driver(const boost::python::list& args);
156 
157 
184  dim_t n0=1, dim_t n1=1, dim_t order=1,
185  double l0=1.0, double l1=1.0,
186  bool periodic0=false, bool periodic1=false,
187  int integrationOrder=-1,
188  int reducedIntegrationOrder=-1,
189  bool useElementsOnFace=false,
190  bool useFullElementOrder=false,
191  bool optimize=false,
192  const std::vector<double>& points=std::vector<double>(),
193  const std::vector<int>& tags=std::vector<int>(),
194  const std::map<std::string, int>& tagNamesToNums=std::map<std::string, int>());
195 
202 escript::Domain_ptr meshMerge(const boost::python::list& meshList);
213 escript::Domain_ptr glueFaces(const boost::python::list& meshList,
214  double safetyFactor=0.2, double tolerance=1.e-8,
215  bool optimize=false);
216 
226 escript::Domain_ptr joinFaces(const boost::python::list& meshList,
227  double safetyFactor=0.2, double tolerance=1.e-8,
228  bool optimize=false);
229 
230 } // end of namespace
231 
232 #endif // __FINLEY_MESHADAPTERFACTORY_H__
233 
boost::shared_ptr< AbstractDomain > Domain_ptr
Definition: AbstractDomain.h:36
Domain_ptr glueFaces(const boost::python::list &meshList, double safety_factor, double tolerance, bool optimize)
Detects matching faces in the mesh, removes them from the mesh and joins the elements touched by the ...
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:953
Domain_ptr brick_driver(const boost::python::list &args)
Python driver for brick()
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:755
Domain_ptr readMesh_driver(const boost::python::list &args)
Python driver for readMesh()
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:531
Domain_ptr joinFaces(const boost::python::list &meshList, double safety_factor, double tolerance, bool optimize)
Detects matching faces in the mesh and replaces them by joint elements.
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:969
Domain_ptr rectangle_driver(const boost::python::list &args)
Python driver for rectangle()
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:886
Definition: finley/src/Assemble.h:32
Domain_ptr readGmsh(esysUtils::JMPI &info, const std::string &fileName, int numDim, int integrationOrder, int reducedIntegrationOrder, bool optimize, bool useMacroElements, const std::vector< double > &points, const std::vector< int > &tags)
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:611
Domain_ptr readGmsh_driver(const boost::python::list &args)
Python driver for readGMesh()
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:629
double l2(dim_t n, const double *x, const esysUtils::JMPI &mpiinfo)
returns the global L2 norm of x
Definition: PasoUtil.cpp:484
escript::Domain_ptr rectangle(esysUtils::JMPI &p, 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 std::vector< double > &points, const std::vector< int > &tags, const std::map< std::string, int > &tagNamesToNums)
Creates a rectangular mesh with n0 x n1 elements over the brick [0,l0] x [0,l1].
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:823
Domain_ptr meshMerge(const boost::python::list &meshList)
Merges a list of meshes into one list.
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:867
#define FINLEY_DLL_API
Definition: finley/src/CPPAdapter/system_dep.h:31
index_t dim_t
Definition: types.h:27
escript::Domain_ptr brick(esysUtils::JMPI &p, 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/CPPAdapter/MeshAdapterFactory.cpp:710
Domain_ptr loadMesh(const std::string &fileName)
A suite of factory methods for creating various MeshAdapters.
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:63
boost::shared_ptr< JMPI_ > JMPI
Definition: Esys_MPI.h:79
Domain_ptr readMesh(esysUtils::JMPI &info, const std::string &fileName, int integrationOrder, int reducedIntegrationOrder, bool optimize, const std::vector< double > &points, const std::vector< int > &tags)
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:513