/[escript]/trunk/finley/src/DomainFactory.h
ViewVC logotype

Contents of /trunk/finley/src/DomainFactory.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6939 - (show annotations)
Mon Jan 20 03:37:18 2020 UTC (4 months, 1 week ago) by uqaeller
File MIME type: text/plain
File size: 6491 byte(s)
Updated the copyright header.


1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2020 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-2017 by Centre for Geoscience Computing (GeoComp)
14 * Development from 2019 by School of Earth and Environmental Sciences
15 **
16 *****************************************************************************/
17
18 #ifndef __FINLEY_DOMAINFACTORY_H__
19 #define __FINLEY_DOMAINFACTORY_H__
20
21 #include <finley/FinleyDomain.h>
22
23 #include <boost/python/list.hpp>
24
25 #include <sstream>
26
27 /**
28 \brief
29 A suite of factory methods for creating various finley domains.
30 */
31
32 namespace finley {
33
34 /**
35 \brief Python driver for readMesh()
36 \param args see readMesh() definition for order of parameters
37 */
38 escript::Domain_ptr readMesh_driver(const boost::python::list& args);
39
40 /**
41 \brief Python driver for readGMesh()
42 \param args see readGMesh() definition for order of parameters
43 */
44 escript::Domain_ptr readGmsh_driver(const boost::python::list& args);
45
46 /**
47 \brief
48 Creates a rectangular mesh with n0 x n1 x n2 elements over the brick
49 [0,l0] x [0,l1] x [0,l2].
50
51 \param jmpi pointer to MPI world information structure
52 \param n0,n1,n2 number of elements in each dimension
53 \param order order of shape functions (1, 2, or -1 for macro
54 elements of order 1)
55 \param l0,l1,l2 length of each side of brick
56 \param periodic0,periodic1,periodic2 whether or not boundary
57 conditions of the dimension are periodic
58 \param integrationOrder order of the quadrature scheme.
59 If <0 the order is selected automatically.
60 \param reducedIntegrationOrder order of the reduced quadrature scheme.
61 If <0 the order is selected automatically.
62 \param useElementsOnFace whether or not to use elements on face
63 \param useFullElementOrder whether to use second order elements
64 \param optimize whether to apply optimization of node labels
65 \param points dirac points to add
66 \param tags
67 \param tagNamesToNums
68 */
69 escript::Domain_ptr brick(escript::JMPI jmpi,
70 dim_t n0=1, dim_t n1=1, dim_t n2=1, int order=1,
71 double l0=1.0, double l1=1.0, double l2=1.0,
72 bool periodic0=false, bool periodic1=false, bool periodic2=false,
73 int integrationOrder=-1, int reducedIntegrationOrder=-1,
74 bool useElementsOnFace=false,
75 bool useFullElementOrder=false, bool optimize=false,
76 const std::vector<double>& points=std::vector<double>(),
77 const std::vector<int>& tags=std::vector<int>(),
78 const std::map<std::string, int>& tagNamesToNums=std::map<std::string, int>());
79
80 /**
81 \brief Python driver for brick()
82 \param args see brick() definition for order of params
83 */
84 escript::Domain_ptr brick_driver(const boost::python::list& args);
85
86 /**
87 \brief
88 Creates a 2-dimensional rectangular mesh with n0 x n1 elements over the
89 rectangle [0,l0] x [0,l1].
90
91 \param jmpi pointer to MPI world information structure
92 \param n0,n1 number of elements in each dimension
93 \param order order of shape functions (1, 2, or -1 for macro
94 elements of order 1)
95 \param l0,l1 length of each side of rectangle
96 \param periodic0,periodic1 whether or not the boundary conditions of the
97 dimension are periodic
98 \param integrationOrder order of the quadrature scheme.
99 If <0 the order is selected automatically.
100 \param reducedIntegrationOrder order of the reduced quadrature scheme.
101 If <0 the order is selected automatically.
102 \param useElementsOnFace whether or not to use elements on face
103 \param useFullElementOrder
104 \param optimize whether to optimize labelling
105 \param points
106 \param tags
107 \param tagNamesToNums
108 */
109 escript::Domain_ptr rectangle(escript::JMPI jmpi,
110 dim_t n0 = 1, dim_t n1 = 1, int order = 1,
111 double l0 = 1.0, double l1 = 1.0,
112 bool periodic0 = false, bool periodic1 = false,
113 int integrationOrder = -1,
114 int reducedIntegrationOrder = -1,
115 bool useElementsOnFace = false,
116 bool useFullElementOrder = false,
117 bool optimize = false,
118 const std::vector<double>& points = std::vector<double>(),
119 const std::vector<int>& tags = std::vector<int>(),
120 const std::map<std::string, int>& tagNamesToNums = std::map<std::string, int>());
121
122 /**
123 \brief Python driver for rectangle()
124 \param args see rectangle() definition for order of params
125 */
126 escript::Domain_ptr rectangle_driver(const boost::python::list& args);
127
128 /**
129 \brief
130 Merges a list of meshes into one list.
131 \param meshList Input - The list of meshes.
132 */
133 escript::Domain_ptr meshMerge(const boost::python::list& meshList);
134
135 /**
136 \brief
137 Detects matching faces in the mesh, removes them from the mesh
138 and joins the elements touched by the face elements.
139 \param meshList The list of meshes.
140 \param safetyFactor
141 \param tolerance
142 \param optimize switches on the optimization of node labels
143 */
144 escript::Domain_ptr glueFaces(const boost::python::list& meshList,
145 double safetyFactor = 0.2, double tolerance = 1.e-8,
146 bool optimize = false);
147
148 /**
149 \brief
150 Detects matching faces in the mesh and replaces them by joint elements.
151 \param meshList The list of meshes
152 \param safetyFactor
153 \param tolerance
154 \param optimize switches on the optimization of node labels
155 */
156 escript::Domain_ptr joinFaces(const boost::python::list& meshList,
157 double safetyFactor = 0.2, double tolerance = 1.e-8,
158 bool optimize = false);
159
160 } // end of namespace
161
162 #endif // __FINLEY_DOMAINFACTORY_H__
163

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26