[Scipy-svn] r3793 - trunk/scipy/sandbox/multigrid

scipy-svn@scip... scipy-svn@scip...
Mon Jan 7 15:41:23 CST 2008


Author: wnbell
Date: 2008-01-07 15:41:21 -0600 (Mon, 07 Jan 2008)
New Revision: 3793

Modified:
   trunk/scipy/sandbox/multigrid/simple_test.py
Log:
modified multigrid test


Modified: trunk/scipy/sandbox/multigrid/simple_test.py
===================================================================
--- trunk/scipy/sandbox/multigrid/simple_test.py	2008-01-07 19:33:00 UTC (rev 3792)
+++ trunk/scipy/sandbox/multigrid/simple_test.py	2008-01-07 21:41:21 UTC (rev 3793)
@@ -1,8 +1,17 @@
-from multilevel import *
 from scipy import *
+from scipy.sandbox.multigrid.sa import *
+from scipy.sandbox.multigrid import *
+from scipy.sandbox.multigrid.utils import *
+from time import clock
 
-A = poisson_problem2D(200)
-rs_solver = ruge_stuben_solver(A)
+A = poisson_problem2D(500)
+
+start = clock()
+sa = smoothed_aggregation_solver(A)
+print "constructed solver in %s seconds" % (clock() - start)
+
 b = rand(A.shape[0])
-x,residuals = rs_solver.solve(b,return_residuals=True)
+start = clock()
+x,residuals = sa.solve(b,return_residuals=True)
+print "solved in %s seconds" % (clock() - start)
 print 'residuals',residuals



More information about the Scipy-svn mailing list