mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-06 14:44:55 +00:00
Updated README. Fixed some details of examples.
This commit is contained in:
@@ -1,7 +1,22 @@
|
||||
This directory contains the MLD2P4 set of preconditioners, version 2.0
|
||||
This directory contains the MLD2P4 set of preconditioners, version 2.1
|
||||
|
||||
WHAT'S NEW
|
||||
|
||||
Version 2.1
|
||||
1. The multigrid preconditioner now include fully general V- and W-
|
||||
cycles. We also support K-cycles, intended to be used in
|
||||
conjunction with Flexible CG available in PSBLAS 3.5.
|
||||
2. The smoothers now include popular
|
||||
variants such as Jacobi, forward and backward hybrid
|
||||
Gauss-Seidel (intra-process Gauss-Seidel, inter-process
|
||||
block-Jacobi).
|
||||
3. The PRE and POST specification for smoothers can now be
|
||||
specified independently of each other: you can even specify
|
||||
different smoothers for PRE and POST (e.g. forward Gauss-Seidel
|
||||
PRE with backward Gauss-Seidel POST). The default is to
|
||||
have the specs apply to both PRE and POST.
|
||||
|
||||
|
||||
Version 2.0.
|
||||
|
||||
Finally moved to F2003, with the support of PSBLAS3.
|
||||
|
||||
@@ -89,7 +89,6 @@ program mld_cexample_1lev
|
||||
real(psb_dpk_) :: t1, t2, tprec
|
||||
character(len=20) :: name
|
||||
integer, parameter :: iunit=12
|
||||
type(psb_c_vect_type) :: x_col, r_col
|
||||
|
||||
! initialize the parallel environment
|
||||
|
||||
@@ -263,9 +262,9 @@ program mld_cexample_1lev
|
||||
write(*,'("Total memory occupation for PREC : ",i12)')precsize
|
||||
end if
|
||||
|
||||
call psb_gather(x_glob,x_col,desc_a,info,root=psb_root_)
|
||||
call psb_gather(x_glob,x,desc_a,info,root=psb_root_)
|
||||
if (info == psb_success_) &
|
||||
& call psb_gather(r_glob,r_col,desc_a,info,root=psb_root_)
|
||||
& call psb_gather(r_glob,r,desc_a,info,root=psb_root_)
|
||||
if (info /= psb_success_) goto 9999
|
||||
if (iam == psb_root_) then
|
||||
write(0,'(" ")')
|
||||
|
||||
@@ -89,7 +89,6 @@ program mld_dexample_1lev
|
||||
real(psb_dpk_) :: t1, t2, tprec
|
||||
character(len=20) :: name
|
||||
integer, parameter :: iunit=12
|
||||
type(psb_d_vect_type) :: x_col, r_col
|
||||
|
||||
! initialize the parallel environment
|
||||
|
||||
@@ -263,9 +262,9 @@ program mld_dexample_1lev
|
||||
write(*,'("Total memory occupation for PREC : ",i12)')precsize
|
||||
end if
|
||||
|
||||
call psb_gather(x_glob,x_col,desc_a,info,root=psb_root_)
|
||||
call psb_gather(x_glob,x,desc_a,info,root=psb_root_)
|
||||
if (info == psb_success_) &
|
||||
& call psb_gather(r_glob,r_col,desc_a,info,root=psb_root_)
|
||||
& call psb_gather(r_glob,r,desc_a,info,root=psb_root_)
|
||||
if (info /= psb_success_) goto 9999
|
||||
if (iam == psb_root_) then
|
||||
write(0,'(" ")')
|
||||
|
||||
@@ -89,7 +89,6 @@ program mld_sexample_1lev
|
||||
real(psb_dpk_) :: t1, t2, tprec
|
||||
character(len=20) :: name
|
||||
integer, parameter :: iunit=12
|
||||
type(psb_s_vect_type) :: x_col, r_col
|
||||
|
||||
! initialize the parallel environment
|
||||
|
||||
@@ -263,9 +262,9 @@ program mld_sexample_1lev
|
||||
write(*,'("Total memory occupation for PREC : ",i12)')precsize
|
||||
end if
|
||||
|
||||
call psb_gather(x_glob,x_col,desc_a,info,root=psb_root_)
|
||||
call psb_gather(x_glob,x,desc_a,info,root=psb_root_)
|
||||
if (info == psb_success_) &
|
||||
& call psb_gather(r_glob,r_col,desc_a,info,root=psb_root_)
|
||||
& call psb_gather(r_glob,r,desc_a,info,root=psb_root_)
|
||||
if (info /= psb_success_) goto 9999
|
||||
if (iam == psb_root_) then
|
||||
write(0,'(" ")')
|
||||
|
||||
@@ -89,7 +89,6 @@ program mld_zexample_1lev
|
||||
real(psb_dpk_) :: t1, t2, tprec
|
||||
character(len=20) :: name
|
||||
integer, parameter :: iunit=12
|
||||
type(psb_z_vect_type) :: x_col, r_col
|
||||
|
||||
! initialize the parallel environment
|
||||
|
||||
@@ -263,9 +262,9 @@ program mld_zexample_1lev
|
||||
write(*,'("Total memory occupation for PREC : ",i12)')precsize
|
||||
end if
|
||||
|
||||
call psb_gather(x_glob,x_col,desc_a,info,root=psb_root_)
|
||||
call psb_gather(x_glob,x,desc_a,info,root=psb_root_)
|
||||
if (info == psb_success_) &
|
||||
& call psb_gather(r_glob,r_col,desc_a,info,root=psb_root_)
|
||||
& call psb_gather(r_glob,r,desc_a,info,root=psb_root_)
|
||||
if (info /= psb_success_) goto 9999
|
||||
if (iam == psb_root_) then
|
||||
write(0,'(" ")')
|
||||
|
||||
@@ -68,43 +68,43 @@ contains
|
||||
use psb_base_mod, only : psb_dpk_, done
|
||||
real(psb_dpk_) :: b1
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
b1=done/sqrt(3.d0)
|
||||
b1=dzero
|
||||
end function b1
|
||||
function b2(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_, done
|
||||
real(psb_dpk_) :: b2
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
b2=done/sqrt(3.d0)
|
||||
b2=dzero
|
||||
end function b2
|
||||
function b3(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_, done
|
||||
real(psb_dpk_) :: b3
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
b3=done/sqrt(3.d0)
|
||||
b3=dzero
|
||||
end function b3
|
||||
function c(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_, done
|
||||
real(psb_dpk_) :: c
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
c=0.d0
|
||||
c=dzero
|
||||
end function c
|
||||
function a1(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_, done
|
||||
real(psb_dpk_) :: a1
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
a1=done/80
|
||||
a1=done
|
||||
end function a1
|
||||
function a2(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_, done
|
||||
real(psb_dpk_) :: a2
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
a2=done/80
|
||||
a2=done
|
||||
end function a2
|
||||
function a3(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_, done
|
||||
real(psb_dpk_) :: a3
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
a3=done/80
|
||||
a3=done
|
||||
end function a3
|
||||
function g(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_, done, dzero
|
||||
|
||||
@@ -86,43 +86,43 @@ contains
|
||||
use psb_base_mod, only : psb_dpk_, done
|
||||
real(psb_dpk_) :: b1
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
b1=done/sqrt(3.d0)
|
||||
b1=dzero
|
||||
end function b1
|
||||
function b2(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_, done
|
||||
real(psb_dpk_) :: b2
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
b2=done/sqrt(3.d0)
|
||||
b2=dzero
|
||||
end function b2
|
||||
function b3(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_, done
|
||||
real(psb_dpk_) :: b3
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
b3=done/sqrt(3.d0)
|
||||
b3=dzero
|
||||
end function b3
|
||||
function c(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_, done
|
||||
real(psb_dpk_) :: c
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
c=0.d0
|
||||
c=dzero
|
||||
end function c
|
||||
function a1(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_, done
|
||||
real(psb_dpk_) :: a1
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
a1=done/80
|
||||
a1=done
|
||||
end function a1
|
||||
function a2(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_, done
|
||||
real(psb_dpk_) :: a2
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
a2=done/80
|
||||
a2=done
|
||||
end function a2
|
||||
function a3(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_, done
|
||||
real(psb_dpk_) :: a3
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
a3=done/80
|
||||
a3=done
|
||||
end function a3
|
||||
function g(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_, done, dzero
|
||||
|
||||
@@ -68,43 +68,43 @@ contains
|
||||
use psb_base_mod, only : psb_spk_, sone
|
||||
real(psb_spk_) :: b1
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
b1=sone/sqrt(3.d0)
|
||||
b1=szero
|
||||
end function b1
|
||||
function b2(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_, sone
|
||||
real(psb_spk_) :: b2
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
b2=sone/sqrt(3.d0)
|
||||
b2=szero
|
||||
end function b2
|
||||
function b3(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_, sone
|
||||
real(psb_spk_) :: b3
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
b3=sone/sqrt(3.d0)
|
||||
b3=szero
|
||||
end function b3
|
||||
function c(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_, sone
|
||||
real(psb_spk_) :: c
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
c=0.d0
|
||||
c=szero
|
||||
end function c
|
||||
function a1(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_, sone
|
||||
real(psb_spk_) :: a1
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
a1=sone/80
|
||||
a1=sone
|
||||
end function a1
|
||||
function a2(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_, sone
|
||||
real(psb_spk_) :: a2
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
a2=sone/80
|
||||
a2=sone
|
||||
end function a2
|
||||
function a3(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_, sone
|
||||
real(psb_spk_) :: a3
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
a3=sone/80
|
||||
a3=sone
|
||||
end function a3
|
||||
function g(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_, sone, szero
|
||||
|
||||
@@ -86,43 +86,43 @@ contains
|
||||
use psb_base_mod, only : psb_spk_, sone
|
||||
real(psb_spk_) :: b1
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
b1=sone/sqrt(3.d0)
|
||||
b1=szero
|
||||
end function b1
|
||||
function b2(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_, sone
|
||||
real(psb_spk_) :: b2
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
b2=sone/sqrt(3.d0)
|
||||
b2=szero
|
||||
end function b2
|
||||
function b3(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_, sone
|
||||
real(psb_spk_) :: b3
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
b3=sone/sqrt(3.d0)
|
||||
b3=szero
|
||||
end function b3
|
||||
function c(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_, sone
|
||||
real(psb_spk_) :: c
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
c=0.d0
|
||||
c=szero
|
||||
end function c
|
||||
function a1(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_, sone
|
||||
real(psb_spk_) :: a1
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
a1=sone/80
|
||||
a1=sone
|
||||
end function a1
|
||||
function a2(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_, sone
|
||||
real(psb_spk_) :: a2
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
a2=sone/80
|
||||
a2=sone
|
||||
end function a2
|
||||
function a3(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_, sone
|
||||
real(psb_spk_) :: a3
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
a3=sone/80
|
||||
a3=sone
|
||||
end function a3
|
||||
function g(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_, sone, szero
|
||||
|
||||
@@ -753,23 +753,5 @@ contains
|
||||
end if
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
subroutine pr_usage(iout)
|
||||
integer(psb_ipk_) iout
|
||||
write(iout, *) ' number of parameters is incorrect!'
|
||||
write(iout, *) ' use: hb_sample mtrx_file methd prec [ptype &
|
||||
&itmax istopc itrace]'
|
||||
write(iout, *) ' where:'
|
||||
write(iout, *) ' mtrx_file is stored in hb format'
|
||||
write(iout, *) ' methd may be: cgstab '
|
||||
write(iout, *) ' itmax max iterations [500] '
|
||||
write(iout, *) ' istopc stopping criterion [1] '
|
||||
write(iout, *) ' itrace 0 (no tracing, default) or '
|
||||
write(iout, *) ' >= 0 do tracing every itrace'
|
||||
write(iout, *) ' iterations '
|
||||
write(iout, *) ' prec may be: ilu diagsc none'
|
||||
write(iout, *) ' ptype partition strategy default 0'
|
||||
write(iout, *) ' 0: block partition '
|
||||
end subroutine pr_usage
|
||||
|
||||
end program mld_cf_sample
|
||||
|
||||
@@ -753,23 +753,5 @@ contains
|
||||
end if
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
subroutine pr_usage(iout)
|
||||
integer(psb_ipk_) iout
|
||||
write(iout, *) ' number of parameters is incorrect!'
|
||||
write(iout, *) ' use: hb_sample mtrx_file methd prec [ptype &
|
||||
&itmax istopc itrace]'
|
||||
write(iout, *) ' where:'
|
||||
write(iout, *) ' mtrx_file is stored in hb format'
|
||||
write(iout, *) ' methd may be: cgstab '
|
||||
write(iout, *) ' itmax max iterations [500] '
|
||||
write(iout, *) ' istopc stopping criterion [1] '
|
||||
write(iout, *) ' itrace 0 (no tracing, default) or '
|
||||
write(iout, *) ' >= 0 do tracing every itrace'
|
||||
write(iout, *) ' iterations '
|
||||
write(iout, *) ' prec may be: ilu diagsc none'
|
||||
write(iout, *) ' ptype partition strategy default 0'
|
||||
write(iout, *) ' 0: block partition '
|
||||
end subroutine pr_usage
|
||||
|
||||
end program mld_df_sample
|
||||
|
||||
@@ -753,23 +753,5 @@ contains
|
||||
end if
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
subroutine pr_usage(iout)
|
||||
integer(psb_ipk_) iout
|
||||
write(iout, *) ' number of parameters is incorrect!'
|
||||
write(iout, *) ' use: hb_sample mtrx_file methd prec [ptype &
|
||||
&itmax istopc itrace]'
|
||||
write(iout, *) ' where:'
|
||||
write(iout, *) ' mtrx_file is stored in hb format'
|
||||
write(iout, *) ' methd may be: cgstab '
|
||||
write(iout, *) ' itmax max iterations [500] '
|
||||
write(iout, *) ' istopc stopping criterion [1] '
|
||||
write(iout, *) ' itrace 0 (no tracing, default) or '
|
||||
write(iout, *) ' >= 0 do tracing every itrace'
|
||||
write(iout, *) ' iterations '
|
||||
write(iout, *) ' prec may be: ilu diagsc none'
|
||||
write(iout, *) ' ptype partition strategy default 0'
|
||||
write(iout, *) ' 0: block partition '
|
||||
end subroutine pr_usage
|
||||
|
||||
end program mld_sf_sample
|
||||
|
||||
@@ -753,23 +753,5 @@ contains
|
||||
end if
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
subroutine pr_usage(iout)
|
||||
integer(psb_ipk_) iout
|
||||
write(iout, *) ' number of parameters is incorrect!'
|
||||
write(iout, *) ' use: hb_sample mtrx_file methd prec [ptype &
|
||||
&itmax istopc itrace]'
|
||||
write(iout, *) ' where:'
|
||||
write(iout, *) ' mtrx_file is stored in hb format'
|
||||
write(iout, *) ' methd may be: cgstab '
|
||||
write(iout, *) ' itmax max iterations [500] '
|
||||
write(iout, *) ' istopc stopping criterion [1] '
|
||||
write(iout, *) ' itrace 0 (no tracing, default) or '
|
||||
write(iout, *) ' >= 0 do tracing every itrace'
|
||||
write(iout, *) ' iterations '
|
||||
write(iout, *) ' prec may be: ilu diagsc none'
|
||||
write(iout, *) ' ptype partition strategy default 0'
|
||||
write(iout, *) ' 0: block partition '
|
||||
end subroutine pr_usage
|
||||
|
||||
end program mld_zf_sample
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
A1M-hetero3D.mtx ! This matrix (and others) from: http://math.nist.gov/MatrixMarket/ or
|
||||
B1M-hetero3D.mtx ! rhs | http://www.cise.ufl.edu/research/sparse/matrices/index.html
|
||||
mld_mat.mtx ! This matrix (and others) from: http://math.nist.gov/MatrixMarket/ or
|
||||
mld_rhs.mtx ! rhs | http://www.cise.ufl.edu/research/sparse/matrices/index.html
|
||||
NONE ! Initial guess
|
||||
NONE ! Reference solution
|
||||
mld_sol.mtx ! Reference solution
|
||||
MM ! File format: MatrixMarket or Harwell-Boeing
|
||||
CSR ! Storage format: CSR COO JAD
|
||||
2 ! IPART (partition method): 0 (block) 2 (graph, with Metis)
|
||||
0 ! IPART (partition method): 0 (block) 2 (graph, with Metis)
|
||||
FCG ! Iterative method: BiCGSTAB BiCG CGS RGMRES BiCGSTABL CG
|
||||
2 ! ISTOPC
|
||||
00500 ! ITMAX
|
||||
|
||||
@@ -73,13 +73,13 @@ contains
|
||||
use psb_base_mod, only : psb_dpk_,done,dzero
|
||||
real(psb_dpk_) :: b1
|
||||
real(psb_dpk_), intent(in) :: x,y
|
||||
b1=dzero/sqrt((2*done))
|
||||
b1=dzero
|
||||
end function b1
|
||||
function b2(x,y)
|
||||
use psb_base_mod, only : psb_dpk_,done,dzero
|
||||
real(psb_dpk_) :: b2
|
||||
real(psb_dpk_), intent(in) :: x,y
|
||||
b2=dzero/sqrt((2*done))
|
||||
b2=dzero
|
||||
end function b2
|
||||
function c(x,y)
|
||||
use psb_base_mod, only : psb_dpk_,done,dzero
|
||||
@@ -91,13 +91,13 @@ contains
|
||||
use psb_base_mod, only : psb_dpk_,done,dzero
|
||||
real(psb_dpk_) :: a1
|
||||
real(psb_dpk_), intent(in) :: x,y
|
||||
a1=done!/80
|
||||
a1=done
|
||||
end function a1
|
||||
function a2(x,y)
|
||||
use psb_base_mod, only : psb_dpk_,done,dzero
|
||||
real(psb_dpk_) :: a2
|
||||
real(psb_dpk_), intent(in) :: x,y
|
||||
a2=done!/80
|
||||
a2=done
|
||||
end function a2
|
||||
function g(x,y)
|
||||
use psb_base_mod, only : psb_dpk_, done, dzero
|
||||
@@ -622,25 +622,4 @@ contains
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
!
|
||||
! print an error message
|
||||
!
|
||||
subroutine pr_usage(iout)
|
||||
integer(psb_ipk_) :: iout
|
||||
write(iout,*)'incorrect parameter(s) found'
|
||||
write(iout,*)' usage: mld_d_pde2d methd prec dim &
|
||||
&[istop itmax itrace]'
|
||||
write(iout,*)' where:'
|
||||
write(iout,*)' methd: cgstab cgs rgmres bicgstabl'
|
||||
write(iout,*)' prec : bjac diag none'
|
||||
write(iout,*)' dim number of points along each axis'
|
||||
write(iout,*)' the size of the resulting linear '
|
||||
write(iout,*)' system is dim**3'
|
||||
write(iout,*)' istop stopping criterion 1, 2 '
|
||||
write(iout,*)' itmax maximum number of iterations [500] '
|
||||
write(iout,*)' itrace <=0 (no tracing, default) or '
|
||||
write(iout,*)' >= 1 do tracing every itrace'
|
||||
write(iout,*)' iterations '
|
||||
end subroutine pr_usage
|
||||
|
||||
end program mld_d_pde2d
|
||||
|
||||
@@ -73,19 +73,19 @@ contains
|
||||
use psb_base_mod, only : psb_dpk_,done,dzero
|
||||
real(psb_dpk_) :: b1
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
b1=dzero/sqrt((3*done))
|
||||
b1=dzero
|
||||
end function b1
|
||||
function b2(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_,done,dzero
|
||||
real(psb_dpk_) :: b2
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
b2=dzero/sqrt((3*done))
|
||||
b2=dzero
|
||||
end function b2
|
||||
function b3(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_,done,dzero
|
||||
real(psb_dpk_) :: b3
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
b3=dzero/sqrt((3*done))
|
||||
b3=dzero
|
||||
end function b3
|
||||
function c(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_,done,dzero
|
||||
@@ -97,19 +97,19 @@ contains
|
||||
use psb_base_mod, only : psb_dpk_,done,dzero
|
||||
real(psb_dpk_) :: a1
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
a1=done!/80
|
||||
a1=done
|
||||
end function a1
|
||||
function a2(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_,done,dzero
|
||||
real(psb_dpk_) :: a2
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
a2=done!/80
|
||||
a2=done
|
||||
end function a2
|
||||
function a3(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_,done,dzero
|
||||
real(psb_dpk_) :: a3
|
||||
real(psb_dpk_), intent(in) :: x,y,z
|
||||
a3=done!/80
|
||||
a3=done
|
||||
end function a3
|
||||
function g(x,y,z)
|
||||
use psb_base_mod, only : psb_dpk_,done,dzero
|
||||
@@ -635,25 +635,4 @@ contains
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
!
|
||||
! print an error message
|
||||
!
|
||||
subroutine pr_usage(iout)
|
||||
integer(psb_ipk_) :: iout
|
||||
write(iout,*)'incorrect parameter(s) found'
|
||||
write(iout,*)' usage: mld_d_pde3d methd prec dim &
|
||||
&[istop itmax itrace]'
|
||||
write(iout,*)' where:'
|
||||
write(iout,*)' methd: cgstab cgs rgmres bicgstabl'
|
||||
write(iout,*)' prec : bjac diag none'
|
||||
write(iout,*)' dim number of points along each axis'
|
||||
write(iout,*)' the size of the resulting linear '
|
||||
write(iout,*)' system is dim**3'
|
||||
write(iout,*)' istop stopping criterion 1, 2 '
|
||||
write(iout,*)' itmax maximum number of iterations [500] '
|
||||
write(iout,*)' itrace <=0 (no tracing, default) or '
|
||||
write(iout,*)' >= 1 do tracing every itrace'
|
||||
write(iout,*)' iterations '
|
||||
end subroutine pr_usage
|
||||
|
||||
end program mld_d_pde3d
|
||||
|
||||
@@ -73,13 +73,13 @@ contains
|
||||
use psb_base_mod, only : psb_spk_,sone,szero
|
||||
real(psb_spk_) :: b1
|
||||
real(psb_spk_), intent(in) :: x,y
|
||||
b1=szero/sqrt((2*sone))
|
||||
b1=szero
|
||||
end function b1
|
||||
function b2(x,y)
|
||||
use psb_base_mod, only : psb_spk_,sone,szero
|
||||
real(psb_spk_) :: b2
|
||||
real(psb_spk_), intent(in) :: x,y
|
||||
b2=szero/sqrt((2*sone))
|
||||
b2=szero
|
||||
end function b2
|
||||
function c(x,y)
|
||||
use psb_base_mod, only : psb_spk_,sone,szero
|
||||
@@ -91,13 +91,13 @@ contains
|
||||
use psb_base_mod, only : psb_spk_,sone,szero
|
||||
real(psb_spk_) :: a1
|
||||
real(psb_spk_), intent(in) :: x,y
|
||||
a1=sone!/80
|
||||
a1=sone
|
||||
end function a1
|
||||
function a2(x,y)
|
||||
use psb_base_mod, only : psb_spk_,sone,szero
|
||||
real(psb_spk_) :: a2
|
||||
real(psb_spk_), intent(in) :: x,y
|
||||
a2=sone!/80
|
||||
a2=sone
|
||||
end function a2
|
||||
function g(x,y)
|
||||
use psb_base_mod, only : psb_spk_, sone, szero
|
||||
@@ -622,25 +622,4 @@ contains
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
!
|
||||
! print an error message
|
||||
!
|
||||
subroutine pr_usage(iout)
|
||||
integer(psb_ipk_) :: iout
|
||||
write(iout,*)'incorrect parameter(s) found'
|
||||
write(iout,*)' usage: mld_s_pde2d methd prec dim &
|
||||
&[istop itmax itrace]'
|
||||
write(iout,*)' where:'
|
||||
write(iout,*)' methd: cgstab cgs rgmres bicgstabl'
|
||||
write(iout,*)' prec : bjac diag none'
|
||||
write(iout,*)' dim number of points along each axis'
|
||||
write(iout,*)' the size of the resulting linear '
|
||||
write(iout,*)' system is dim**3'
|
||||
write(iout,*)' istop stopping criterion 1, 2 '
|
||||
write(iout,*)' itmax maximum number of iterations [500] '
|
||||
write(iout,*)' itrace <=0 (no tracing, default) or '
|
||||
write(iout,*)' >= 1 do tracing every itrace'
|
||||
write(iout,*)' iterations '
|
||||
end subroutine pr_usage
|
||||
|
||||
end program mld_s_pde2d
|
||||
|
||||
@@ -73,19 +73,19 @@ contains
|
||||
use psb_base_mod, only : psb_spk_,sone,szero
|
||||
real(psb_spk_) :: b1
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
b1=szero/sqrt((3*sone))
|
||||
b1=szero
|
||||
end function b1
|
||||
function b2(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_,sone,szero
|
||||
real(psb_spk_) :: b2
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
b2=szero/sqrt((3*sone))
|
||||
b2=szero
|
||||
end function b2
|
||||
function b3(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_,sone,szero
|
||||
real(psb_spk_) :: b3
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
b3=szero/sqrt((3*sone))
|
||||
b3=szero
|
||||
end function b3
|
||||
function c(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_,sone,szero
|
||||
@@ -97,19 +97,19 @@ contains
|
||||
use psb_base_mod, only : psb_spk_,sone,szero
|
||||
real(psb_spk_) :: a1
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
a1=sone!/80
|
||||
a1=sone
|
||||
end function a1
|
||||
function a2(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_,sone,szero
|
||||
real(psb_spk_) :: a2
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
a2=sone!/80
|
||||
a2=sone
|
||||
end function a2
|
||||
function a3(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_,sone,szero
|
||||
real(psb_spk_) :: a3
|
||||
real(psb_spk_), intent(in) :: x,y,z
|
||||
a3=sone!/80
|
||||
a3=sone
|
||||
end function a3
|
||||
function g(x,y,z)
|
||||
use psb_base_mod, only : psb_spk_,sone,szero
|
||||
@@ -635,25 +635,4 @@ contains
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
!
|
||||
! print an error message
|
||||
!
|
||||
subroutine pr_usage(iout)
|
||||
integer(psb_ipk_) :: iout
|
||||
write(iout,*)'incorrect parameter(s) found'
|
||||
write(iout,*)' usage: mld_s_pde3d methd prec dim &
|
||||
&[istop itmax itrace]'
|
||||
write(iout,*)' where:'
|
||||
write(iout,*)' methd: cgstab cgs rgmres bicgstabl'
|
||||
write(iout,*)' prec : bjac diag none'
|
||||
write(iout,*)' dim number of points along each axis'
|
||||
write(iout,*)' the size of the resulting linear '
|
||||
write(iout,*)' system is dim**3'
|
||||
write(iout,*)' istop stopping criterion 1, 2 '
|
||||
write(iout,*)' itmax maximum number of iterations [500] '
|
||||
write(iout,*)' itrace <=0 (no tracing, default) or '
|
||||
write(iout,*)' >= 1 do tracing every itrace'
|
||||
write(iout,*)' iterations '
|
||||
end subroutine pr_usage
|
||||
|
||||
end program mld_s_pde3d
|
||||
|
||||
Reference in New Issue
Block a user