/[escript]/branches/trilinos_from_5897/dudley/test/python/run_pasoSolversOnDudley.py
ViewVC logotype

Contents of /branches/trilinos_from_5897/dudley/test/python/run_pasoSolversOnDudley.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6079 - (show annotations)
Mon Mar 21 12:22:38 2016 UTC (2 years, 11 months ago) by caltinay
File MIME type: text/x-python
File size: 9904 byte(s)
Big commit - making dudley much more like finley to make it more
managable. Fixed quite a few issues that had been fixed in finley.
Disposed of all ReducedNode/ReducedDOF entities that dudley never supported.
Compiles and passes tests.

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 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 from __future__ import print_function, division
18
19 __copyright__="""Copyright (c) 2003-2016 by The University of Queensland
20 http://www.uq.edu.au
21 Primary Business: Queensland, Australia"""
22 __license__="""Licensed under the Open Software License version 3.0
23 http://www.opensource.org/licenses/osl-3.0.php"""
24 __url__="https://launchpad.net/escript-finley"
25
26 """
27 Test suite for PDE solvers on dudley
28 """
29
30 from test_simplesolve import SimpleSolveTestCase
31 import esys.escriptcore.utestselect as unittest
32 from esys.escriptcore.testing import *
33
34 from esys.dudley import Rectangle, Brick
35 from esys.escript.linearPDEs import SolverOptions
36
37 # number of elements in the spatial directions
38 NE0=12
39 NE1=13
40 NE2=8
41 OPTIMIZE=True
42
43 ### BiCGStab + Jacobi
44
45 class Test_SimpleSolveDudleyRect_Paso_BICGSTAB_Jacobi(SimpleSolveTestCase):
46 def setUp(self):
47 self.domain = Rectangle(NE0, NE1, optimize=OPTIMIZE)
48 self.package = SolverOptions.PASO
49 self.method = SolverOptions.BICGSTAB
50 self.preconditioner = SolverOptions.JACOBI
51
52 def tearDown(self):
53 del self.domain
54
55 class Test_SimpleSolveDudleyBrick_Paso_BICGSTAB_Jacobi(SimpleSolveTestCase):
56 def setUp(self):
57 self.domain = Brick(NE0, NE1, NE2, optimize=OPTIMIZE)
58 self.package = SolverOptions.PASO
59 self.method = SolverOptions.BICGSTAB
60 self.preconditioner = SolverOptions.JACOBI
61
62 def tearDown(self):
63 del self.domain
64
65 ### PCG + Jacobi
66
67 class Test_SimpleSolveDudleyRect_Paso_PCG_Jacobi(SimpleSolveTestCase):
68 def setUp(self):
69 self.domain = Rectangle(NE0, NE1, optimize=OPTIMIZE)
70 self.package = SolverOptions.PASO
71 self.method = SolverOptions.PCG
72 self.preconditioner = SolverOptions.JACOBI
73
74 def tearDown(self):
75 del self.domain
76
77 class Test_SimpleSolveDudleyBrick_Paso_PCG_Jacobi(SimpleSolveTestCase):
78 def setUp(self):
79 self.domain = Brick(NE0, NE1, NE2, optimize=OPTIMIZE)
80 self.package = SolverOptions.PASO
81 self.method = SolverOptions.PCG
82 self.preconditioner = SolverOptions.JACOBI
83
84 def tearDown(self):
85 del self.domain
86
87 ### TFQMR + Jacobi
88
89 class Test_SimpleSolveDudleyRect_Paso_TFQMR_Jacobi(SimpleSolveTestCase):
90 def setUp(self):
91 self.domain = Rectangle(NE0, NE1, optimize=OPTIMIZE)
92 self.package = SolverOptions.PASO
93 self.method = SolverOptions.TFQMR
94 self.preconditioner = SolverOptions.JACOBI
95
96 def tearDown(self):
97 del self.domain
98
99 class Test_SimpleSolveDudleyBrick_Paso_TFQMR_Jacobi(SimpleSolveTestCase):
100 def setUp(self):
101 self.domain = Brick(NE0, NE1, NE2, optimize=OPTIMIZE)
102 self.package = SolverOptions.PASO
103 self.method = SolverOptions.TFQMR
104 self.preconditioner = SolverOptions.JACOBI
105
106 def tearDown(self):
107 del self.domain
108
109 ### MINRES + Jacobi
110
111 class Test_SimpleSolveDudleyRect_Paso_MINRES_Jacobi(SimpleSolveTestCase):
112 def setUp(self):
113 self.domain = Rectangle(NE0, NE1, optimize=OPTIMIZE)
114 self.package = SolverOptions.PASO
115 self.method = SolverOptions.MINRES
116 self.preconditioner = SolverOptions.JACOBI
117
118 def tearDown(self):
119 del self.domain
120
121 class Test_SimpleSolveDudleyBrick_Paso_MINRES_Jacobi(SimpleSolveTestCase):
122 def setUp(self):
123 self.domain = Brick(NE0, NE1, NE2, optimize=OPTIMIZE)
124 self.package = SolverOptions.PASO
125 self.method = SolverOptions.MINRES
126 self.preconditioner = SolverOptions.JACOBI
127
128 def tearDown(self):
129 del self.domain
130
131 ### BiCGStab + Gauss-Seidel
132
133 class Test_SimpleSolveDudleyRect_Paso_BICGSTAB_GaussSeidel(SimpleSolveTestCase):
134 def setUp(self):
135 self.domain = Rectangle(NE0, NE1, optimize=OPTIMIZE)
136 self.package = SolverOptions.PASO
137 self.method = SolverOptions.BICGSTAB
138 self.preconditioner = SolverOptions.GAUSS_SEIDEL
139
140 def tearDown(self):
141 del self.domain
142
143 class Test_SimpleSolveDudleyBrick_Paso_BICGSTAB_GaussSeidel(SimpleSolveTestCase):
144 def setUp(self):
145 self.domain = Brick(NE0, NE1, NE2, optimize=OPTIMIZE)
146 self.package = SolverOptions.PASO
147 self.method = SolverOptions.BICGSTAB
148 self.preconditioner = SolverOptions.GAUSS_SEIDEL
149
150 def tearDown(self):
151 del self.domain
152
153 ### PCG + Gauss-Seidel
154
155 class Test_SimpleSolveDudleyRect_Paso_PCG_GaussSeidel(SimpleSolveTestCase):
156 def setUp(self):
157 self.domain = Rectangle(NE0, NE1, optimize=OPTIMIZE)
158 self.package = SolverOptions.PASO
159 self.method = SolverOptions.PCG
160 self.preconditioner = SolverOptions.GAUSS_SEIDEL
161
162 def tearDown(self):
163 del self.domain
164
165 class Test_SimpleSolveDudleyBrick_Paso_PCG_GaussSeidel(SimpleSolveTestCase):
166 def setUp(self):
167 self.domain = Brick(NE0, NE1, NE2, optimize=OPTIMIZE)
168 self.package = SolverOptions.PASO
169 self.method = SolverOptions.PCG
170 self.preconditioner = SolverOptions.GAUSS_SEIDEL
171
172 def tearDown(self):
173 del self.domain
174
175 ### TFQMR + Gauss-Seidel
176
177 class Test_SimpleSolveDudleyRect_Paso_TFQMR_GaussSeidel(SimpleSolveTestCase):
178 def setUp(self):
179 self.domain = Rectangle(NE0, NE1, optimize=OPTIMIZE)
180 self.package = SolverOptions.PASO
181 self.method = SolverOptions.TFQMR
182 self.preconditioner = SolverOptions.GAUSS_SEIDEL
183
184 def tearDown(self):
185 del self.domain
186
187 class Test_SimpleSolveDudleyBrick_Paso_TFQMR_GaussSeidel(SimpleSolveTestCase):
188 def setUp(self):
189 self.domain = Brick(NE0, NE1, NE2, optimize=OPTIMIZE)
190 self.package = SolverOptions.PASO
191 self.method = SolverOptions.TFQMR
192 self.preconditioner = SolverOptions.GAUSS_SEIDEL
193
194 def tearDown(self):
195 del self.domain
196
197 ### MINRES + Gauss-Seidel
198
199 class Test_SimpleSolveDudleyRect_Paso_MINRES_GaussSeidel(SimpleSolveTestCase):
200 def setUp(self):
201 self.domain = Rectangle(NE0, NE1, optimize=OPTIMIZE)
202 self.package = SolverOptions.PASO
203 self.method = SolverOptions.MINRES
204 self.preconditioner = SolverOptions.GAUSS_SEIDEL
205
206 def tearDown(self):
207 del self.domain
208
209 class Test_SimpleSolveDudleyBrick_Paso_MINRES_GaussSeidel(SimpleSolveTestCase):
210 def setUp(self):
211 self.domain = Brick(NE0, NE1, NE2, optimize=OPTIMIZE)
212 self.package = SolverOptions.PASO
213 self.method = SolverOptions.MINRES
214 self.preconditioner = SolverOptions.GAUSS_SEIDEL
215
216 def tearDown(self):
217 del self.domain
218
219 ### BiCGStab + RILU
220
221 class Test_SimpleSolveDudleyRect_Paso_BICGSTAB_RILU(SimpleSolveTestCase):
222 def setUp(self):
223 self.domain = Rectangle(NE0, NE1, optimize=OPTIMIZE)
224 self.package = SolverOptions.PASO
225 self.method = SolverOptions.BICGSTAB
226 self.preconditioner = SolverOptions.RILU
227
228 def tearDown(self):
229 del self.domain
230
231 class Test_SimpleSolveDudleyBrick_Paso_BICGSTAB_RILU(SimpleSolveTestCase):
232 def setUp(self):
233 self.domain = Brick(NE0, NE1, NE2, optimize=OPTIMIZE)
234 self.package = SolverOptions.PASO
235 self.method = SolverOptions.BICGSTAB
236 self.preconditioner = SolverOptions.RILU
237
238 def tearDown(self):
239 del self.domain
240
241 ### PCG + RILU
242
243 class Test_SimpleSolveDudleyRect_Paso_PCG_RILU(SimpleSolveTestCase):
244 def setUp(self):
245 self.domain = Rectangle(NE0, NE1, optimize=OPTIMIZE)
246 self.package = SolverOptions.PASO
247 self.method = SolverOptions.PCG
248 self.preconditioner = SolverOptions.RILU
249
250 def tearDown(self):
251 del self.domain
252
253 class Test_SimpleSolveDudleyBrick_Paso_PCG_RILU(SimpleSolveTestCase):
254 def setUp(self):
255 self.domain = Brick(NE0, NE1, NE2, optimize=OPTIMIZE)
256 self.package = SolverOptions.PASO
257 self.method = SolverOptions.PCG
258 self.preconditioner = SolverOptions.RILU
259
260 def tearDown(self):
261 del self.domain
262
263 ### TFQMR + RILU
264
265 class Test_SimpleSolveDudleyRect_Paso_TFQMR_RILU(SimpleSolveTestCase):
266 def setUp(self):
267 self.domain = Rectangle(NE0, NE1, optimize=OPTIMIZE)
268 self.package = SolverOptions.PASO
269 self.method = SolverOptions.TFQMR
270 self.preconditioner = SolverOptions.RILU
271
272 def tearDown(self):
273 del self.domain
274
275 class Test_SimpleSolveDudleyBrick_Paso_TFQMR_RILU(SimpleSolveTestCase):
276 def setUp(self):
277 self.domain = Brick(NE0, NE1, NE2, optimize=OPTIMIZE)
278 self.package = SolverOptions.PASO
279 self.method = SolverOptions.TFQMR
280 self.preconditioner = SolverOptions.RILU
281
282 def tearDown(self):
283 del self.domain
284
285 ### MINRES + RILU
286
287 class Test_SimpleSolveDudleyRect_Paso_MINRES_RILU(SimpleSolveTestCase):
288 def setUp(self):
289 self.domain = Rectangle(NE0, NE1, optimize=OPTIMIZE)
290 self.package = SolverOptions.PASO
291 self.method = SolverOptions.MINRES
292 self.preconditioner = SolverOptions.RILU
293
294 def tearDown(self):
295 del self.domain
296
297 class Test_SimpleSolveDudleyBrick_Paso_MINRES_RILU(SimpleSolveTestCase):
298 def setUp(self):
299 self.domain = Brick(NE0, NE1, NE2, optimize=OPTIMIZE)
300 self.package = SolverOptions.PASO
301 self.method = SolverOptions.MINRES
302 self.preconditioner = SolverOptions.RILU
303
304 def tearDown(self):
305 del self.domain
306
307
308 if __name__ == '__main__':
309 run_tests(__name__, exit_on_failure=True)

  ViewVC Help
Powered by ViewVC 1.1.26