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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 121 by jgs, Fri May 6 04:26:16 2005 UTC revision 126 by jgs, Fri Jul 22 03:53:08 2005 UTC
# Line 82  def solveVector(numDim, totalNumElem, le Line 82  def solveVector(numDim, totalNumElem, le
82      mypde=LinearPDE(mesh)      mypde=LinearPDE(mesh)
83      mypde.setValue(A = A, Y = - 2 * alpha * (meshDim - 1)*ones(meshDim), q = bndryMask, r = u)      mypde.setValue(A = A, Y = - 2 * alpha * (meshDim - 1)*ones(meshDim), q = bndryMask, r = u)
84      mypde.setSolverMethod(solver_method_id)      mypde.setSolverMethod(solver_method_id)
85        # mypde.getOperator().saveMM("g.mm")
86    
87      # Solve for Approximate Solution      # Solve for Approximate Solution
88      tm=time()      tm=time()
# Line 161  print "Test is started:" Line 162  print "Test is started:"
162  print "----------------"  print "----------------"
163  error=0.  error=0.
164  for numDim in [2, 3]:  for numDim in [2, 3]:
165       # for totalNumElem in [51200]:
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           if totalNumElem*2**numDim*numDim< 200000: error=max([problem(numDim, totalNumElem, len_x0, alpha,"DIRECT",""),error])        #for problem in [solveVector]:
169           for solver_method in [ "PCG" ]:           # error=max([problem(numDim, totalNumElem, len_x0, alpha,"PCG",""),error])
170              for prec in [ "JACOBI", "ILU0" ]:           error=max([problem(numDim, totalNumElem, len_x0, alpha,"DIRECT",""),error])
171                 error=max([problem(numDim, totalNumElem, len_x0, alpha, solver_method,prec),error])           #if totalNumElem*2**numDim*numDim< 200000: error=max([problem(numDim, totalNumElem, len_x0, alpha,"DIRECT",""),error])
172             # for solver_method in [ "PCG" ]:
173             #    for prec in [ "JACOBI", "ILU0" ]:
174             #       error=max([problem(numDim, totalNumElem, len_x0, alpha, solver_method,prec),error])
175  print "----------------"  print "----------------"
176  print "maximum error over all tests is ",error  print "maximum error over all tests is ",error
177  print "----------------"  print "----------------"

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

  ViewVC Help
Powered by ViewVC 1.1.26