Diff of /trunk/finley/test/python/SolveTest.py

trunk/esys2/finley/test/python/SolveTest.py revision 126 by jgs, Fri Jul 22 03:53:08 2005 UTC trunk/finley/test/python/SolveTest.py revision 155 by jgs, Wed Nov 9 02:02:19 2005 UTC
# Line 15  Line 15
15  """  """
16
17  from esys.escript import *  from esys.escript import *
18  from esys.linearPDEs import *  from esys.escript.linearPDEs import *
19  import esys.finley as pdelib  import esys.finley as pdelib
20  from time import time  from time import time
21
# Line 86  def solveVector(numDim, totalNumElem, le Line 86  def solveVector(numDim, totalNumElem, le
86
87      # Solve for Approximate Solution      # Solve for Approximate Solution
88      tm=time()      tm=time()
89      u_approx = mypde.getSolution(preconditioner=prec_id,iter_max=10000)      u_approx = mypde.getSolution(verbose=True,preconditioner=prec_id,iter_max=10000)
90      tm=time()-tm      tm=time()-tm
91
92      # Report Results      # Report Results
# Line 146  def solveScalar(numDim, totalNumElem, le Line 146  def solveScalar(numDim, totalNumElem, le
146
147      # Solve for Approximate Solution      # Solve for Approximate Solution
148      tm=time()      tm=time()
149      u_approx = mypde.getSolution(preconditioner=prec_id,iter_max=10000)      u_approx = mypde.getSolution(verbose=True,preconditioner=prec_id,iter_max=10000)
150      tm=time()-tm      tm=time()-tm
151
152      # Report Results      # Report Results
# Line 166  for numDim in [2, 3]: Line 166  for numDim in [2, 3]:
166     for totalNumElem in [100, 200, 400, 800, 1600, 3200, 6400, 12800, 25600, 51200, 102400,204800]:     for totalNumElem in [100, 200, 400, 800, 1600, 3200, 6400, 12800, 25600, 51200, 102400,204800]:
167        for problem in [solveScalar,solveVector]:        for problem in [solveScalar,solveVector]:
168        #for problem in [solveVector]:        #for problem in [solveVector]:
169           # error=max([problem(numDim, totalNumElem, len_x0, alpha,"PCG",""),error])           error=max([problem(numDim, totalNumElem, len_x0, alpha,"PCG",""),error])
170           error=max([problem(numDim, totalNumElem, len_x0, alpha,"DIRECT",""),error])           error=max([problem(numDim, totalNumElem, len_x0, alpha,"DIRECT",""),error])
171           #if totalNumElem*2**numDim*numDim< 200000: error=max([problem(numDim, totalNumElem, len_x0, alpha,"DIRECT",""),error])           #if totalNumElem*2**numDim*numDim< 200000: error=max([problem(numDim, totalNumElem, len_x0, alpha,"DIRECT",""),error])
172           # for solver_method in [ "PCG" ]:           # for solver_method in [ "PCG" ]:

Legend:
 Removed from v.126 changed lines Added in v.155