Choral
|
CG LINEAR SOLVER = Conjugate Gradient More...
Functions/Subroutines | |
subroutine, public | cg (x, iter, res, b, A, tol, itmax, verb) |
Conjugate gradient (no preconditioning) More... | |
subroutine, public | pcg (x, iter, res, b, A, pc, tol, itmax, verb) |
Preconditioned conjugate gradient. More... | |
CG LINEAR SOLVER = Conjugate Gradient
Source = Youssef SAAD, Iterative methods for sparse linear system
https://www-users.cs.umn.edu/~saad/IterMethBook_2ndEd.pdf
subroutine, public cg_mod::cg | ( | real(rp), dimension(:), intent(inout) | x, |
integer, intent(out) | iter, | ||
real(rp), intent(out) | res, | ||
real(rp), dimension(:), intent(in) | b, | ||
procedure(rntorn) | A, | ||
real(rp), intent(in) | tol, | ||
integer, intent(in) | itmax, | ||
integer, intent(in) | verb | ||
) |
Conjugate gradient (no preconditioning)
for the linear system \( Ax = b\)
INPUT/OUTPUT :
OUTPUT :
INPUT :
Definition at line 60 of file cg_mod.f90.
subroutine, public cg_mod::pcg | ( | real(rp), dimension(:), intent(inout) | x, |
integer, intent(out) | iter, | ||
real(rp), intent(out) | res, | ||
real(rp), dimension(:), intent(in) | b, | ||
procedure(rntorn) | A, | ||
procedure(rntorn) | pc, | ||
real(rp), intent(in) | tol, | ||
integer, intent(in) | itmax, | ||
integer, intent(in) | verb | ||
) |
Preconditioned conjugate gradient.
for the linear system \( Ax = b\)
and for a preconditionner \( P \)
INPUT/OUTPUT :
OUTPUT :
INPUT :
Definition at line 155 of file cg_mod.f90.