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

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

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

trunk/paso/src/Solvers/GMRES.c revision 415 by gross, Wed Jan 4 05:37:33 2006 UTC trunk/paso/src/GMRES.c revision 700 by gross, Thu Apr 6 00:13:40 2006 UTC
# Line 1  Line 1 
1  /* $Id$ */  /* $Id$ */
2    
3    
4    /*
5    ********************************************************************************
6    *               Copyright   2006 by ACcESS MNRF                                *
7    *                                                                              *
8    *                 http://www.access.edu.au                                     *
9    *           Primary Business: Queensland, Australia                            *
10    *     Licensed under the Open Software License version 3.0             *
11    *        http://www.opensource.org/licenses/osl-3.0.php                        *
12    ********************************************************************************
13    */
14    
15  /*  /*
16  *  Purpose  *  Purpose
17  *  =======  *  =======
# Line 56  err_t Paso_Solver_GMRES( Line 68  err_t Paso_Solver_GMRES(
68      double * r,      double * r,
69      double * x,      double * x,
70      dim_t *iter,      dim_t *iter,
71      double * tolerance,dim_t Length_of_recursion,dim_t restart) {      double * tolerance,dim_t Length_of_recursion,dim_t restart,
72        Paso_Performance* pp) {
73    
74    /* Local variables */    /* Local variables */
75    
# Line 136  err_t Paso_Solver_GMRES( Line 149  err_t Paso_Solver_GMRES(
149           /***                                                                           /***                                                                
150           *** calculate new search direction P from R_PRES           *** calculate new search direction P from R_PRES
151           ***/           ***/
152             #pragma omp barrier
153           Paso_Solver_solvePreconditioner(A,&P_PRES[0][0], &R_PRES[0][0]);           Paso_Solver_solvePreconditioner(A,&P_PRES[0][0], &R_PRES[0][0]);
154           /***                                                                           /***                                                                
155           *** apply A to P to get AP           *** apply A to P to get AP
156           ***/           ***/
157             #pragma omp barrier
158       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]);
159           /***                                                                           /***                                                                
160           ***** 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 367  err_t Paso_Solver_GMRES(
367           /* this fixes a problem with the intel compiler */           /* this fixes a problem with the intel compiler */
368           #pragma omp master           #pragma omp master
369           P_PRES_dot_AP0=R_PRES_dot_P_PRES[0];           P_PRES_dot_AP0=R_PRES_dot_P_PRES[0];
          #pragma omp barrier  
370           /***   if sum_BREAKF is equal to zero a breakdown occurs.           /***   if sum_BREAKF is equal to zero a breakdown occurs.
371            ***   iteration procedure can be continued but R_PRES is not the            ***   iteration procedure can be continued but R_PRES is not the
372            ***   residual of X_PRES approximation.            ***   residual of X_PRES approximation.
373            ***/            ***/
374             #pragma omp barrier
375           sum_BREAKF=0.;           sum_BREAKF=0.;
376           for (i=0;i<order;++i) sum_BREAKF +=BREAKF[i];           for (i=0;i<order;++i) sum_BREAKF +=BREAKF[i];
377           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 578  err_t Paso_Solver_GMRES(
578    }    }
579    return Status;    return Status;
580  }  }
   

Legend:
Removed from v.415  
changed lines
  Added in v.700

  ViewVC Help
Powered by ViewVC 1.1.26