Fast Auxiliary Space Preconditioning 2.7.7 Aug/28/2022
Loading...
Searching...
No Matches
KryPgmres.c File Reference

Krylov subspace methods – Right-preconditioned GMRes. More...

#include "fasp.h"
#include "fasp_functs.h"
#include <math.h>
#include "KryUtil.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 REAL abstol, const INT MaxIt, const SHORT restart, const SHORT StopType, const SHORT PrtLvl)
 Right 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 REAL abstol, const INT MaxIt, const SHORT restart, const SHORT StopType, const SHORT PrtLvl)
 Preconditioned GMRES method for solving Au=b. More...
 
INT fasp_solver_dblc_pgmres (dBLCmat *A, dvector *b, dvector *x, precond *pc, const REAL tol, const REAL abstol, const INT MaxIt, const SHORT restart, const SHORT StopType, 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 REAL abstol, const INT MaxIt, const SHORT restart, const SHORT StopType, const SHORT PrtLvl)
 Preconditioned GMRES method for solving Au=b. More...
 
INT fasp_solver_pgmres (mxv_matfree *mf, dvector *b, dvector *x, precond *pc, const REAL tol, const REAL abstol, const INT MaxIt, const SHORT restart, const SHORT StopType, const SHORT PrtLvl)
 Solve "Ax=b" using PGMRES (right preconditioned) iterative method. More...
 

Detailed Description

Krylov subspace methods – Right-preconditioned GMRes.

Note
This file contains Level-3 (Kry) functions. It requires: AuxArray.c, AuxMemory.c, AuxMessage.c, BlaArray.c, BlaSpmvBLC.c, BlaSpmvBSR.c, BlaSpmvCSR.c, and BlaSpmvSTR.c
See also KryPvgmres.c for a variable restarting version.
See KrySPgmres.c for a safer version

Reference: Y. Saad 2003 Iterative methods for sparse linear systems (2nd Edition), SIAM


Copyright (C) 2010–Present by the FASP team. All rights reserved.

Released under the terms of the GNU Lesser General Public License 3.0 or later.

Definition in file KryPgmres.c.

Function Documentation

◆ fasp_solver_dblc_pgmres()

INT fasp_solver_dblc_pgmres ( dBLCmat A,
dvector b,
dvector x,
precond pc,
const REAL  tol,
const REAL  abstol,
const INT  MaxIt,
const SHORT  restart,
const SHORT  StopType,
const SHORT  PrtLvl 
)

Preconditioned GMRES method for solving Au=b.

Parameters
APointer to dBLCmat: coefficient matrix
bPointer to dvector: right hand side
xPointer to dvector: unknowns
pcPointer to precond: structure of precondition
tolTolerance for relative residual
abstolTolerance for absolute residual
MaxItMaximal number of iterations
restartRestarting steps
StopTypeStopping 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 04/05/2013: add StopType and safe check

Definition at line 687 of file KryPgmres.c.

◆ fasp_solver_dbsr_pgmres()

INT fasp_solver_dbsr_pgmres ( dBSRmat A,
dvector b,
dvector x,
precond pc,
const REAL  tol,
const REAL  abstol,
const INT  MaxIt,
const SHORT  restart,
const SHORT  StopType,
const SHORT  PrtLvl 
)

Preconditioned GMRES method for solving Au=b.

Parameters
APointer to dBSRmat: coefficient matrix
bPointer to dvector: right hand side
xPointer to dvector: unknowns
pcPointer to precond: structure of precondition
tolTolerance for relative residual
abstolTolerance for absolute residual
MaxItMaximal number of iterations
restartRestarting steps
StopTypeStopping 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 04/05/2013: add StopType and safe check

Definition at line 376 of file KryPgmres.c.

◆ fasp_solver_dcsr_pgmres()

INT fasp_solver_dcsr_pgmres ( dCSRmat A,
dvector b,
dvector x,
precond pc,
const REAL  tol,
const REAL  abstol,
const INT  MaxIt,
const SHORT  restart,
const SHORT  StopType,
const SHORT  PrtLvl 
)

Right preconditioned GMRES method for solving Au=b.

Parameters
APointer to dCSRmat: coefficient matrix
bPointer to dvector: right hand side
xPointer to dvector: unknowns
pcPointer to precond: structure of precondition
tolTolerance for relative residual
abstolTolerance for absolute residual
MaxItMaximal number of iterations
restartRestarting steps
StopTypeStopping 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 04/05/2013: Add StopType and safe check Modified by Chunsheng Feng on 07/22/2013: Add adapt memory allocate Modified by Chensong Zhang on 09/21/2014: Add comments and reorganize code

Definition at line 66 of file KryPgmres.c.

◆ fasp_solver_dstr_pgmres()

INT fasp_solver_dstr_pgmres ( dSTRmat A,
dvector b,
dvector x,
precond pc,
const REAL  tol,
const REAL  abstol,
const INT  MaxIt,
const SHORT  restart,
const SHORT  StopType,
const SHORT  PrtLvl 
)

Preconditioned GMRES method for solving Au=b.

Parameters
APointer to dSTRmat: coefficient matrix
bPointer to dvector: right hand side
xPointer to dvector: unknowns
pcPointer to precond: structure of precondition
tolTolerance for relative residual
abstolTolerance for absolute residual
MaxItMaximal number of iterations
restartRestarting steps
StopTypeStopping 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 04/05/2013: add StopType and safe check

Definition at line 998 of file KryPgmres.c.

◆ fasp_solver_pgmres()

INT fasp_solver_pgmres ( mxv_matfree mf,
dvector b,
dvector x,
precond pc,
const REAL  tol,
const REAL  abstol,
const INT  MaxIt,
const SHORT  restart,
const SHORT  StopType,
const SHORT  PrtLvl 
)

Solve "Ax=b" using PGMRES (right preconditioned) iterative method.

Parameters
mfPointer to mxv_matfree: spmv operation
bPointer to dvector: right hand side
xPointer to dvector: unknowns
pcPointer to precond: structure of precondition
tolTolerance for relative residual
abstolTolerance for absolute residual
MaxItMaximal number of iterations
restartRestarting steps
StopTypeStopping criteria type – DOES not support this parameter
PrtLvlHow much information to print out
Returns
Iteration number if converges; ERROR otherwise.
Author
Zhiyang Zhou
Date
2010/11/28

Modified by Chunsheng Feng on 07/22/2013: Add adapt memory allocate

Definition at line 1309 of file KryPgmres.c.