/[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 1860 by artak, Wed Oct 8 04:07:10 2008 UTC revision 2548 by jfenwick, Mon Jul 20 06:20:06 2009 UTC
# Line 1  Line 1 
1    
2  /*******************************************************  /*******************************************************
3  *  *
4  * Copyright (c) 2003-2008 by University of Queensland  * Copyright (c) 2003-2009 by University of Queensland
5  * Earth Systems Science Computational Center (ESSCC)  * Earth Systems Science Computational Center (ESSCC)
6  * http://www.uq.edu.au/esscc  * http://www.uq.edu.au/esscc
7  *  *
# Line 12  Line 12 
12  *******************************************************/  *******************************************************/
13    
14    
15  /* TFQMR iterations */  /* MINRES iterations */
16    
17  #include "SystemMatrix.h"  #include "SystemMatrix.h"
18  #include "Paso.h"  #include "Paso.h"
# Line 72  err_t Paso_Solver_MINRES( Line 72  err_t Paso_Solver_MINRES(
72      double * r,      double * r,
73      double * x,      double * x,
74      dim_t *iter,      dim_t *iter,
     double *tol,  
75      double * tolerance,      double * tolerance,
76      Paso_Performance* pp) {      Paso_Performance* pp) {
77    
# Line 87  err_t Paso_Solver_MINRES( Line 86  err_t Paso_Solver_MINRES(
86    double Anorm,ynorm,oldb,dbar,epsln,phibar,rhs1,rhs2,rnorm,tnorm2,ynorm2,cs,sn,eps,s,alfa,denom,z,beta1,beta;    double Anorm,ynorm,oldb,dbar,epsln,phibar,rhs1,rhs2,rnorm,tnorm2,ynorm2,cs,sn,eps,s,alfa,denom,z,beta1,beta;
87    double gmax,gmin,oldeps,delta,gbar,gamma,phi;    double gmax,gmin,oldeps,delta,gbar,gamma,phi;
88    
89    double norm_of_residual;    double norm_of_residual=0;
90        
91  /*                                                                 */  /*                                                                 */
92  /*-----------------------------------------------------------------*/  /*-----------------------------------------------------------------*/
# Line 162  err_t Paso_Solver_MINRES( Line 161  err_t Paso_Solver_MINRES(
161            
162       Performance_stopMonitor(pp,PERFORMANCE_SOLVER);       Performance_stopMonitor(pp,PERFORMANCE_SOLVER);
163       Performance_startMonitor(pp,PERFORMANCE_MVM);       Performance_startMonitor(pp,PERFORMANCE_MVM);
164       Paso_SystemMatrix_MatrixVector_CSR_OFFSET0(ONE, A, v,ZERO,y);       Paso_SystemMatrix_MatrixVector_CSR_OFFSET0(PASO_ONE, A, v,PASO_ZERO,y);
165       Performance_stopMonitor(pp,PERFORMANCE_MVM);       Performance_stopMonitor(pp,PERFORMANCE_MVM);
166       Performance_startMonitor(pp,PERFORMANCE_SOLVER);       Performance_startMonitor(pp,PERFORMANCE_SOLVER);
167            
# Line 260  err_t Paso_Solver_MINRES( Line 259  err_t Paso_Solver_MINRES(
259      TMPMEMFREE(v);      TMPMEMFREE(v);
260        
261      *iter=num_iter;      *iter=num_iter;
262      *tol=norm_of_residual;      *tolerance=norm_of_residual;
263            
264    /*     End of MINRES */    /*     End of MINRES */
265    return status;    return status;

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

  ViewVC Help
Powered by ViewVC 1.1.26