Updated prologs for Krylov subspace methods.

psblas3-type-indexed
Salvatore Filippone 17 years ago
parent ea8ff0d764
commit 07790aab16

@ -60,21 +60,36 @@
! This subroutine implements the BiCG method.
!
! Arguments:
! a - type(<psb_dspmat_type>). The sparse matrix containing A.
! prec - type(<psb_prec_type>). The data structure containing the preconditioner.
! b - real,dimension(:). The right hand side.
! x - real,dimension(:). The vector of unknowns.
! eps - real. The error tolerance.
! desc_a - type(<psb_desc_type>). The communication descriptor.
! info - integer. Return code
! itmax - integer(optional). The maximum number of iterations.
! iter - integer(optional). The number of iterations performed.
! err - real(optional). The error on return.
! itrace - integer(optional). The unit to write messages onto.
! istop - integer(optional). The stopping criterium.
!
subroutine psb_dbicg(a,prec,b,x,eps,desc_a,info,&
&itmax,iter,err, itrace,istop)
! a - type(<psb_dspmat_type>) Input: sparse matrix containing A.
! prec - type(<psb_dprec_type>) Input: preconditioner
! b - real,dimension(:) Input: vector containing the
! right hand side B
! x - real,dimension(:) Input/Output: vector containing the
! initial guess and final solution X.
! eps - real Input: Stopping tolerance; the iteration is
! stopped when the error estimate
! |err| <= eps
! desc_a - type(<psb_desc_type>). Input: The communication descriptor.
! info - integer. Output: Return code
!
! itmax - integer(optional) Input: maximum number of iterations to be
! performed.
! iter - integer(optional) Output: how many iterations have been
! performed.
! err - real (optional) Output: error estimate on exit
! itrace - integer(optional) Input: print an informational message
! with the error estimate every itrace
! iterations
! istop - integer(optional) Input: stopping criterion, or how
! to estimate the error.
! 1: err = |r|/|b|
! 2: err = |r|/(|a||x|+|b|)
! where r is the (preconditioned, recursive
! estimate of) residual
!
!
subroutine psb_dbicg(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,istop)
use psb_base_mod
use psb_prec_mod
implicit none

@ -59,22 +59,38 @@
! Subroutine: psb_dcg
! This subroutine implements the Conjugate Gradient method.
!
!
! Arguments:
! a - type(<psb_dspmat_type>). The sparse matrix containing A.
! prec - type(<psb_prec_type>). The data structure containing the preconditioner.
! b - real,dimension(:). The right hand side.
! x - real,dimension(:). The vector of unknowns.
! eps - real. The error tolerance.
! desc_a - type(<psb_desc_type>). The communication descriptor.
! info - integer. Return code
! itmax - integer(optional). The maximum number of iterations.
! iter - integer(optional). The number of iterations performed.
! err - real(optional). The error on return.
! itrace - integer(optional). The unit to write messages onto.
! istop - integer(optional). The stopping criterium.
!
Subroutine psb_dcg(a,prec,b,x,eps,desc_a,info,&
&itmax,iter,err, itrace, istop)
! a - type(<psb_dspmat_type>) Input: sparse matrix containing A.
! prec - type(<psb_dprec_type>) Input: preconditioner
! b - real,dimension(:) Input: vector containing the
! right hand side B
! x - real,dimension(:) Input/Output: vector containing the
! initial guess and final solution X.
! eps - real Input: Stopping tolerance; the iteration is
! stopped when the error estimate
! |err| <= eps
! desc_a - type(<psb_desc_type>). Input: The communication descriptor.
! info - integer. Output: Return code
!
! itmax - integer(optional) Input: maximum number of iterations to be
! performed.
! iter - integer(optional) Output: how many iterations have been
! performed.
! err - real (optional) Output: error estimate on exit
! itrace - integer(optional) Input: print an informational message
! with the error estimate every itrace
! iterations
! istop - integer(optional) Input: stopping criterion, or how
! to estimate the error.
! 1: err = |r|/|b|
! 2: err = |r|/(|a||x|+|b|)
! where r is the (preconditioned, recursive
! estimate of) residual
!
!
Subroutine psb_dcg(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,istop)
use psb_base_mod
use psb_prec_mod
implicit none

@ -56,20 +56,39 @@
! File: psb_dcgs.f90
!
! Subroutine: psb_dcgs
! Implements the Conjugate Gradient Squared method.
!
!
! Arguments:
! a - type(<psb_dspmat_type>). The sparse matrix containing A.
! prec - type(<psb_prec_type>). The data structure containing the preconditioner.
! b - real,dimension(:). The right hand side.
! x - real,dimension(:). The vector of unknowns.
! eps - real. The error tolerance.
! desc_a - type(<psb_desc_type>). The communication descriptor.
! info - integer. Return code
! itmax - integer(optional). The maximum number of iterations.
! iter - integer(optional). The number of iterations performed.
! err - real(optional). The error on return.
! itrace - integer(optional). The unit to write messages onto.
! istop - integer(optional). The stopping criterium.
!
! a - type(<psb_dspmat_type>) Input: sparse matrix containing A.
! prec - type(<psb_dprec_type>) Input: preconditioner
! b - real,dimension(:) Input: vector containing the
! right hand side B
! x - real,dimension(:) Input/Output: vector containing the
! initial guess and final solution X.
! eps - real Input: Stopping tolerance; the iteration is
! stopped when the error estimate
! |err| <= eps
! desc_a - type(<psb_desc_type>). Input: The communication descriptor.
! info - integer. Output: Return code
!
! itmax - integer(optional) Input: maximum number of iterations to be
! performed.
! iter - integer(optional) Output: how many iterations have been
! performed.
! err - real (optional) Output: error estimate on exit
! itrace - integer(optional) Input: print an informational message
! with the error estimate every itrace
! iterations
! istop - integer(optional) Input: stopping criterion, or how
! to estimate the error.
! 1: err = |r|/|b|
! 2: err = |r|/(|a||x|+|b|)
! where r is the (preconditioned, recursive
! estimate of) residual
!
!
!
Subroutine psb_dcgs(a,prec,b,x,eps,desc_a,info,&
&itmax,iter,err,itrace,istop)

@ -56,24 +56,41 @@
! File: psb_dcgstab.f90
!
! Subroutine: psb_dcgstab
! This subroutine implements the CG Stabilized method.
! This subroutine implements the BiCG Stabilized method.
!
!
! Arguments:
! a - type(<psb_dspmat_type>). The sparse matrix containing A.
! prec - type(<psb_prec_type>). The data structure containing the preconditioner.
! b - real,dimension(:). The right hand side.
! x - real,dimension(:). The vector of unknowns.
! eps - real. The error tolerance.
! desc_a - type(<psb_desc_type>). The communication descriptor.
! info - integer. Return code
! itmax - integer(optional). The maximum number of iterations.
! iter - integer(optional). The number of iterations performed.
! err - real(optional). The error on return.
! itrace - integer(optional). The unit to write messages onto.
! istop - integer(optional). The stopping criterium.
!
Subroutine psb_dcgstab(a,prec,b,x,eps,desc_a,info,&
&itmax,iter,err,itrace, istop)
! a - type(<psb_dspmat_type>) Input: sparse matrix containing A.
! prec - type(<psb_dprec_type>) Input: preconditioner
! b - real,dimension(:) Input: vector containing the
! right hand side B
! x - real,dimension(:) Input/Output: vector containing the
! initial guess and final solution X.
! eps - real Input: Stopping tolerance; the iteration is
! stopped when the error estimate
! |err| <= eps
! desc_a - type(<psb_desc_type>). Input: The communication descriptor.
! info - integer. Output: Return code
!
! itmax - integer(optional) Input: maximum number of iterations to be
! performed.
! iter - integer(optional) Output: how many iterations have been
! performed.
! err - real (optional) Output: error estimate on exit
! itrace - integer(optional) Input: print an informational message
! with the error estimate every itrace
! iterations
! istop - integer(optional) Input: stopping criterion, or how
! to estimate the error.
! 1: err = |r|/|b|
! 2: err = |r|/(|a||x|+|b|)
! where r is the (preconditioned, recursive
! estimate of) residual
!
!
!
Subroutine psb_dcgstab(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,istop)
use psb_base_mod
use psb_prec_mod
Implicit None

@ -63,23 +63,43 @@
! File: psb_dcgstabl.f90
!
! Subroutine: psb_dcgstabl
! Implements the BICGSTAB(L) method
!
!
! Arguments:
! a - type(<psb_dspmat_type>). The sparse matrix containing A.
! prec - type(<psb_prec_type>). The data structure containing the preconditioner.
! b - real,dimension(:). The right hand side.
! x - real,dimension(:). The vector of unknowns.
! eps - real. The error tolerance.
! desc_a - type(<psb_desc_type>). The communication descriptor.
! info - integer. Return code
! itmax - integer(optional). The maximum number of iterations.
! iter - integer(optional). The number of iterations performed.
! err - real(optional). The error on return.
! itrace - integer(optional). The unit to write messages onto.
! istop - integer(optional). The stopping criterium.
!
Subroutine psb_dcgstabl(a,prec,b,x,eps,desc_a,info,&
&itmax,iter,err,itrace,irst,istop)
! a - type(<psb_dspmat_type>) Input: sparse matrix containing A.
! prec - type(<psb_dprec_type>) Input: preconditioner
! b - real,dimension(:) Input: vector containing the
! right hand side B
! x - real,dimension(:) Input/Output: vector containing the
! initial guess and final solution X.
! eps - real Input: Stopping tolerance; the iteration is
! stopped when the error estimate
! |err| <= eps
! desc_a - type(<psb_desc_type>). Input: The communication descriptor.
! info - integer. Output: Return code
!
! itmax - integer(optional) Input: maximum number of iterations to be
! performed.
! iter - integer(optional) Output: how many iterations have been
! performed.
! err - real (optional) Output: error estimate on exit
! itrace - integer(optional) Input: print an informational message
! with the error estimate every itrace
! iterations
! irst - integer(optional) Input: restart parameter L
!
! istop - integer(optional) Input: stopping criterion, or how
! to estimate the error.
! 1: err = |r|/|b|
! 2: err = |r|/(|a||x|+|b|)
! where r is the (preconditioned, recursive
! estimate of) residual
!
!
!
Subroutine psb_dcgstabl(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,irst,istop)
use psb_base_mod
use psb_prec_mod
implicit none

@ -70,23 +70,39 @@
! This subroutine implements the restarted GMRES method with right
! preconditioning.
!
!
! Arguments:
! a - type(<psb_dspmat_type>). The sparse matrix containing A.
! prec - type(<psb_prec_type>). The data structure containing the preconditioner.
! b - real,dimension(:). The right hand side.
! x - real,dimension(:). The vector of unknowns.
! eps - real. The error tolerance.
! desc_a - type(<psb_desc_type>). The communication descriptor.
! info - integer. Return code
! itmax - integer(optional). The maximum number of iterations.
! iter - integer(optional). The number of iterations performed.
! err - real(optional). The error on return.
! itrace - integer(optional). The unit to write messages onto.
! irst - integer(optional). The restart value.
! istop - integer(optional). The stopping criterium.
!
Subroutine psb_dgmresr(a,prec,b,x,eps,desc_a,info,&
&itmax,iter,err,itrace,irst,istop)
! a - type(<psb_dspmat_type>) Input: sparse matrix containing A.
! prec - type(<psb_dprec_type>) Input: preconditioner
! b - real,dimension(:) Input: vector containing the
! right hand side B
! x - real,dimension(:) Input/Output: vector containing the
! initial guess and final solution X.
! eps - real Input: Stopping tolerance; the iteration is
! stopped when the error estimate
! |err| <= eps
! desc_a - type(<psb_desc_type>). Input: The communication descriptor.
! info - integer. Output: Return code
!
! itmax - integer(optional) Input: maximum number of iterations to be
! performed.
! iter - integer(optional) Output: how many iterations have been
! performed.
! err - real (optional) Output: error estimate on exit
! itrace - integer(optional) Input: print an informational message
! with the error estimate every itrace
! iterations
! irst - integer(optional) Input: restart parameter
!
! istop - integer(optional) Input: stopping criterion, or how
! to estimate the error.
! 1: err = |r|/|b|
! 2: err = |r|/(|a||x|+|b|)
! where r is the (preconditioned, recursive
! estimate of) residual
!
Subroutine psb_dgmresr(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,irst,istop)
use psb_base_mod
use psb_prec_mod
implicit none

@ -189,7 +189,52 @@ Module psb_krylov_mod
end interface
contains
!
! File: psb_krylov_mod.f90
!
! Subroutine: psb_dkrylov
!
! Front-end for the Krylov subspace iterations, real version
!
! Arguments:
!
! methd - character The specific method; can take the values:
! CG
! CGS
! BICG
! BICGSTAB
! BICGSTABL
! RGMRES
!
! a - type(<psb_dspmat_type>) Input: sparse matrix containing A.
! prec - type(<psb_dprec_type>) Input: preconditioner
! b - real,dimension(:) Input: vector containing the
! right hand side B
! x - real,dimension(:) Input/Output: vector containing the
! initial guess and final solution X.
! eps - real Input: Stopping tolerance; the iteration is
! stopped when the error estimate
! |err| <= eps
! desc_a - type(<psb_desc_type>). Input: The communication descriptor.
! info - integer. Output: Return code
!
! itmax - integer(optional) Input: maximum number of iterations to be
! performed.
! iter - integer(optional) Output: how many iterations have been
! performed.
! err - real (optional) Output: error estimate on exit
! itrace - integer(optional) Input: print an informational message
! with the error estimate every itrace
! iterations
! irst - integer(optional) Input: restart parameter for RGMRES and
! BICGSTAB(L) methods
! istop - integer(optional) Input: stopping criterion, or how
! to estimate the error.
! 1: err = |r|/|b|
! 2: err = |r|/(|a||x|+|b|)
! where r is the (preconditioned, recursive
! estimate of) residual
!
Subroutine psb_dkrylov(method,a,prec,b,x,eps,desc_a,info,&
&itmax,iter,err,itrace,irst,istop)
@ -265,6 +310,49 @@ contains
end subroutine psb_dkrylov
!
! File: psb_krylov_mod.f90
!
! Subroutine: psb_zkrylov
!
! Front-end for the Krylov subspace iterations, complexversion
!
! Arguments:
!
! methd - character The specific method; can take the values:
! CGS
! BICGSTAB
! RGMRES
!
! a - type(<psb_zspmat_type>) Input: sparse matrix containing A.
! prec - type(<psb_zprec_type>) Input: preconditioner
! b - complex,dimension(:) Input: vector containing the
! right hand side B
! x - complex,dimension(:) Input/Output: vector containing the
! initial guess and final solution X.
! eps - real Input: Stopping tolerance; the iteration is
! stopped when the error estimate
! |err| <= eps
! desc_a - type(<psb_desc_type>). Input: The communication descriptor.
! info - integer. Output: Return code
!
! itmax - integer(optional) Input: maximum number of iterations to be
! performed.
! iter - integer(optional) Output: how many iterations have been
! performed.
! err - real (optional) Output: error estimate on exit
! itrace - integer(optional) Input: print an informational message
! with the error estimate every itrace
! iterations
! irst - integer(optional) Input: restart parameter for RGMRES and
! BICGSTAB(L) methods
! istop - integer(optional) Input: stopping criterion, or how
! to estimate the error.
! 1: err = |r|/|b|
! 2: err = |r|/(|a||x|+|b|)
! where r is the (preconditioned, recursive
! estimate of) residual
!
Subroutine psb_zkrylov(method,a,prec,b,x,eps,desc_a,info,&
&itmax,iter,err,itrace,irst,istop)
use psb_base_mod

@ -56,23 +56,43 @@
! File: psb_zcgs.f90
!
! Subroutine: psb_zcgs
! Implements the Conjugate Gradient Squared method.
!
! Arguments:
! a - type(<psb_zspmat_type>). The sparse matrix containing A.
! prec - type(<psb_prec_type>). The data structure containing the preconditioner.
! b - real,dimension(:). The right hand side.
! x - real,dimension(:). The vector of unknowns.
! eps - real. The error tolerance.
! desc_a - type(<psb_desc_type>). The communication descriptor.
! info - integer. Return code
! itmax - integer(optional). The maximum number of iterations.
! iter - integer(optional). The number of iterations performed.
! err - real(optional). The error on return.
! itrace - integer(optional). The unit to write messages onto.
! istop - integer(optional). The stopping criterium.
!
Subroutine psb_zcgs(a,prec,b,x,eps,desc_a,info,&
&itmax,iter,err,itrace,istop)
! methd - character The specific method; can take the values:
! CGS
! BICGSTAB
! RGMRES
!
! a - type(<psb_zspmat_type>) Input: sparse matrix containing A.
! prec - type(<psb_zprec_type>) Input: preconditioner
! b - complex,dimension(:) Input: vector containing the
! right hand side B
! x - complex,dimension(:) Input/Output: vector containing the
! initial guess and final solution X.
! eps - real Input: Stopping tolerance; the iteration is
! stopped when the error estimate
! |err| <= eps
! desc_a - type(<psb_desc_type>). Input: The communication descriptor.
! info - integer. Output: Return code
!
! itmax - integer(optional) Input: maximum number of iterations to be
! performed.
! iter - integer(optional) Output: how many iterations have been
! performed.
! err - real (optional) Output: error estimate on exit
! itrace - integer(optional) Input: print an informational message
! with the error estimate every itrace
! iterations
! istop - integer(optional) Input: stopping criterion, or how
! to estimate the error.
! 1: err = |r|/|b|
! 2: err = |r|/(|a||x|+|b|)
! where r is the (preconditioned, recursive
! estimate of) residual
!
Subroutine psb_zcgs(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,istop)
use psb_base_mod
use psb_prec_mod
implicit none

@ -56,25 +56,44 @@
! File: psb_zcgstab.f90
!
! Subroutine: psb_zcgstab
! This subroutine implements the CG Stabilized method.
! This subroutine implements the BiCG Stabilized method.
!
!
! Arguments:
! a - type(<psb_zspmat_type>). The sparse matrix containing A.
! prec - type(<psb_prec_type>). The data structure containing the
! preconditioner.
! b - real,dimension(:). The right hand side.
! x - real,dimension(:). The vector of unknowns.
! eps - real. The error tolerance.
! desc_a - type(<psb_desc_type>). The communication descriptor.
! info - integer. Return code
! itmax - integer(optional). The maximum number of iterations.
! iter - integer(optional). The number of iterations performed.
! err - real(optional). The error on return.
! itrace - integer(optional). The unit to write messages onto.
! istop - integer(optional). The stopping criterium.
!
Subroutine psb_zcgstab(a,prec,b,x,eps,desc_a,info,&
&itmax,iter,err,itrace, istop)
! methd - character The specific method; can take the values:
! CGS
! BICGSTAB
! RGMRES
!
! a - type(<psb_zspmat_type>) Input: sparse matrix containing A.
! prec - type(<psb_zprec_type>) Input: preconditioner
! b - complex,dimension(:) Input: vector containing the
! right hand side B
! x - complex,dimension(:) Input/Output: vector containing the
! initial guess and final solution X.
! eps - real Input: Stopping tolerance; the iteration is
! stopped when the error estimate
! |err| <= eps
! desc_a - type(<psb_desc_type>). Input: The communication descriptor.
! info - integer. Output: Return code
!
! itmax - integer(optional) Input: maximum number of iterations to be
! performed.
! iter - integer(optional) Output: how many iterations have been
! performed.
! err - real (optional) Output: error estimate on exit
! itrace - integer(optional) Input: print an informational message
! with the error estimate every itrace
! iterations
! istop - integer(optional) Input: stopping criterion, or how
! to estimate the error.
! 1: err = |r|/|b|
! 2: err = |r|/(|a||x|+|b|)
! where r is the (preconditioned, recursive
! estimate of) residual
!
Subroutine psb_zcgstab(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,istop)
use psb_base_mod
use psb_prec_mod
Implicit None

@ -71,22 +71,42 @@
! preconditioning.
!
! Arguments:
! a - type(<psb_dspmat_type>). The sparse matrix containing A.
! prec - type(<psb_prec_type>). The data structure containing the preconditioner.
! b - real,dimension(:). The right hand side.
! x - real,dimension(:). The vector of unknowns.
! eps - real. The error tolerance.
! desc_a - type(<psb_desc_type>). The communication descriptor.
! info - integer. Return code
! itmax - integer(optional). The maximum number of iterations.
! iter - integer(optional). The number of iterations performed.
! err - real(optional). The error on return.
! itrace - integer(optional). The unit to write messages onto.
! irst - integer(optional). The restart value.
! istop - integer(optional). The stopping criterium.
!
Subroutine psb_zgmresr(a,prec,b,x,eps,desc_a,info,&
& itmax,iter,err,itrace,irst,istop)
!
! methd - character The specific method; can take the values:
! CGS
! BICGSTAB
! RGMRES
!
! a - type(<psb_zspmat_type>) Input: sparse matrix containing A.
! prec - type(<psb_zprec_type>) Input: preconditioner
! b - complex,dimension(:) Input: vector containing the
! right hand side B
! x - complex,dimension(:) Input/Output: vector containing the
! initial guess and final solution X.
! eps - real Input: Stopping tolerance; the iteration is
! stopped when the error estimate
! |err| <= eps
! desc_a - type(<psb_desc_type>). Input: The communication descriptor.
! info - integer. Output: Return code
!
! itmax - integer(optional) Input: maximum number of iterations to be
! performed.
! iter - integer(optional) Output: how many iterations have been
! performed.
! err - real (optional) Output: error estimate on exit
! itrace - integer(optional) Input: print an informational message
! with the error estimate every itrace
! iterations
! irst - integer(optional) Input: restart parameter
!
! istop - integer(optional) Input: stopping criterion, or how
! to estimate the error.
! 1: err = |r|/|b|
! 2: err = |r|/(|a||x|+|b|)
! where r is the (preconditioned, recursive
! estimate of) residual
!
Subroutine psb_zgmresr(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,irst,istop)
use psb_base_mod
use psb_prec_mod
implicit none

Loading…
Cancel
Save