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

Krylov subspace methods – Right-preconditioned GMRes. 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_pgmres (dCSRmat *A, dvector *b, dvector *x, precond *pc, const REAL tol, const INT MaxIt, const SHORT restart, const SHORT stop_type, const SHORT prtlvl)
 Right preconditioned GMRES method for solving Au=b. More...
 
INT fasp_solver_bdcsr_pgmres (block_dCSRmat *A, dvector *b, dvector *x, precond *pc, const REAL tol, const INT MaxIt, const SHORT restart, const SHORT stop_type, const SHORT prtlvl)
 Preconditioned GMRES method for solving Au=b. More...
 
INT fasp_solver_dbsr_pgmres (dBSRmat *A, dvector *b, dvector *x, precond *pc, const REAL tol, const INT MaxIt, const SHORT restart, const SHORT stop_type, const SHORT prtlvl)
 Preconditioned GMRES method for solving Au=b. More...
 
INT fasp_solver_dstr_pgmres (dSTRmat *A, dvector *b, dvector *x, precond *pc, const REAL tol, const INT MaxIt, const SHORT restart, const SHORT stop_type, const SHORT prtlvl)
 Preconditioned GMRES method for solving Au=b. More...
 

Detailed Description

Krylov subspace methods – Right-preconditioned GMRes.

Note
Refer to Y. Saad 2003 Iterative methods for sparse linear systems (2nd Edition), SIAM
Four subroutines use the same algorithm for different matrix types!
See also pvgmres.c for a variable restarting version.
See spgmres.c for a safer version

Definition in file pgmres.c.

Function Documentation

INT fasp_solver_bdcsr_pgmres ( block_dCSRmat A,
dvector b,
dvector x,
precond pc,
const REAL  tol,
const INT  MaxIt,
const SHORT  restart,
const SHORT  stop_type,
const SHORT  prtlvl 
)

Preconditioned GMRES method for solving Au=b.

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

Modified by Chensong Zhang on 05/01/2012 Modified by Chensong Zhang on 04/05/2013: add stop_type and safe check

Definition at line 356 of file pgmres.c.

INT fasp_solver_dbsr_pgmres ( dBSRmat A,
dvector b,
dvector x,
precond pc,
const REAL  tol,
const INT  MaxIt,
const SHORT  restart,
const SHORT  stop_type,
const SHORT  prtlvl 
)

Preconditioned GMRES method for solving Au=b.

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

Modified by Chensong Zhang on 05/01/2012 Modified by Chensong Zhang on 04/05/2013: add stop_type and safe check

Definition at line 659 of file pgmres.c.

INT fasp_solver_dcsr_pgmres ( dCSRmat A,
dvector b,
dvector x,
precond pc,
const REAL  tol,
const INT  MaxIt,
const SHORT  restart,
const SHORT  stop_type,
const SHORT  prtlvl 
)

Right preconditioned GMRES method for solving Au=b.

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

Modified by Chensong Zhang on 05/01/2012 Modified by Chensong Zhang on 04/05/2013: Add stop_type and safe check Modified by Chunsheng Feng on 07/22/2013: Add adapt memory allocate Modified by Chensong Zhang on 07/30/2014: Make memory allocation size long int Modified by Chensong Zhang on 09/21/2014: Add comments and reorganize code

Definition at line 53 of file pgmres.c.

INT fasp_solver_dstr_pgmres ( dSTRmat A,
dvector b,
dvector x,
precond pc,
const REAL  tol,
const INT  MaxIt,
const SHORT  restart,
const SHORT  stop_type,
const SHORT  prtlvl 
)

Preconditioned GMRES method for solving Au=b.

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

Modified by Chensong Zhang on 05/01/2012 Modified by Chensong Zhang on 04/05/2013: add stop_type and safe check

Definition at line 963 of file pgmres.c.