/[escript]/trunk/finley/test/python/run_pasoSolversOnFinley.py
ViewVC logotype

Contents of /trunk/finley/test/python/run_pasoSolversOnFinley.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6651 - (show annotations)
Wed Feb 7 02:12:08 2018 UTC (20 months ago) by jfenwick
File MIME type: text/x-python
File size: 22052 byte(s)
Make everyone sad by touching all the files

Copyright dates update

1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2018 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 from __future__ import print_function, division
18
19 __copyright__="""Copyright (c) 2003-2018 by The University of Queensland
20 http://www.uq.edu.au
21 Primary Business: Queensland, Australia"""
22 __license__="""Licensed under the Apache License, version 2.0
23 http://www.apache.org/licenses/LICENSE-2.0"""
24 __url__="https://launchpad.net/escript-finley"
25
26 """
27 Test suite for PDE solvers on finley
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.escript import Data, Solution, Vector, hasFeature
35 from esys.finley import Rectangle, Brick
36 from esys.escript.linearPDEs import SolverOptions
37
38 HAVE_PASO = hasFeature('paso')
39
40 # number of elements in the spatial directions
41 NE0=12
42 NE1=12
43 NE2=8
44 OPTIMIZE=True
45
46 @unittest.skipIf(not HAVE_PASO, "PASO not available")
47 class SimpleSolveOnPaso(SimpleSolveTestCase):
48 pass
49
50 class SimpleSolveOrder2(SimpleSolveOnPaso):
51 def _getGrad(self, system):
52 """returns exact gradient"""
53 dim = self.domain.getDim()
54 x = Solution(self.domain).getX()
55 if system:
56 g_ex = Data(0., (dim,dim), Solution(self.domain))
57 if dim == 2:
58 g_ex[0,0] = 2.+8.*x[0]+ 5.*x[1]
59 g_ex[0,1] = 3.+5.*x[0]+12.*x[1]
60 g_ex[1,0] = 4.+2.*x[0]+ 6.*x[1]
61 g_ex[1,1] = 2.+6.*x[0]+ 8.*x[1]
62 else:
63 g_ex[0,0] = 2.+6.*x[1]+8.*x[2]+18.*x[0]
64 g_ex[0,1] = 3.+6.*x[0]+7.*x[2]+20.*x[1]
65 g_ex[0,2] = 4.+7.*x[1]+8.*x[0]+22.*x[2]
66 g_ex[1,0] = 4.+3.*x[1]-8.*x[2]- 4.*x[0]
67 g_ex[1,1] = 1.+3.*x[0]+2.*x[2]+14.*x[1]
68 g_ex[1,2] = -6.+2.*x[1]-8.*x[0]+10.*x[2]
69 g_ex[2,0] = 7.-6.*x[1]+2.*x[2]+ 4.*x[0]
70 g_ex[2,1] = 9.-6.*x[0]+8.*x[2]+16.*x[1]
71 g_ex[2,2] = 2.+8.*x[1]+2.*x[0]+ 2.*x[2]
72 else:
73 g_ex = Data(0., (dim,), Solution(self.domain))
74 if dim == 2:
75 g_ex[0] = 2.+8.*x[0]+5.*x[1]
76 g_ex[1] = 3.+5.*x[0]+12.*x[1]
77 else:
78 g_ex[0] = 2.+6.*x[1]+8.*x[2]+18.*x[0]
79 g_ex[1] = 3.+6.*x[0]+7.*x[2]+20.*x[1]
80 g_ex[2] = 4.+7.*x[1]+8.*x[0]+22.*x[2]
81 return g_ex
82
83 def _getSolution(self, system):
84 """returns exact solution"""
85 dim = self.domain.getDim()
86 x = Solution(self.domain).getX()
87 if system:
88 u_ex = Vector(0., Solution(self.domain))
89 if dim == 2:
90 u_ex[0] = 1.+2.*x[0]+3.*x[1]+4.*x[0]**2+5.*x[1]*x[0]+6.*x[1]**2
91 u_ex[1] = -1.+4.*x[0]+2.*x[1]+1.*x[0]**2+6.*x[1]*x[0]+4.*x[1]**2
92 else:
93 u_ex[0] = 1.+2.*x[0]+3.*x[1]+4.*x[2]+\
94 6.*x[0]*x[1]+7.*x[1]*x[2]+8.*x[2]*x[0]+\
95 9.*x[0]**2+10.*x[1]**2+11.*x[2]**2
96 u_ex[1] = 2.+4.*x[0]+1.*x[1]-6.*x[2]+\
97 3.*x[0]*x[1]+2.*x[1]*x[2]-8.*x[2]*x[0]-\
98 2.*x[0]**2+7.*x[1]**2+5.*x[2]**2
99 u_ex[2] = -2.+7.*x[0]+9.*x[1]+2*x[2]-\
100 6.*x[0]*x[1]+8.*x[1]*x[2]+2.*x[2]*x[0]+\
101 2.*x[0]**2+8.*x[1]**2+1.*x[2]**2
102 else:
103 if dim == 2:
104 u_ex = 1.+2.*x[0]+3.*x[1]+4.*x[0]**2+5.*x[1]*x[0]+6.*x[1]**2
105 else:
106 u_ex = 1.+2.*x[0]+3.*x[1]+4.*x[2]+\
107 6.*x[0]*x[1]+7.*x[1]*x[2]+8.*x[2]*x[0]+\
108 9.*x[0]**2+10.*x[1]**2+11.*x[2]**2
109 return u_ex
110
111 def _setCoefficients(self, pde, system):
112 """sets PDE coefficients"""
113 super(SimpleSolveOrder2, self)._setCoefficients(pde, system)
114 dim = self.domain.getDim()
115 if system:
116 Y = pde.getCoefficient("Y")
117 if dim == 2:
118 Y[0] = Y[0]-20.
119 Y[1] = Y[1]-10.
120 else:
121 Y[0] = Y[0]-60.
122 Y[1] = Y[1]-20.
123 Y[2] = Y[2]-22.
124 pde.setValue(Y=Y)
125 else:
126 if dim == 2:
127 pde.setValue(Y=-20.)
128 else:
129 pde.setValue(Y=-60.)
130
131 ### BiCGStab + Jacobi
132
133 class Test_SimpleSolveFinleyRect_Order1_Paso_BICGSTAB_Jacobi(SimpleSolveOnPaso):
134 def setUp(self):
135 self.domain = Rectangle(NE0, NE1, 1, optimize=OPTIMIZE)
136 self.package = SolverOptions.PASO
137 self.method = SolverOptions.BICGSTAB
138 self.preconditioner = SolverOptions.JACOBI
139
140 def tearDown(self):
141 del self.domain
142
143 class Test_SimpleSolveFinleyRect_Order2_Paso_BICGSTAB_Jacobi(SimpleSolveOrder2):
144 def setUp(self):
145 self.domain = Rectangle(NE0, NE1, 2, optimize=OPTIMIZE)
146 self.package = SolverOptions.PASO
147 self.method = SolverOptions.BICGSTAB
148 self.preconditioner = SolverOptions.JACOBI
149
150 def tearDown(self):
151 del self.domain
152
153 class Test_SimpleSolveFinleyBrick_Order1_Paso_BICGSTAB_Jacobi(SimpleSolveOnPaso):
154 def setUp(self):
155 self.domain = Brick(NE0, NE1, NE2, 1, optimize=OPTIMIZE)
156 self.package = SolverOptions.PASO
157 self.method = SolverOptions.BICGSTAB
158 self.preconditioner = SolverOptions.JACOBI
159
160 def tearDown(self):
161 del self.domain
162
163 class Test_SimpleSolveFinleyBrick_Order2_Paso_BICGSTAB_Jacobi(SimpleSolveOrder2):
164 def setUp(self):
165 self.domain = Brick(NE0, NE1, NE2, 2, optimize=OPTIMIZE)
166 self.package = SolverOptions.PASO
167 self.method = SolverOptions.BICGSTAB
168 self.preconditioner = SolverOptions.JACOBI
169
170 def tearDown(self):
171 del self.domain
172
173 ### PCG + Jacobi
174
175 class Test_SimpleSolveFinleyRect_Order1_Paso_PCG_Jacobi(SimpleSolveOnPaso):
176 def setUp(self):
177 self.domain = Rectangle(NE0, NE1, 1, optimize=OPTIMIZE)
178 self.package = SolverOptions.PASO
179 self.method = SolverOptions.PCG
180 self.preconditioner = SolverOptions.JACOBI
181
182 def tearDown(self):
183 del self.domain
184
185 class Test_SimpleSolveFinleyRect_Order2_Paso_PCG_Jacobi(SimpleSolveOrder2):
186 def setUp(self):
187 self.domain = Rectangle(NE0, NE1, 2, optimize=OPTIMIZE)
188 self.package = SolverOptions.PASO
189 self.method = SolverOptions.PCG
190 self.preconditioner = SolverOptions.JACOBI
191
192 def tearDown(self):
193 del self.domain
194
195 class Test_SimpleSolveFinleyBrick_Order1_Paso_PCG_Jacobi(SimpleSolveOnPaso):
196 def setUp(self):
197 self.domain = Brick(NE0, NE1, NE2, 1, optimize=OPTIMIZE)
198 self.package = SolverOptions.PASO
199 self.method = SolverOptions.PCG
200 self.preconditioner = SolverOptions.JACOBI
201
202 def tearDown(self):
203 del self.domain
204
205 class Test_SimpleSolveFinleyBrick_Order2_Paso_PCG_Jacobi(SimpleSolveOrder2):
206 def setUp(self):
207 self.domain = Brick(NE0, NE1, NE2, 2, optimize=OPTIMIZE)
208 self.package = SolverOptions.PASO
209 self.method = SolverOptions.PCG
210 self.preconditioner = SolverOptions.JACOBI
211
212 def tearDown(self):
213 del self.domain
214
215 ### TFQMR + Jacobi
216
217 class Test_SimpleSolveFinleyRect_Order1_Paso_TFQMR_Jacobi(SimpleSolveOnPaso):
218 def setUp(self):
219 self.domain = Rectangle(NE0, NE1, 1, optimize=OPTIMIZE)
220 self.package = SolverOptions.PASO
221 self.method = SolverOptions.TFQMR
222 self.preconditioner = SolverOptions.JACOBI
223
224 def tearDown(self):
225 del self.domain
226
227 class Test_SimpleSolveFinleyRect_Order2_Paso_TFQMR_Jacobi(SimpleSolveOrder2):
228 def setUp(self):
229 self.domain = Rectangle(NE0, NE1, 2, optimize=OPTIMIZE)
230 self.package = SolverOptions.PASO
231 self.method = SolverOptions.TFQMR
232 self.preconditioner = SolverOptions.JACOBI
233
234 def tearDown(self):
235 del self.domain
236
237 class Test_SimpleSolveFinleyBrick_Order1_Paso_TFQMR_Jacobi(SimpleSolveOnPaso):
238 def setUp(self):
239 self.domain = Brick(NE0, NE1, NE2, 1, optimize=OPTIMIZE)
240 self.package = SolverOptions.PASO
241 self.method = SolverOptions.TFQMR
242 self.preconditioner = SolverOptions.JACOBI
243
244 def tearDown(self):
245 del self.domain
246
247 class Test_SimpleSolveFinleyBrick_Order2_Paso_TFQMR_Jacobi(SimpleSolveOrder2):
248 def setUp(self):
249 self.domain = Brick(NE0, NE1, NE2, 2, optimize=OPTIMIZE)
250 self.package = SolverOptions.PASO
251 self.method = SolverOptions.TFQMR
252 self.preconditioner = SolverOptions.JACOBI
253
254 def tearDown(self):
255 del self.domain
256
257 ### MINRES + Jacobi
258
259 class Test_SimpleSolveFinleyRect_Order1_Paso_MINRES_Jacobi(SimpleSolveOnPaso):
260 def setUp(self):
261 self.domain = Rectangle(NE0, NE1, 1, optimize=OPTIMIZE)
262 self.package = SolverOptions.PASO
263 self.method = SolverOptions.MINRES
264 self.preconditioner = SolverOptions.JACOBI
265
266 def tearDown(self):
267 del self.domain
268
269 class Test_SimpleSolveFinleyRect_Order2_Paso_MINRES_Jacobi(SimpleSolveOrder2):
270 def setUp(self):
271 self.domain = Rectangle(NE0, NE1, 2, optimize=OPTIMIZE)
272 self.package = SolverOptions.PASO
273 self.method = SolverOptions.MINRES
274 self.preconditioner = SolverOptions.JACOBI
275
276 def tearDown(self):
277 del self.domain
278
279 class Test_SimpleSolveFinleyBrick_Order1_Paso_MINRES_Jacobi(SimpleSolveOnPaso):
280 def setUp(self):
281 self.domain = Brick(NE0, NE1, NE2, 1, optimize=OPTIMIZE)
282 self.package = SolverOptions.PASO
283 self.method = SolverOptions.MINRES
284 self.preconditioner = SolverOptions.JACOBI
285
286 def tearDown(self):
287 del self.domain
288
289 class Test_SimpleSolveFinleyBrick_Order2_Paso_MINRES_Jacobi(SimpleSolveOrder2):
290 def setUp(self):
291 self.domain = Brick(NE0, NE1, NE2, 2, optimize=OPTIMIZE)
292 self.package = SolverOptions.PASO
293 self.method = SolverOptions.MINRES
294 self.preconditioner = SolverOptions.JACOBI
295
296 def tearDown(self):
297 del self.domain
298
299 ### BiCGStab + Gauss-Seidel
300
301 class Test_SimpleSolveFinleyRect_Order1_Paso_BICGSTAB_GaussSeidel(SimpleSolveOnPaso):
302 def setUp(self):
303 self.domain = Rectangle(NE0, NE1, 1, optimize=OPTIMIZE)
304 self.package = SolverOptions.PASO
305 self.method = SolverOptions.BICGSTAB
306 self.preconditioner = SolverOptions.GAUSS_SEIDEL
307
308 def tearDown(self):
309 del self.domain
310
311 class Test_SimpleSolveFinleyRect_Order2_Paso_BICGSTAB_GaussSeidel(SimpleSolveOrder2):
312 def setUp(self):
313 self.domain = Rectangle(NE0, NE1, 2, optimize=OPTIMIZE)
314 self.package = SolverOptions.PASO
315 self.method = SolverOptions.BICGSTAB
316 self.preconditioner = SolverOptions.GAUSS_SEIDEL
317
318 def tearDown(self):
319 del self.domain
320
321 class Test_SimpleSolveFinleyBrick_Order1_Paso_BICGSTAB_GaussSeidel(SimpleSolveOnPaso):
322 def setUp(self):
323 self.domain = Brick(NE0, NE1, NE2, 1, optimize=OPTIMIZE)
324 self.package = SolverOptions.PASO
325 self.method = SolverOptions.BICGSTAB
326 self.preconditioner = SolverOptions.GAUSS_SEIDEL
327
328 def tearDown(self):
329 del self.domain
330
331 class Test_SimpleSolveFinleyBrick_Order2_Paso_BICGSTAB_GaussSeidel(SimpleSolveOrder2):
332 def setUp(self):
333 self.domain = Brick(NE0, NE1, NE2, 2, optimize=OPTIMIZE)
334 self.package = SolverOptions.PASO
335 self.method = SolverOptions.BICGSTAB
336 self.preconditioner = SolverOptions.GAUSS_SEIDEL
337
338 def tearDown(self):
339 del self.domain
340
341 ### PCG + Gauss-Seidel
342
343 class Test_SimpleSolveFinleyRect_Order1_Paso_PCG_GaussSeidel(SimpleSolveOnPaso):
344 def setUp(self):
345 self.domain = Rectangle(NE0, NE1, 1, optimize=OPTIMIZE)
346 self.package = SolverOptions.PASO
347 self.method = SolverOptions.PCG
348 self.preconditioner = SolverOptions.GAUSS_SEIDEL
349
350 def tearDown(self):
351 del self.domain
352
353 class Test_SimpleSolveFinleyRect_Order2_Paso_PCG_GaussSeidel(SimpleSolveOrder2):
354 def setUp(self):
355 self.domain = Rectangle(NE0, NE1, 2, optimize=OPTIMIZE)
356 self.package = SolverOptions.PASO
357 self.method = SolverOptions.PCG
358 self.preconditioner = SolverOptions.GAUSS_SEIDEL
359
360 def tearDown(self):
361 del self.domain
362
363 class Test_SimpleSolveFinleyBrick_Order1_Paso_PCG_GaussSeidel(SimpleSolveOnPaso):
364 def setUp(self):
365 self.domain = Brick(NE0, NE1, NE2, 1, optimize=OPTIMIZE)
366 self.package = SolverOptions.PASO
367 self.method = SolverOptions.PCG
368 self.preconditioner = SolverOptions.GAUSS_SEIDEL
369
370 def tearDown(self):
371 del self.domain
372
373 class Test_SimpleSolveFinleyBrick_Order2_Paso_PCG_GaussSeidel(SimpleSolveOrder2):
374 def setUp(self):
375 self.domain = Brick(NE0, NE1, NE2, 2, optimize=OPTIMIZE)
376 self.package = SolverOptions.PASO
377 self.method = SolverOptions.PCG
378 self.preconditioner = SolverOptions.GAUSS_SEIDEL
379
380 def tearDown(self):
381 del self.domain
382
383 ### TFQMR + Gauss-Seidel
384
385 class Test_SimpleSolveFinleyRect_Order1_Paso_TFQMR_GaussSeidel(SimpleSolveOnPaso):
386 def setUp(self):
387 self.domain = Rectangle(NE0, NE1, 1, optimize=OPTIMIZE)
388 self.package = SolverOptions.PASO
389 self.method = SolverOptions.TFQMR
390 self.preconditioner = SolverOptions.GAUSS_SEIDEL
391
392 def tearDown(self):
393 del self.domain
394
395 class Test_SimpleSolveFinleyRect_Order2_Paso_TFQMR_GaussSeidel(SimpleSolveOrder2):
396 def setUp(self):
397 self.domain = Rectangle(NE0, NE1, 2, optimize=OPTIMIZE)
398 self.package = SolverOptions.PASO
399 self.method = SolverOptions.TFQMR
400 self.preconditioner = SolverOptions.GAUSS_SEIDEL
401
402 def tearDown(self):
403 del self.domain
404
405 class Test_SimpleSolveFinleyBrick_Order1_Paso_TFQMR_GaussSeidel(SimpleSolveOnPaso):
406 def setUp(self):
407 self.domain = Brick(NE0, NE1, NE2, 1, optimize=OPTIMIZE)
408 self.package = SolverOptions.PASO
409 self.method = SolverOptions.TFQMR
410 self.preconditioner = SolverOptions.GAUSS_SEIDEL
411
412 def tearDown(self):
413 del self.domain
414
415 class Test_SimpleSolveFinleyBrick_Order2_Paso_TFQMR_GaussSeidel(SimpleSolveOrder2):
416 def setUp(self):
417 self.domain = Brick(NE0, NE1, NE2, 2, optimize=OPTIMIZE)
418 self.package = SolverOptions.PASO
419 self.method = SolverOptions.TFQMR
420 self.preconditioner = SolverOptions.GAUSS_SEIDEL
421
422 def tearDown(self):
423 del self.domain
424
425 ### MINRES + Gauss-Seidel
426
427 class Test_SimpleSolveFinleyRect_Order1_Paso_MINRES_GaussSeidel(SimpleSolveOnPaso):
428 def setUp(self):
429 self.domain = Rectangle(NE0, NE1, 1, optimize=OPTIMIZE)
430 self.package = SolverOptions.PASO
431 self.method = SolverOptions.MINRES
432 self.preconditioner = SolverOptions.GAUSS_SEIDEL
433
434 def tearDown(self):
435 del self.domain
436
437 class Test_SimpleSolveFinleyRect_Order2_Paso_MINRES_GaussSeidel(SimpleSolveOrder2):
438 def setUp(self):
439 self.domain = Rectangle(NE0, NE1, 2, optimize=OPTIMIZE)
440 self.package = SolverOptions.PASO
441 self.method = SolverOptions.MINRES
442 self.preconditioner = SolverOptions.GAUSS_SEIDEL
443
444 def tearDown(self):
445 del self.domain
446
447 class Test_SimpleSolveFinleyBrick_Order1_Paso_MINRES_GaussSeidel(SimpleSolveOnPaso):
448 def setUp(self):
449 self.domain = Brick(NE0, NE1, NE2, 1, optimize=OPTIMIZE)
450 self.package = SolverOptions.PASO
451 self.method = SolverOptions.MINRES
452 self.preconditioner = SolverOptions.GAUSS_SEIDEL
453
454 def tearDown(self):
455 del self.domain
456
457 class Test_SimpleSolveFinleyBrick_Order2_Paso_MINRES_GaussSeidel(SimpleSolveOrder2):
458 def setUp(self):
459 self.domain = Brick(NE0, NE1, NE2, 2, optimize=OPTIMIZE)
460 self.package = SolverOptions.PASO
461 self.method = SolverOptions.MINRES
462 self.preconditioner = SolverOptions.GAUSS_SEIDEL
463
464 def tearDown(self):
465 del self.domain
466
467 ### BiCGStab + RILU
468
469 class Test_SimpleSolveFinleyRect_Order1_Paso_BICGSTAB_RILU(SimpleSolveOnPaso):
470 def setUp(self):
471 self.domain = Rectangle(NE0, NE1, 1, optimize=OPTIMIZE)
472 self.package = SolverOptions.PASO
473 self.method = SolverOptions.BICGSTAB
474 self.preconditioner = SolverOptions.RILU
475
476 def tearDown(self):
477 del self.domain
478
479 class Test_SimpleSolveFinleyRect_Order2_Paso_BICGSTAB_RILU(SimpleSolveOrder2):
480 def setUp(self):
481 self.domain = Rectangle(NE0, NE1, 2, optimize=OPTIMIZE)
482 self.package = SolverOptions.PASO
483 self.method = SolverOptions.BICGSTAB
484 self.preconditioner = SolverOptions.RILU
485
486 def tearDown(self):
487 del self.domain
488
489 class Test_SimpleSolveFinleyBrick_Order1_Paso_BICGSTAB_RILU(SimpleSolveOnPaso):
490 def setUp(self):
491 self.domain = Brick(NE0, NE1, NE2, 1, optimize=OPTIMIZE)
492 self.package = SolverOptions.PASO
493 self.method = SolverOptions.BICGSTAB
494 self.preconditioner = SolverOptions.RILU
495
496 def tearDown(self):
497 del self.domain
498
499 class Test_SimpleSolveFinleyBrick_Order2_Paso_BICGSTAB_RILU(SimpleSolveOrder2):
500 def setUp(self):
501 self.domain = Brick(NE0, NE1, NE2, 2, optimize=OPTIMIZE)
502 self.package = SolverOptions.PASO
503 self.method = SolverOptions.BICGSTAB
504 self.preconditioner = SolverOptions.RILU
505
506 def tearDown(self):
507 del self.domain
508
509 ### PCG + RILU
510
511 class Test_SimpleSolveFinleyRect_Order1_Paso_PCG_RILU(SimpleSolveOnPaso):
512 def setUp(self):
513 self.domain = Rectangle(NE0, NE1, 1, optimize=OPTIMIZE)
514 self.package = SolverOptions.PASO
515 self.method = SolverOptions.PCG
516 self.preconditioner = SolverOptions.RILU
517
518 def tearDown(self):
519 del self.domain
520
521 class Test_SimpleSolveFinleyRect_Order2_Paso_PCG_RILU(SimpleSolveOrder2):
522 def setUp(self):
523 self.domain = Rectangle(NE0, NE1, 2, optimize=OPTIMIZE)
524 self.package = SolverOptions.PASO
525 self.method = SolverOptions.PCG
526 self.preconditioner = SolverOptions.RILU
527
528 def tearDown(self):
529 del self.domain
530
531 class Test_SimpleSolveFinleyBrick_Order1_Paso_PCG_RILU(SimpleSolveOnPaso):
532 def setUp(self):
533 self.domain = Brick(NE0, NE1, NE2, 1, optimize=OPTIMIZE)
534 self.package = SolverOptions.PASO
535 self.method = SolverOptions.PCG
536 self.preconditioner = SolverOptions.RILU
537
538 def tearDown(self):
539 del self.domain
540
541 class Test_SimpleSolveFinleyBrick_Order2_Paso_PCG_RILU(SimpleSolveOrder2):
542 def setUp(self):
543 self.domain = Brick(NE0, NE1, NE2, 2, optimize=OPTIMIZE)
544 self.package = SolverOptions.PASO
545 self.method = SolverOptions.PCG
546 self.preconditioner = SolverOptions.RILU
547
548 def tearDown(self):
549 del self.domain
550
551 ### TFQMR + RILU
552
553 class Test_SimpleSolveFinleyRect_Order1_Paso_TFQMR_RILU(SimpleSolveOnPaso):
554 def setUp(self):
555 self.domain = Rectangle(NE0, NE1, 1, optimize=OPTIMIZE)
556 self.package = SolverOptions.PASO
557 self.method = SolverOptions.TFQMR
558 self.preconditioner = SolverOptions.RILU
559
560 def tearDown(self):
561 del self.domain
562
563 class Test_SimpleSolveFinleyRect_Order2_Paso_TFQMR_RILU(SimpleSolveOrder2):
564 def setUp(self):
565 self.domain = Rectangle(NE0, NE1, 2, optimize=OPTIMIZE)
566 self.package = SolverOptions.PASO
567 self.method = SolverOptions.TFQMR
568 self.preconditioner = SolverOptions.RILU
569
570 def tearDown(self):
571 del self.domain
572
573 class Test_SimpleSolveFinleyBrick_Order1_Paso_TFQMR_RILU(SimpleSolveOnPaso):
574 def setUp(self):
575 self.domain = Brick(NE0, NE1, NE2, 1, optimize=OPTIMIZE)
576 self.package = SolverOptions.PASO
577 self.method = SolverOptions.TFQMR
578 self.preconditioner = SolverOptions.RILU
579
580 def tearDown(self):
581 del self.domain
582
583 class Test_SimpleSolveFinleyBrick_Order2_Paso_TFQMR_RILU(SimpleSolveOrder2):
584 def setUp(self):
585 self.domain = Brick(NE0, NE1, NE2, 2, optimize=OPTIMIZE)
586 self.package = SolverOptions.PASO
587 self.method = SolverOptions.TFQMR
588 self.preconditioner = SolverOptions.RILU
589
590 def tearDown(self):
591 del self.domain
592
593 ### MINRES + RILU
594
595 class Test_SimpleSolveFinleyRect_Order1_Paso_MINRES_RILU(SimpleSolveOnPaso):
596 def setUp(self):
597 self.domain = Rectangle(NE0, NE1, 1, optimize=OPTIMIZE)
598 self.package = SolverOptions.PASO
599 self.method = SolverOptions.MINRES
600 self.preconditioner = SolverOptions.RILU
601
602 def tearDown(self):
603 del self.domain
604
605 class Test_SimpleSolveFinleyRect_Order2_Paso_MINRES_RILU(SimpleSolveOrder2):
606 def setUp(self):
607 self.domain = Rectangle(NE0, NE1, 2, optimize=OPTIMIZE)
608 self.package = SolverOptions.PASO
609 self.method = SolverOptions.MINRES
610 self.preconditioner = SolverOptions.RILU
611
612 def tearDown(self):
613 del self.domain
614
615 class Test_SimpleSolveFinleyBrick_Order1_Paso_MINRES_RILU(SimpleSolveOnPaso):
616 def setUp(self):
617 self.domain = Brick(NE0, NE1, NE2, 1, optimize=OPTIMIZE)
618 self.package = SolverOptions.PASO
619 self.method = SolverOptions.MINRES
620 self.preconditioner = SolverOptions.RILU
621
622 def tearDown(self):
623 del self.domain
624
625 class Test_SimpleSolveFinleyBrick_Order2_Paso_MINRES_RILU(SimpleSolveOrder2):
626 def setUp(self):
627 self.domain = Brick(NE0, NE1, NE2, 2, optimize=OPTIMIZE)
628 self.package = SolverOptions.PASO
629 self.method = SolverOptions.MINRES
630 self.preconditioner = SolverOptions.RILU
631
632 def tearDown(self):
633 del self.domain
634
635
636 if __name__ == '__main__':
637 run_tests(__name__, exit_on_failure=True)
638

  ViewVC Help
Powered by ViewVC 1.1.26