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

Krylov subspace methods – Preconditioned GMRes with safety net. More...

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

Go to the source code of this file.

Functions

INT fasp_solver_dcsr_spgmres (const dCSRmat *A, const dvector *b, dvector *x, precond *pc, const REAL tol, const INT MaxIt, SHORT restart, const SHORT StopType, const SHORT PrtLvl)
 Preconditioned GMRES method for solving Au=b with safe-guard. More...
 
INT fasp_solver_dbsr_spgmres (const dBSRmat *A, const dvector *b, dvector *x, precond *pc, const REAL tol, const INT MaxIt, SHORT restart, const SHORT StopType, const SHORT PrtLvl)
 Preconditioned GMRES method for solving Au=b with safe-guard. More...
 
INT fasp_solver_dblc_spgmres (const dBLCmat *A, const dvector *b, dvector *x, precond *pc, const REAL tol, const INT MaxIt, SHORT restart, const SHORT StopType, const SHORT PrtLvl)
 Preconditioned GMRES method for solving Au=b with safe-guard. More...
 
INT fasp_solver_dstr_spgmres (const dSTRmat *A, const dvector *b, dvector *x, precond *pc, const REAL tol, const INT MaxIt, SHORT restart, const SHORT StopType, const SHORT PrtLvl)
 Preconditioned GMRES method for solving Au=b with safe-guard. More...
 

Detailed Description

Krylov subspace methods – Preconditioned GMRes with safety net.

Note
This file contains Level-3 (Kry) functions. It requires: AuxArray.c, AuxMemory.c, AuxMessage.c, AuxVector.c, BlaArray.c, BlaSpmvBLC.c, BlaSpmvBSR.c, BlaSpmvCSR.c, and BlaSpmvSTR.c
See also pgmres.c for a variable restarting version.
The ‘best’ iterative solution will be saved and used upon exit; See KryPgmres.c for a version without safety net

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


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

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

TODO: Use one single function for all! –Chensong

Definition in file KrySPgmres.c.

Function Documentation

◆ fasp_solver_dblc_spgmres()

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

Preconditioned GMRES method for solving Au=b with safe-guard.

Parameters
APointer to dBLCmat: coefficient matrix
bPointer to dvector: right hand side
xPointer to dvector: unknowns
pcPointer to structure of precondition (precond)
tolTolerance for stopping
MaxItMaximal number of iterations
restartRestarting steps
StopTypeStopping criteria type
PrtLvlHow much information to print out
Returns
Iteration number if converges; ERROR otherwise.
Author
Chensong Zhang
Date
04/05/2013

Definition at line 752 of file KrySPgmres.c.

◆ fasp_solver_dbsr_spgmres()

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

Preconditioned GMRES method for solving Au=b with safe-guard.

Parameters
APointer to dBSRmat: coefficient matrix
bPointer to dvector: right hand side
xPointer to dvector: unknowns
pcPointer to structure of precondition (precond)
tolTolerance for stopping
MaxItMaximal number of iterations
restartRestarting steps
StopTypeStopping criteria type
PrtLvlHow much information to print out
Returns
Iteration number if converges; ERROR otherwise.
Author
Chensong Zhang
Date
04/05/2013

Definition at line 409 of file KrySPgmres.c.

◆ fasp_solver_dcsr_spgmres()

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

Preconditioned GMRES method for solving Au=b with safe-guard.

Parameters
APointer to dCSRmat: coefficient matrix
bPointer to dvector: right hand side
xPointer to dvector: unknowns
pcPointer to structure of precondition (precond)
tolTolerance for stopping
MaxItMaximal number of iterations
restartRestarting steps
StopTypeStopping criteria type
PrtLvlHow much information to print out
Returns
Iteration number if converges; ERROR otherwise.
Author
Chensong Zhang
Date
04/05/2013

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

Definition at line 66 of file KrySPgmres.c.

◆ fasp_solver_dstr_spgmres()

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

Preconditioned GMRES method for solving Au=b with safe-guard.

Parameters
APointer to dSTRmat: coefficient matrix
bPointer to dvector: right hand side
xPointer to dvector: unknowns
pcPointer to structure of precondition (precond)
tolTolerance for stopping
MaxItMaximal number of iterations
restartRestarting steps
StopTypeStopping criteria type
PrtLvlHow much information to print out
Returns
Iteration number if converges; ERROR otherwise.
Author
Chensong Zhang
Date
04/05/2013

Definition at line 1095 of file KrySPgmres.c.