# Diff of /trunk/paso/src/Solvers/GMRES.c

revision 431 by gross, Wed Jan 4 05:37:33 2006 UTC revision 432 by gross, Fri Jan 13 07:38:54 2006 UTC
# Line 136  err_t Paso_Solver_GMRES( Line 136  err_t Paso_Solver_GMRES(
136           /***                                                                           /***
137           *** calculate new search direction P from R_PRES           *** calculate new search direction P from R_PRES
138           ***/           ***/
139             #pragma omp barrier
140           Paso_Solver_solvePreconditioner(A,&P_PRES[0][0], &R_PRES[0][0]);           Paso_Solver_solvePreconditioner(A,&P_PRES[0][0], &R_PRES[0][0]);
141           /***                                                                           /***
142           *** apply A to P to get AP           *** apply A to P to get AP
143           ***/           ***/
144             #pragma omp barrier
145       Paso_SystemMatrix_MatrixVector_CSR_OFFSET0(ONE, A, &P_PRES[0][0],ZERO, &AP[0]);       Paso_SystemMatrix_MatrixVector_CSR_OFFSET0(ONE, A, &P_PRES[0][0],ZERO, &AP[0]);
146           /***                                                                           /***
147           ***** calculation of the norm of R and the scalar products of                 ***** calculation of the norm of R and the scalar products of
# Line 352  err_t Paso_Solver_GMRES( Line 354  err_t Paso_Solver_GMRES(
354           /* this fixes a problem with the intel compiler */           /* this fixes a problem with the intel compiler */
355           #pragma omp master           #pragma omp master
356           P_PRES_dot_AP0=R_PRES_dot_P_PRES[0];           P_PRES_dot_AP0=R_PRES_dot_P_PRES[0];
#pragma omp barrier
357           /***   if sum_BREAKF is equal to zero a breakdown occurs.           /***   if sum_BREAKF is equal to zero a breakdown occurs.
358            ***   iteration procedure can be continued but R_PRES is not the            ***   iteration procedure can be continued but R_PRES is not the
359            ***   residual of X_PRES approximation.            ***   residual of X_PRES approximation.
360            ***/            ***/
361             #pragma omp barrier
362           sum_BREAKF=0.;           sum_BREAKF=0.;
363           for (i=0;i<order;++i) sum_BREAKF +=BREAKF[i];           for (i=0;i<order;++i) sum_BREAKF +=BREAKF[i];
364           breakFlag=!((ABS(P_PRES_dot_AP0) > ZERO) &&  (sum_BREAKF >ZERO));           breakFlag=!((ABS(P_PRES_dot_AP0) > ZERO) &&  (sum_BREAKF >ZERO));
# Line 563  err_t Paso_Solver_GMRES( Line 565  err_t Paso_Solver_GMRES(
565    }    }
566    return Status;    return Status;
567  }  }

Legend:
 Removed from v.431 changed lines Added in v.432