/[escript]/trunk/escript/py_src/pdetools.py
ViewVC logotype

Diff of /trunk/escript/py_src/pdetools.py

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

revision 2244 by caltinay, Wed Dec 17 03:08:58 2008 UTC revision 2245 by gross, Wed Feb 4 06:27:59 2009 UTC
# Line 881  def GMRES(r, Aprod, x, bilinearform, ato Line 881  def GMRES(r, Aprod, x, bilinearform, ato
881        else:        else:
882           r2=1*r           r2=1*r
883        x2=x*1.        x2=x*1.
884        x,stopped=__GMRESm(r2, Aprod, x, bilinearform, atol2, iter_max=iter_max-iter, iter_restart=m, verbose=verbose)        x,stopped=_GMRESm(r2, Aprod, x, bilinearform, atol2, iter_max=iter_max-iter, iter_restart=m, verbose=verbose)
885        iter+=iter_restart        iter+=iter_restart
886        if stopped: break        if stopped: break
887        if verbose: print "GMRES: restart."        if verbose: print "GMRES: restart."
# Line 889  def GMRES(r, Aprod, x, bilinearform, ato Line 889  def GMRES(r, Aprod, x, bilinearform, ato
889     if verbose: print "GMRES: tolerance has reached."     if verbose: print "GMRES: tolerance has reached."
890     return x     return x
891    
892  def __GMRESm(r, Aprod, x, bilinearform, atol, iter_max=100, iter_restart=20, verbose=False):  def _GMRESm(r, Aprod, x, bilinearform, atol, iter_max=100, iter_restart=20, verbose=False):
893     iter=0     iter=0
894    
895     h=numarray.zeros((iter_restart+1,iter_restart),numarray.Float64)     h=numarray.zeros((iter_restart+1,iter_restart),numarray.Float64)

Legend:
Removed from v.2244  
changed lines
  Added in v.2245

  ViewVC Help
Powered by ViewVC 1.1.26