![]() |
Fast Auxiliary Space Preconditioning 2.7.7 Aug/28/2022
|
Krylov subspace methods – Preconditioned CG. More...
Go to the source code of this file.
Functions | |
INT | fasp_solver_dcsr_pcg (dCSRmat *A, dvector *b, dvector *u, precond *pc, const REAL tol, const REAL abstol, const INT MaxIt, const SHORT StopType, const SHORT PrtLvl) |
Preconditioned conjugate gradient method for solving Au=b. More... | |
INT | fasp_solver_dbsr_pcg (dBSRmat *A, dvector *b, dvector *u, precond *pc, const REAL tol, const REAL abstol, const INT MaxIt, const SHORT StopType, const SHORT PrtLvl) |
Preconditioned conjugate gradient method for solving Au=b. More... | |
INT | fasp_solver_dblc_pcg (dBLCmat *A, dvector *b, dvector *u, precond *pc, const REAL tol, const REAL abstol, const INT MaxIt, const SHORT StopType, const SHORT PrtLvl) |
Preconditioned conjugate gradient method for solving Au=b. More... | |
INT | fasp_solver_dstr_pcg (dSTRmat *A, dvector *b, dvector *u, precond *pc, const REAL tol, const REAL abstol, const INT MaxIt, const SHORT StopType, const SHORT PrtLvl) |
Preconditioned conjugate gradient method for solving Au=b. More... | |
INT | fasp_solver_pcg (mxv_matfree *mf, dvector *b, dvector *u, precond *pc, const REAL tol, const REAL abstol, const INT MaxIt, const SHORT StopType, const SHORT PrtLvl) |
Krylov subspace methods – Preconditioned CG.
Reference: Y. Saad 2003 Iterative methods for sparse linear systems (2nd Edition), SIAM
Copyright (C) 2009–Present by the FASP team. All rights reserved.
Abstract algorithm
PCG method to solve A*x=b is to generate {x_k} to approximate x
Step 0. Given A, b, x_0, M
Step 1. Compute residual r_0 = b-A*x_0 and convergence check;
Step 2. Initialization z_0 = M^{-1}*r_0, p_0=z_0;
Step 3. Main loop ...
FOR k = 0:MaxIt
Convergence check: norm(r)/norm(b) < tol
Stagnation check:
Residual check:
Definition in file KryPcg.c.
INT fasp_solver_dblc_pcg | ( | dBLCmat * | A, |
dvector * | b, | ||
dvector * | u, | ||
precond * | pc, | ||
const REAL | tol, | ||
const REAL | abstol, | ||
const INT | MaxIt, | ||
const SHORT | StopType, | ||
const SHORT | PrtLvl | ||
) |
Preconditioned conjugate gradient method for solving Au=b.
A | Pointer to dBLCmat: coefficient matrix |
b | Pointer to dvector: right hand side |
u | Pointer to dvector: unknowns |
pc | Pointer to precond: structure of precondition |
tol | Tolerance for relative residual |
abstol | Tolerance for absolute residual |
MaxIt | Maximal number of iterations |
StopType | Stopping criteria type |
PrtLvl | How much information to print out |
Modified by Chensong Zhang on 03/28/2013
INT fasp_solver_dbsr_pcg | ( | dBSRmat * | A, |
dvector * | b, | ||
dvector * | u, | ||
precond * | pc, | ||
const REAL | tol, | ||
const REAL | abstol, | ||
const INT | MaxIt, | ||
const SHORT | StopType, | ||
const SHORT | PrtLvl | ||
) |
Preconditioned conjugate gradient method for solving Au=b.
A | Pointer to dBSRmat: coefficient matrix |
b | Pointer to dvector: right hand side |
u | Pointer to dvector: unknowns |
pc | Pointer to precond: structure of precondition |
tol | Tolerance for relative residual |
abstol | Tolerance for absolute residual |
MaxIt | Maximal number of iterations |
StopType | Stopping criteria type |
PrtLvl | How much information to print out |
INT fasp_solver_dcsr_pcg | ( | dCSRmat * | A, |
dvector * | b, | ||
dvector * | u, | ||
precond * | pc, | ||
const REAL | tol, | ||
const REAL | abstol, | ||
const INT | MaxIt, | ||
const SHORT | StopType, | ||
const SHORT | PrtLvl | ||
) |
Preconditioned conjugate gradient method for solving Au=b.
A | Pointer to dCSRmat: coefficient matrix |
b | Pointer to dvector: right hand side |
u | Pointer to dvector: unknowns |
pc | Pointer to precond: structure of precondition |
tol | Tolerance for relative residual |
abstol | Tolerance for absolute residual |
MaxIt | Maximal number of iterations |
StopType | Stopping criteria type |
PrtLvl | How much information to print out |
INT fasp_solver_dstr_pcg | ( | dSTRmat * | A, |
dvector * | b, | ||
dvector * | u, | ||
precond * | pc, | ||
const REAL | tol, | ||
const REAL | abstol, | ||
const INT | MaxIt, | ||
const SHORT | StopType, | ||
const SHORT | PrtLvl | ||
) |
Preconditioned conjugate gradient method for solving Au=b.
A | Pointer to dSTRmat: coefficient matrix |
b | Pointer to dvector: right hand side |
u | Pointer to dvector: unknowns |
pc | Pointer to precond: structure of precondition |
tol | Tolerance for relative residual |
abstol | Tolerance for absolute residual |
MaxIt | Maximal number of iterations |
StopType | Stopping criteria type |
PrtLvl | How much information to print out |
Modified by Chensong Zhang on 03/28/2013