escript  Revision_4925
finley/src/CPPAdapter/MeshAdapterFactory.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2014 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
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 #if !defined finley_MeshAdapterFactory_20040526_H
19 #define finley_MeshAdapterFactory_20040526_H
20 #include "system_dep.h"
21 
22 #include "finley/Finley.h"
23 #include "finley/Mesh.h"
24 #include "finley/RectangularMesh.h"
25 
26 #include "MeshAdapter.h"
27 
28 #include "escript/AbstractContinuousDomain.h"
29 
30 #include <boost/python/list.hpp>
31 
32 #include <sstream>
33 
34 namespace finley {
49 /* escript::AbstractContinuousDomain* loadMesh(const std::string& fileName);*/
50  escript::Domain_ptr loadMesh(const std::string& fileName);
62 // escript::AbstractContinuousDomain* readMesh(const std::string& fileName,
63  escript::Domain_ptr readMesh(const std::string& fileName,
64  int integrationOrder=-1,
65  int reducedIntegrationOrder=-1,
66  bool optimize=false);
80 // escript::AbstractContinuousDomain* readGmsh(const std::string& fileName,
81  escript::Domain_ptr readGmsh(const std::string& fileName,
82  int numDim,
83  int integrationOrder=-1,
84  int reducedIntegrationOrder=-1,
85  bool optimize=false,
86  bool useMacroElements=false);
87 
111 escript::Domain_ptr brick(int n0=1, int n1=1, int n2=1, int order=1,
112  double l0=1.0, double l1=1.0, double l2=1.0,
113  bool periodic0=false, bool periodic1=false,
114  bool periodic2=false,
115  int integrationOrder=-1,
116  int reducedIntegrationOrder=-1,
117  bool useElementsOnFace=false,
118  bool useFullElementOrder=false,
119  bool optimize=false,
120  const std::vector<double>& points=std::vector<double>(),
121  const std::vector<int>& tags=std::vector<int>(),
122  const std::map<std::string, int>& tagnamestonums=std::map<std::string, int>()
123  );
124 
130  escript::Domain_ptr brick_driver(const boost::python::list& args);
131 
137  escript::Domain_ptr rectangle_driver(const boost::python::list& args);
138 
139 
165  escript::Domain_ptr rectangle(int n0=1, int n1=1, int order=1,
166  double l0=1.0, double l1=1.0,
167  bool periodic0=false, bool periodic1=false,
168  int integrationOrder=-1,
169  int reducedIntegrationOrder=-1,
170  bool useElementsOnFace=false,
171  bool useFullElementOrder=false,
172  bool optimize=false,
173  const std::vector<double>& points=std::vector<double>(),
174  const std::vector<int>& tags=std::vector<int>(),
175  const std::map<std::string, int>& tagnamestonums=std::map<std::string, int>()
176  );
183 // escript::AbstractContinuousDomain* meshMerge(const boost::python::list& meshList);
184  escript::Domain_ptr meshMerge(const boost::python::list& meshList);
195 // escript::AbstractContinuousDomain* glueFaces(const boost::python::list& meshList,
196  escript::Domain_ptr glueFaces(const boost::python::list& meshList,
197  double safetyFactor=0.2,
198  double tolerance=1.e-8,
199  bool optimize=false);
209 // escript::AbstractContinuousDomain* joinFaces(const boost::python::list& meshList,
210  escript::Domain_ptr joinFaces(const boost::python::list& meshList,
211  double safetyFactor=0.2,
212  double tolerance=1.e-8,
213  bool optimize=false);
214 
215 } // end of namespace
216 #endif
double l2(dim_t n, const double *x, Esys_MPIInfo *mpiinfo)
returns the global L2 norm of x
Definition: PasoUtil.cpp:484
Domain_ptr readGmsh(const std::string &fileName, int numDim, int integrationOrder, int reducedIntegrationOrder, bool optimize, bool useMacroElements)
Read a gmsh mesh file.
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:505
boost::shared_ptr< AbstractDomain > Domain_ptr
Definition: AbstractDomain.h:57
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:762
Domain_ptr brick_driver(const boost::python::list &args)
Python driver for brick()
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:568
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:784
Domain_ptr rectangle_driver(const boost::python::list &args)
Python driver for rectangle()
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:693
escript::Domain_ptr rectangle(int n0, int 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:626
Domain_ptr readMesh(const std::string &fileName, int integrationOrder, int reducedIntegrationOrder, bool optimize)
Read a mesh from a file. For MPI parallel runs fan out the mesh to multiple processes.
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:490
escript::Domain_ptr brick(int n0, int n1, int 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:523
Domain_ptr meshMerge(const boost::python::list &meshList)
Merges a list of meshes into one list.
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:674
#define FINLEY_DLL_API
Definition: finley/src/CPPAdapter/system_dep.h:44
Domain_ptr loadMesh(const std::string &fileName)
A suite of factory methods for creating various MeshAdapters.
Definition: finley/src/CPPAdapter/MeshAdapterFactory.cpp:61