/[escript]/trunk/dudley/src/CPPAdapter/MeshAdapterFactory.h
ViewVC logotype

Contents of /trunk/dudley/src/CPPAdapter/MeshAdapterFactory.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3114 - (show annotations)
Fri Aug 27 05:26:25 2010 UTC (8 years, 7 months ago) by jfenwick
Original Path: branches/domexper/dudley/src/CPPAdapter/MeshAdapterFactory.h
File MIME type: text/plain
File size: 7245 byte(s)
It doesn't pass all tests but this is major progress

1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2010 by University of Queensland
5 * Earth Systems Science Computational Center (ESSCC)
6 * http://www.uq.edu.au/esscc
7 *
8 * Primary Business: Queensland, Australia
9 * Licensed under the Open Software License version 3.0
10 * http://www.opensource.org/licenses/osl-3.0.php
11 *
12 *******************************************************/
13
14
15 #if !defined dudley_MeshAdapterFactory_20040526_H
16 #define dudley_MeshAdapterFactory_20040526_H
17 #include "system_dep.h"
18
19 #include "MeshAdapter.h"
20
21 #include "escript/AbstractContinuousDomain.h"
22
23 #include <boost/python/list.hpp>
24
25 #include <sstream>
26
27 namespace dudley {
28 /**
29 \brief
30 A suite of factory methods for creating various MeshAdapters.
31
32 Description:
33 A suite of factory methods for creating various MeshAdapters.
34 */
35
36 /**
37 \brief
38 recovers mesg from a dump file
39 \param fileName Input - The name of the file.
40 */
41 DUDLEY_DLL_API
42 /* escript::AbstractContinuousDomain* loadMesh(const std::string& fileName);*/
43 escript::Domain_ptr loadMesh(const std::string& fileName);
44 /**
45 \brief
46 Read a mesh from a file. For MPI parallel runs fan out the mesh to multiple processes.
47 \param fileName Input - The name of the file.
48 \param integrationOrder Input - order of the quadrature scheme.
49 If integrationOrder<0 the integration order is selected independently.
50 \param reducedIntegrationOrder Input - order of the reduced quadrature scheme.
51 If reducedIntegrationOrder<0 the integration order is selected independently.
52 \param optimize Input - switches on the optimization of node labels
53 */
54 DUDLEY_DLL_API
55 // escript::AbstractContinuousDomain* readMesh(const std::string& fileName,
56 escript::Domain_ptr readMesh(const std::string& fileName,
57 int integrationOrder=-1,
58 int reducedIntegrationOrder=-1,
59 int optimize=0);
60 /**
61 \brief
62 Read a gmsh mesh file
63 \param fileName Input - The name of the file.
64 \param numDim Input - spatial dimension
65 \param integrationOrder Input - order of the quadrature scheme.
66 If integrationOrder<0 the integration order is selected independently.
67 \param reducedIntegrationOrder Input - order of the reduced quadrature scheme.
68 If reducedIntegrationOrder<0 the integration order is selected independently.
69 \param optimize Input - switches on the optimization of node labels
70 */
71 DUDLEY_DLL_API
72 // escript::AbstractContinuousDomain* readGmsh(const std::string& fileName,
73 escript::Domain_ptr readGmsh(const std::string& fileName,
74 int numDim,
75 int integrationOrder=-1,
76 int reducedIntegrationOrder=-1,
77 int optimize=0,
78 int useMacroElements=0);
79 /**
80 \brief
81 Creates a rectangular mesh with n0 x n1 x n2 elements over the brick
82 [0,l0] x [0,l1] x [0,l2].
83
84 \param n0,n1,n2 Input - number of elements in each dimension
85 \param order Input - =1, =-1 or =2 gives the order of shape function (-1= macro elements of order 1)
86 \param l0,l1,l2 Input - length of each side of brick
87 \param integrationOrder Input - order of the quadrature scheme.
88 If integrationOrder<0 the integration order is selected independently.
89 \param reducedIntegrationOrder Input - order of the reduced quadrature scheme.
90 If reducedIntegrationOrder<0 the integration order is selected independently.
91 \param useElementsOnFace Input - whether or not to use elements on face
92 \param periodic0, periodic1, periodic2 Input - whether or not boundary
93 conditions of the dimension are periodic
94 \param useFullElementOrder
95 \param useMacroElements
96 \param optimize
97 */
98 DUDLEY_DLL_API
99 escript::Domain_ptr brick(int n0=1,int n1=1,int n2=1,int order=1,
100 double l0=1.0,double l1=1.0,double l2=1.0,
101 int periodic0=0,int periodic1=0,
102 int periodic2=0,
103 int integrationOrder=-1,
104 int reducedIntegrationOrder=-1,
105 int useElementsOnFace=0,
106 int useFullElementOrder=0,
107 int optimize=0);
108
109 /**
110 \brief
111 Creates a rectangular mesh with n0 x n1 elements over the brick
112 [0,l0] x [0,l1].
113
114 \param n0,n1 Input - number of elements in each dimension
115 \param order Input - =1, =-1 or =2 gives the order of shape function (-1= macro elements of order 1)
116 \param l0,l1 Input - length of each side of brick
117 \param integrationOrder Input - order of the quadrature scheme.
118 If integrationOrder<0 the integration order is selected
119 independently.
120 \param reducedIntegrationOrder Input - order of the reduced quadrature scheme.
121 If reducedIntegrationOrder<0 the integration order is selected independently.
122 \param periodic0, periodic1 Input - whether or not the boundary
123 conditions of the dimension are periodic
124 \param useElementsOnFace Input - whether or not to use elements on face
125 \param useFullElementOrder
126 \param optimize
127 */
128 DUDLEY_DLL_API
129 escript::Domain_ptr rectangle(int n0=1,int n1=1,int order=1,
130 double l0=1.0, double l1=1.0,
131 int periodic0=false,int periodic1=false,
132 int integrationOrder=-1,
133 int reducedIntegrationOrder=-1,
134 int useElementsOnFace=0,
135 int useFullElementOrder=0,
136 int optimize=0);
137
138 /**
139 \brief
140 Merges a list of meshes into one list.
141 \param meshList Input - The list of meshes.
142 */
143 DUDLEY_DLL_API
144 // escript::AbstractContinuousDomain* meshMerge(const boost::python::list& meshList);
145 escript::Domain_ptr meshMerge(const boost::python::list& meshList);
146 /**
147 \brief
148 Detects matching faces in the mesh, removes them from the mesh
149 and joins the elements touched by the face elements.
150 \param meshList Input - The list of meshes.
151 \param safetyFactor Input - ??
152 \param tolerance Input - ??
153 \param optimize Input - switches on the optimization of node labels
154 */
155 DUDLEY_DLL_API
156 // escript::AbstractContinuousDomain* glueFaces(const boost::python::list& meshList,
157 escript::Domain_ptr glueFaces(const boost::python::list& meshList,
158 double safetyFactor=0.2,
159 double tolerance=1.e-8,
160 int optimize=0);
161 /**
162 \brief
163 Detects matching faces in the mesh and replaces them by joint elements.
164 \param meshList Input - The list of meshes.
165 \param safetyFactor Input - ??
166 \param tolerance Input - ??
167 \param optimize Input - switches on the optimization of node labels
168 */
169 DUDLEY_DLL_API
170 // escript::AbstractContinuousDomain* joinFaces(const boost::python::list& meshList,
171 escript::Domain_ptr joinFaces(const boost::python::list& meshList,
172 double safetyFactor=0.2,
173 double tolerance=1.e-8,
174 int optimize=0);
175
176 } // end of namespace
177 #endif

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26