Fast Auxiliary Space Preconditioning  1.8.4 Feb/15/2016
pbcgs.c File Reference

Krylov subspace methods – Preconditioned BiCGstab. More...

#include <math.h>
#include "fasp.h"
#include "fasp_functs.h"
#include "itsolver_util.inl"

Go to the source code of this file.

Functions

INT fasp_solver_dcsr_pbcgs (dCSRmat *A, dvector *b, dvector *u, precond *pc, const REAL tol, const INT MaxIt, const SHORT stop_type, const SHORT prtlvl)
 Preconditioned BiCGstab method for solving Au=b. More...
 
INT fasp_solver_dbsr_pbcgs (dBSRmat *A, dvector *b, dvector *u, precond *pc, const REAL tol, const INT MaxIt, const SHORT stop_type, const SHORT prtlvl)
 Preconditioned BiCGstab method for solving Au=b. More...
 
INT fasp_solver_bdcsr_pbcgs (block_dCSRmat *A, dvector *b, dvector *u, precond *pc, const REAL tol, const INT MaxIt, const SHORT stop_type, const SHORT prtlvl)
 A preconditioned BiCGstab method for solving Au=b. More...
 
INT fasp_solver_dstr_pbcgs (dSTRmat *A, dvector *b, dvector *u, precond *pc, const REAL tol, const INT MaxIt, const SHORT stop_type, const SHORT prtlvl)
 Preconditioned BiCGstab method for solving Au=b. More...
 

Detailed Description

Krylov subspace methods – Preconditioned BiCGstab.

Abstract algorithm

PBICGStab method to solve A*x=b is to generate {x_k} to approximate x

Note: We generate a series of {p_k} such that V_k=span{p_1,...,p_k}.

Step 0. Given A, b, x_0, M

Step 1. Compute residual r_0 = b-A*x_0 and convergence check;

Step 2. Initialization z_0 = M^{-1}*r_0, p_0=z_0;

Step 3. Main loop ...

FOR k = 0:MaxIt

  • get step size alpha = f(r_k,z_k,p_k);
  • update solution: x_{k+1} = x_k + alpha*p_k;
  • perform stagnation check;
  • update residual: r_{k+1} = r_k - alpha*(A*p_k);
  • perform residual check;
  • obtain p_{k+1} using {p_0, p_1, ... , p_k};
  • prepare for next iteration;
  • print the result of k-th iteration; END FOR

Convergence check: norm(r)/norm(b) < tol

Stagnation check:

  • IF norm(alpha*p_k)/norm(x_{k+1}) < tol_stag
    1. compute r=b-A*x_{k+1};
    2. convergence check;
    3. IF ( not converged & restart_number < Max_Stag_Check ) restart;
  • END IF

Residual check:

  • IF norm(r_{k+1})/norm(b) < tol
    1. compute the real residual r = b-A*x_{k+1};
    2. convergence check;
    3. IF ( not converged & restart_number < Max_Res_Check ) restart;
  • END IF
Note
Refer to Y. Saad 2003 Iterative methods for sparse linear systems (2nd Edition), SIAM
See spbcgs.c for a safer version

Definition in file pbcgs.c.

Function Documentation

INT fasp_solver_bdcsr_pbcgs ( block_dCSRmat A,
dvector b,
dvector u,
precond pc,
const REAL  tol,
const INT  MaxIt,
const SHORT  stop_type,
const SHORT  prtlvl 
)

A preconditioned BiCGstab method for solving Au=b.

Parameters
APointer to the coefficient matrix
bPointer to the dvector of right hand side
uPointer to the dvector of DOFs
pcPointer to precond: the structure of precondition
tolTolerance for stopping
MaxItMaximal number of iterations
stop_typeStopping criteria type
prtlvlHow much information to print out
Returns
Iteration number if converges; ERROR otherwise.
Author
Xiaozhe Hu
Date
05/24/2010

Rewritten by Chensong Zhang on 04/30/2012 Modified by Feiteng Huang on 06/01/2012: fix restart param-init Modified by Chensong Zhang on 03/31/2013

Definition at line 774 of file pbcgs.c.

INT fasp_solver_dbsr_pbcgs ( dBSRmat A,
dvector b,
dvector u,
precond pc,
const REAL  tol,
const INT  MaxIt,
const SHORT  stop_type,
const SHORT  prtlvl 
)

Preconditioned BiCGstab method for solving Au=b.

Parameters
APointer to the coefficient matrix
bPointer to the dvector of right hand side
uPointer to the dvector of DOFs
pcPointer to precond: the structure of precondition
tolTolerance for stopping
MaxItMaximal number of iterations
stop_typeStopping criteria type
prtlvlHow much information to print out
Returns
Iteration number if converges; ERROR otherwise.
Author
Chensong Zhang
Date
09/09/2009

Rewritten by Chensong Zhang on 04/30/2012 Modified by Feiteng Huang on 06/01/2012: fix restart param-init Modified by Chensong Zhang on 03/31/2013

Definition at line 431 of file pbcgs.c.

INT fasp_solver_dcsr_pbcgs ( dCSRmat A,
dvector b,
dvector u,
precond pc,
const REAL  tol,
const INT  MaxIt,
const SHORT  stop_type,
const SHORT  prtlvl 
)

Preconditioned BiCGstab method for solving Au=b.

Parameters
APointer to the coefficient matrix
bPointer to the dvector of right hand side
uPointer to the dvector of DOFs
pcPointer to precond: the structure of precondition
tolTolerance for stopping
MaxItMaximal number of iterations
stop_typeStopping criteria type
prtlvlHow much information to print out
Returns
Iteration number if converges; ERROR otherwise.
Author
Chensong Zhang
Date
09/09/2009

Rewritten by Chensong Zhang on 04/30/2012 Modified by Feiteng Huang on 06/01/2012: fix restart param-init Modified by Chensong Zhang on 03/31/2013

Definition at line 88 of file pbcgs.c.

INT fasp_solver_dstr_pbcgs ( dSTRmat A,
dvector b,
dvector u,
precond pc,
const REAL  tol,
const INT  MaxIt,
const SHORT  stop_type,
const SHORT  prtlvl 
)

Preconditioned BiCGstab method for solving Au=b.

Parameters
APointer to the coefficient matrix
bPointer to the dvector of right hand side
uPointer to the dvector of DOFs
pcPointer to precond: the structure of precondition
tolTolerance for stopping
MaxItMaximal number of iterations
stop_typeStopping criteria type
prtlvlHow much information to print out
Returns
Iteration number if converges; ERROR otherwise.
Author
Zhiyang Zhou
Date
04/25/2010

Rewritten by Chensong Zhang on 04/30/2012 Modified by Feiteng Huang on 06/01/2012: fix restart param-init Modified by Chensong Zhang on 03/31/2013

Definition at line 1117 of file pbcgs.c.