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

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

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

trunk/esys2/paso/src/Solvers/BiCGStab.c revision 150 by jgs, Thu Sep 15 03:44:45 2005 UTC trunk/paso/src/Solvers/BiCGStab.c revision 633 by dhawcroft, Thu Mar 23 05:37:00 2006 UTC
# Line 1  Line 1 
1  /* $Id$ */  /* $Id$ */
2    
3  /*  /*
4    ********************************************************************************
5    *               Copyright   2006 by ACcESS MNRF                                *
6    *                                                                              *
7    *                 http://www.access.edu.au                                     *
8    *           Primary Business: Queensland, Australia                            *
9    *     Licensed under the Open Software License version 3.0             *
10    *        http://www.opensource.org/licenses/osl-3.0.php                        *
11    ********************************************************************************
12    */
13    
14    /*
15     Crude modifications and translations for Paso by Matt Davies and Lutz Gross     Crude modifications and translations for Paso by Matt Davies and Lutz Gross
16  */  */
17    
# Line 66  err_t Paso_Solver_BiCGStab( Line 77  err_t Paso_Solver_BiCGStab(
77      double * r,      double * r,
78      double * x,      double * x,
79      dim_t *iter,      dim_t *iter,
80      double * tolerance) {      double * tolerance,
81        Paso_Performance* pp) {
82    
83    
84    /* Local variables */    /* Local variables */
# Line 158  err_t Paso_Solver_BiCGStab( Line 170  err_t Paso_Solver_BiCGStab(
170      /*        Compute direction adjusting vector PHAT and scalar ALPHA. */      /*        Compute direction adjusting vector PHAT and scalar ALPHA. */
171        
172          Paso_Solver_solvePreconditioner(A,&phat[0], &p[0]);          Paso_Solver_solvePreconditioner(A,&phat[0], &p[0]);
173      Paso_SystemMatrix_MatrixVector(ONE, A, &phat[0],ZERO, &v[0]);      Paso_SystemMatrix_MatrixVector_CSR_OFFSET0(ONE, A, &phat[0],ZERO, &v[0]);
174        
175          #pragma omp for private(i0) reduction(+:sum_2) schedule(static)          #pragma omp for private(i0) reduction(+:sum_2) schedule(static)
176      for (i0 = 0; i0 < n; i0++) sum_2 += rtld[i0] * v[i0];      for (i0 = 0; i0 < n; i0++) sum_2 += rtld[i0] * v[i0];
# Line 182  err_t Paso_Solver_BiCGStab( Line 194  err_t Paso_Solver_BiCGStab(
194         } else {         } else {
195           /*           Compute stabilizer vector SHAT and scalar OMEGA. */           /*           Compute stabilizer vector SHAT and scalar OMEGA. */
196               Paso_Solver_solvePreconditioner(A,&shat[0], &s[0]);               Paso_Solver_solvePreconditioner(A,&shat[0], &s[0]);
197           Paso_SystemMatrix_MatrixVector(ONE, A, &shat[0],ZERO,&t[0]);           Paso_SystemMatrix_MatrixVector_CSR_OFFSET0(ONE, A, &shat[0],ZERO,&t[0]);
198        
199               #pragma omp for private(i0) reduction(+:omegaNumtr,omegaDenumtr) schedule(static)               #pragma omp for private(i0) reduction(+:omegaNumtr,omegaDenumtr) schedule(static)
200           for (i0 = 0; i0 < n; i0++) {           for (i0 = 0; i0 < n; i0++) {

Legend:
Removed from v.150  
changed lines
  Added in v.633

  ViewVC Help
Powered by ViewVC 1.1.26