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

Krylov subspace methods – Preconditioned CG 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_spcg (const dCSRmat *A, const dvector *b, dvector *u, precond *pc, const REAL tol, const INT MaxIt, const SHORT StopType, const SHORT PrtLvl)
 Preconditioned conjugate gradient method for solving Au=b with safety net. More...
 
INT fasp_solver_dblc_spcg (const dBLCmat *A, const dvector *b, dvector *u, precond *pc, const REAL tol, const INT MaxIt, const SHORT StopType, const SHORT PrtLvl)
 Preconditioned conjugate gradient method for solving Au=b with safety net. More...
 
INT fasp_solver_dstr_spcg (const dSTRmat *A, const dvector *b, dvector *u, precond *pc, const REAL tol, const INT MaxIt, const SHORT StopType, const SHORT PrtLvl)
 Preconditioned conjugate gradient method for solving Au=b with safety net. More...
 

Detailed Description

Krylov subspace methods – Preconditioned CG 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, BlaSpmvCSR.c, BlaSpmvSTR.c, and BlaVector.c
The ‘best’ iterative solution will be saved and used upon exit; See KryPcg.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 KrySPcg.c.

Function Documentation

◆ fasp_solver_dblc_spcg()

INT fasp_solver_dblc_spcg ( const dBLCmat A,
const dvector b,
dvector u,
precond pc,
const REAL  tol,
const INT  MaxIt,
const SHORT  StopType,
const SHORT  PrtLvl 
)

Preconditioned conjugate gradient method for solving Au=b with safety net.

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

Definition at line 393 of file KrySPcg.c.

◆ fasp_solver_dcsr_spcg()

INT fasp_solver_dcsr_spcg ( const dCSRmat A,
const dvector b,
dvector u,
precond pc,
const REAL  tol,
const INT  MaxIt,
const SHORT  StopType,
const SHORT  PrtLvl 
)

Preconditioned conjugate gradient method for solving Au=b with safety net.

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

Definition at line 60 of file KrySPcg.c.

◆ fasp_solver_dstr_spcg()

INT fasp_solver_dstr_spcg ( const dSTRmat A,
const dvector b,
dvector u,
precond pc,
const REAL  tol,
const INT  MaxIt,
const SHORT  StopType,
const SHORT  PrtLvl 
)

Preconditioned conjugate gradient method for solving Au=b with safety net.

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

Definition at line 726 of file KrySPcg.c.