/[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

revision 1028 by gross, Wed Mar 14 00:15:24 2007 UTC revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC
# Line 1  Line 1 
1    
2  /* $Id$ */  /* $Id$ */
3    
4  /*  /*******************************************************
5  ********************************************************************************   *
6  *               Copyright   2006 by ACcESS MNRF                                *   *           Copyright 2003-2007 by ACceSS MNRF
7  *                                                                              *   *       Copyright 2007 by University of Queensland
8  *                 http://www.access.edu.au                                     *   *
9  *           Primary Business: Queensland, Australia                            *   *                http://esscc.uq.edu.au
10  *     Licensed under the Open Software License version 3.0             *   *        Primary Business: Queensland, Australia
11  *        http://www.opensource.org/licenses/osl-3.0.php                        *   *  Licensed under the Open Software License version 3.0
12  ********************************************************************************   *     http://www.opensource.org/licenses/osl-3.0.php
13  */   *
14     *******************************************************/
15    
16  /*  /*
17     Crude modifications and translations for Paso by Matt Davies and Lutz Gross     Crude modifications and translations for Paso by Matt Davies and Lutz Gross
# Line 82  err_t Paso_Solver_BiCGStab( Line 84  err_t Paso_Solver_BiCGStab(
84    
85    
86    /* Local variables */    /* Local variables */
87    double *rtld=NULL,*p=NULL,*v=NULL,*t=NULL,*phat=NULL,*shat=NULL,*s=NULL;    double *rtld=NULL,*p=NULL,*v=NULL,*t=NULL,*phat=NULL,*shat=NULL,*s=NULL, *buf1=NULL, *buf0=NULL;
88    double beta,norm_of_residual,sum_1,sum_2,sum_3,sum_4,norm_of_residual_global;    double beta,norm_of_residual,sum_1,sum_2,sum_3,sum_4,norm_of_residual_global;
89    double alpha, omega, omegaNumtr, omegaDenumtr, rho, tol, rho1;    double alpha, omega, omegaNumtr, omegaDenumtr, rho, tol, rho1;
90    dim_t num_iter=0,maxit,num_iter_global;    dim_t num_iter=0,maxit,num_iter_global;
91    dim_t i0,n;    dim_t i0;
92    bool_t breakFlag=FALSE, maxIterFlag=FALSE, convergeFlag=FALSE;    bool_t breakFlag=FALSE, maxIterFlag=FALSE, convergeFlag=FALSE;
93    dim_t status = SOLVER_NO_ERROR;    dim_t status = SOLVER_NO_ERROR;
94    double *resid = tolerance;    double *resid = tolerance;
95    /* adapt original routine parameters */    dim_t n = Paso_SystemMatrix_getTotalNumRows(A);
   n = A->num_cols * A-> col_block_size;;  
96    
97    /* Executable Statements */    /* Executable Statements */
98    
# Line 103  err_t Paso_Solver_BiCGStab( Line 104  err_t Paso_Solver_BiCGStab(
104    phat=TMPMEMALLOC(n,double);    phat=TMPMEMALLOC(n,double);
105    shat=TMPMEMALLOC(n,double);    shat=TMPMEMALLOC(n,double);
106    s=TMPMEMALLOC(n,double);    s=TMPMEMALLOC(n,double);
   
107    /*     Test the input parameters. */    /*     Test the input parameters. */
108    
109    if (n < 0) {    if (n < 0) {
# Line 250  err_t Paso_Solver_BiCGStab( Line 250  err_t Paso_Solver_BiCGStab(
250    /*     End of BICGSTAB */    /*     End of BICGSTAB */
251    return status;    return status;
252  }  }
 /*  
  * $Log$  
  * Revision 1.2  2005/09/15 03:44:40  jgs  
  * Merge of development branch dev-02 back to main trunk on 2005-09-15  
  *  
  * Revision 1.1.2.1  2005/09/05 06:29:49  gross  
  * These files have been extracted from finley to define a stand alone libray for iterative  
  * linear solvers on the ALTIX. main entry through Paso_solve. this version compiles but  
  * has not been tested yet.  
  *  
  *  
  */  

Legend:
Removed from v.1028  
changed lines
  Added in v.1312

  ViewVC Help
Powered by ViewVC 1.1.26