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

revision 1476 by gross, Mon Apr 7 23:38:50 2008 UTC revision 1477 by gross, Tue Apr 8 01:50:17 2008 UTC
# Line 49  Line 49
49
50  #include "Common.h"  #include "Common.h"
51  #include "Solver.h"  #include "Solver.h"
52    #include "Util.h"
53  #ifdef _OPENMP  #ifdef _OPENMP
54  #include <omp.h>  #include <omp.h>
55  #endif  #endif
# Line 146  err_t Paso_Solver_NLGMRES( Line 147  err_t Paso_Solver_NLGMRES(
147                  /*                  /*
148                   *   Form and store the information for the new Givens rotation                   *   Form and store the information for the new Givens rotation
149                   */                   */
150                  ApplyGivensRotations(iter,&h[INDEX2(0,k-1,l)],c,s);                  ApplyGivensRotations(k,&h[INDEX2(0,k-1,l)],c,s);
151                  /*                  /*
152                   *  Don't divide by zero if solution has  been found                   *  Don't divide by zero if solution has  been found
153                   */                   */
# Line 174  printf("FGMRES step %d: error %e (tol=%d Line 175  printf("FGMRES step %d: error %e (tol=%d
175                g[i]-=h[INDEX2(j,i,l)]*g[j];                g[i]-=h[INDEX2(j,i,l)]*g[j];
176             }             }
177             g[i]/=h[INDEX2(i,i,l)];             g[i]/=h[INDEX2(i,i,l)];
178             Paso_Update(n,x[k],g[i],v[i]);             Paso_Update(n,1.,x,g[i],v[i]);
179        }        }
180   }   }
181   /*       /*

Legend:
 Removed from v.1476 changed lines Added in v.1477