Changeset 7848 for trunk/anuga_core/source/anuga/utilities/test_cg_solve.py
 Timestamp:
 Jun 16, 2010, 2:50:06 PM (13 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/anuga_core/source/anuga/utilities/test_cg_solve.py
r7276 r7848 4 4 class TestError(exceptions.Exception): pass 5 5 import unittest 6 7 6 8 7 import numpy as num … … 12 11 13 12 13 14 14 15 class Test_CG_Solve(unittest.TestCase): 15 16 … … 28 29 x = [0.0, 0.0, 0.0, 0.0] 29 30 30 x = conjugate_gradient(A,b,x ,iprint=0)31 x = conjugate_gradient(A,b,x) 31 32 32 33 assert num.allclose(x,xe) … … 47 48 48 49 try: 49 x = conjugate_gradient(A,b,x,i print=0,imax=2)50 x = conjugate_gradient(A,b,x,imax=2) 50 51 except ConvergenceError: 51 52 pass … … 71 72 72 73 b = A*xe 73 x = conjugate_gradient(A,b,b,tol=1.0e5 ,iprint=1)74 x = conjugate_gradient(A,b,b,tol=1.0e5) 74 75 75 76 assert num.allclose(x,xe) … … 99 100 100 101 b = A*xe 101 x = conjugate_gradient(A,b,b,iprint= 0)102 x = conjugate_gradient(A,b,b,iprint=1) 102 103 103 104 assert num.allclose(x,xe)
Note: See TracChangeset
for help on using the changeset viewer.