/[escript]/trunk/paso/src/MINRES.c
ViewVC logotype

Diff of /trunk/paso/src/MINRES.c

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

revision 1811 by ksteube, Thu Sep 25 23:11:13 2008 UTC revision 1860 by artak, Wed Oct 8 04:07:10 2008 UTC
# Line 171  err_t Paso_Solver_MINRES( Line 171  err_t Paso_Solver_MINRES(
171       }       }
172    
173       alfa = Paso_InnerProduct(n,v,y,A->mpi_info);       alfa = Paso_InnerProduct(n,v,y,A->mpi_info);
174       Paso_Update(n, 1., y, -(alfa/beta), r2);       Paso_Update(n, 1., y, (-alfa/beta), r2);
175       Paso_Copy(n,r1,r2);       Paso_Copy(n,r1,r2);
176       Paso_Copy(n,r2,y);       Paso_Copy(n,r2,y);
177    
# Line 237  err_t Paso_Solver_MINRES( Line 237  err_t Paso_Solver_MINRES(
237       rnorm  = phibar;       rnorm  = phibar;
238    
239       maxIterFlag = (num_iter > maxit);       maxIterFlag = (num_iter > maxit);
240       norm_of_residual=rnorm;       norm_of_residual=rnorm/Anorm*ynorm;
241       convergeFlag=(norm_of_residual<Anorm*ynorm*(*tolerance));       convergeFlag=(norm_of_residual<(*tolerance));
242            
243            
244       if (maxIterFlag) {       if (maxIterFlag) {
# Line 247  err_t Paso_Solver_MINRES( Line 247  err_t Paso_Solver_MINRES(
247           status = SOLVER_BREAKDOWN;           status = SOLVER_BREAKDOWN;
248       }       }
249      ++(num_iter);      ++(num_iter);
     /*printf("residual norm %.10f < %.10f %.10f %.10f \n",rnorm,Anorm*ynorm*(*tolerance), Anorm*ynorm, (*tolerance));*/  
250    }    }
251      /* end of iteration */      /* end of iteration */
252            

Legend:
Removed from v.1811  
changed lines
  Added in v.1860

  ViewVC Help
Powered by ViewVC 1.1.26