/[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 2302 by gross, Fri Feb 20 02:10:59 2009 UTC revision 2303 by artak, Fri Mar 13 01:34:36 2009 UTC
# Line 723  def __givapp(c,s,vin): Line 723  def __givapp(c,s,vin):
723      """      """
724      vrot=vin      vrot=vin
725      if isinstance(c,float):      if isinstance(c,float):
726          vrot=numarray.array([c*vrot[0]-s*vrot[1],s*vrot[0]+c*vrot[1]])          vrot=[c*vrot[0]-s*vrot[1],s*vrot[0]+c*vrot[1]]
727      else:      else:
728          for i in range(len(c)):          for i in range(len(c)):
729              w1=c[i]*vrot[i]-s[i]*vrot[i+1]              w1=c[i]*vrot[i]-s[i]*vrot[i+1]
# Line 789  def __FDGMRES(F0, defect, x0, atol, iter Line 789  def __FDGMRES(F0, defect, x0, atol, iter
789              s[iter]=-h[iter+1,iter]/mu              s[iter]=-h[iter+1,iter]/mu
790              h[iter,iter]=c[iter]*h[iter,iter]-s[iter]*h[iter+1,iter]              h[iter,iter]=c[iter]*h[iter,iter]-s[iter]*h[iter+1,iter]
791              h[iter+1,iter]=0.0              h[iter+1,iter]=0.0
792              gg=__givapp(c[iter],s[iter],numarray.array([g[iter],g[iter+1]]))              gg=__givapp(c[iter],s[iter],[g[iter],g[iter+1]])
793              g[iter]=gg[0]              g[iter]=gg[0]
794              g[iter+1]=gg[1]              g[iter+1]=gg[1]
795    
# Line 952  def _GMRESm(r, Aprod, x, bilinearform, a Line 952  def _GMRESm(r, Aprod, x, bilinearform, a
952          s[iter]=-h[iter+1,iter]/mu          s[iter]=-h[iter+1,iter]/mu
953          h[iter,iter]=c[iter]*h[iter,iter]-s[iter]*h[iter+1,iter]          h[iter,iter]=c[iter]*h[iter,iter]-s[iter]*h[iter+1,iter]
954          h[iter+1,iter]=0.0          h[iter+1,iter]=0.0
955                  gg=__givapp(c[iter],s[iter],numarray.array([g[iter],g[iter+1]]))                  gg=__givapp(c[iter],s[iter],[g[iter],g[iter+1]])
956                  g[iter]=gg[0]                  g[iter]=gg[0]
957                  g[iter+1]=gg[1]                  g[iter+1]=gg[1]
958  # Update the residual norm  # Update the residual norm

Legend:
Removed from v.2302  
changed lines
  Added in v.2303

  ViewVC Help
Powered by ViewVC 1.1.26