/[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 1483 by artak, Wed Apr 9 02:29:47 2008 UTC revision 1484 by artak, Wed Apr 9 03:25:53 2008 UTC
# Line 732  def MINRES(b, Aprod, Msolve, bilinearfor Line 732  def MINRES(b, Aprod, Msolve, bilinearfor
732        beta1  = math.sqrt(beta1)       # Normalize y to get v1 later.        beta1  = math.sqrt(beta1)       # Normalize y to get v1 later.
733    
734      #------------------------------------------------------------------      #------------------------------------------------------------------
735      # Initialize other quantities.      # Initialize quantities.
736      # ------------------------------------------------------------------      # ------------------------------------------------------------------
 #  Initialize                                
   
737      iter   = 0      iter   = 0
738      Anorm = 0      Anorm = 0
739      ynorm = 0      ynorm = 0
 #    x=x*0  
   
740      oldb   = 0      oldb   = 0
741      beta   = beta1      beta   = beta1
742      dbar   = 0      dbar   = 0
# Line 845  def MINRES(b, Aprod, Msolve, bilinearfor Line 841  def MINRES(b, Aprod, Msolve, bilinearfor
841    
842          rnorm  = phibar          rnorm  = phibar
843    
     # Return final answer.  
     print iter  
844      return x      return x
845            
846  #############################################  #############################################
# Line 1099  class HomogeneousSaddlePointProblem(obje Line 1093  class HomogeneousSaddlePointProblem(obje
1093                  #       A(u-v)=f-B^*p-Av                  #       A(u-v)=f-B^*p-Av
1094                  #       u=v+(u-v)                  #       u=v+(u-v)
1095          u=v+self.solve_A(v,p)          u=v+self.solve_A(v,p)
1096                      else:
               if solver=='PCG':  
1097                  if self.verbose: print "enter PCG method (iter_max=%s)"%max_iter                  if self.verbose: print "enter PCG method (iter_max=%s)"%max_iter
1098                  p,r=PCG(ArithmeticTuple(self.__z*1.,Bz),self.__Aprod,self.__Msolve,self.__inner,self.__stoppingcriterium,iter_max=max_iter, x=p)                  p,r=PCG(ArithmeticTuple(self.__z*1.,Bz),self.__Aprod,self.__Msolve,self.__inner,self.__stoppingcriterium,iter_max=max_iter, x=p)
1099              u=r[0]                u=r[0]  

Legend:
Removed from v.1483  
changed lines
  Added in v.1484

  ViewVC Help
Powered by ViewVC 1.1.26