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

Krylov subspace methods – Preconditioned variable-restart 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_spvgmres (const dCSRmat *A, const dvector *b, dvector *x, precond *pc, const REAL tol, const INT MaxIt, SHORT restart, const SHORT StopType, const SHORT PrtLvl)
 Solve "Ax=b" using PGMRES(right preconditioned) iterative method in which the restart parameter can be adaptively modified during iteration. More...
 
INT fasp_solver_dbsr_spvgmres (const dBSRmat *A, const dvector *b, dvector *x, precond *pc, const REAL tol, const INT MaxIt, SHORT restart, const SHORT StopType, const SHORT PrtLvl)
 Solve "Ax=b" using PGMRES(right preconditioned) iterative method in which the restart parameter can be adaptively modified during iteration. More...
 
INT fasp_solver_dblc_spvgmres (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. More...
 
INT fasp_solver_dstr_spvgmres (const dSTRmat *A, const dvector *b, dvector *x, precond *pc, const REAL tol, const INT MaxIt, SHORT restart, const SHORT StopType, const SHORT PrtLvl)
 Solve "Ax=b" using PGMRES(right preconditioned) iterative method in which the restart parameter can be adaptively modified during iteration. More...
 

Detailed Description

Krylov subspace methods – Preconditioned variable-restart 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
The ‘best’ iterative solution will be saved and used upon exit; See KryPvgmres.c a version without safety net

Reference: A.H. Baker, E.R. Jessup, and Tz.V. Kolev A Simple Strategy for Varying the Restart Parameter in GMRES(m) Journal of Computational and Applied Mathematics, 230 (2009) pp. 751-761. UCRL-JRNL-235266.


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 KrySPvgmres.c.

Function Documentation

◆ fasp_solver_dblc_spvgmres()

INT fasp_solver_dblc_spvgmres ( 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.

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/06/2013

Definition at line 829 of file KrySPvgmres.c.

◆ fasp_solver_dbsr_spvgmres()

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

Solve "Ax=b" using PGMRES(right preconditioned) iterative method in which the restart parameter can be adaptively modified during iteration.

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/06/2013

Definition at line 449 of file KrySPvgmres.c.

◆ fasp_solver_dcsr_spvgmres()

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

Solve "Ax=b" using PGMRES(right preconditioned) iterative method in which the restart parameter can be adaptively modified during iteration.

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/06/2013

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

Definition at line 68 of file KrySPvgmres.c.

◆ fasp_solver_dstr_spvgmres()

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

Solve "Ax=b" using PGMRES(right preconditioned) iterative method in which the restart parameter can be adaptively modified during iteration.

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/06/2013

Definition at line 1210 of file KrySPvgmres.c.