|
|
@ -119,7 +119,7 @@ program amg_d_pde2d
|
|
|
|
character(len=10) :: ptype ! preconditioner type
|
|
|
|
character(len=10) :: ptype ! preconditioner type
|
|
|
|
|
|
|
|
|
|
|
|
integer(psb_ipk_) :: outer_sweeps ! number of outer sweeps: sweeps for 1-level,
|
|
|
|
integer(psb_ipk_) :: outer_sweeps ! number of outer sweeps: sweeps for 1-level,
|
|
|
|
! AMG cycles for ML
|
|
|
|
! AMG cycles for ML
|
|
|
|
! general AMG data
|
|
|
|
! general AMG data
|
|
|
|
character(len=16) :: mlcycle ! AMG cycle type
|
|
|
|
character(len=16) :: mlcycle ! AMG cycle type
|
|
|
|
integer(psb_ipk_) :: maxlevs ! maximum number of levels in AMG preconditioner
|
|
|
|
integer(psb_ipk_) :: maxlevs ! maximum number of levels in AMG preconditioner
|
|
|
@ -174,6 +174,17 @@ program amg_d_pde2d
|
|
|
|
real(psb_dpk_) :: cthres ! threshold for ILUT factorization
|
|
|
|
real(psb_dpk_) :: cthres ! threshold for ILUT factorization
|
|
|
|
integer(psb_ipk_) :: cjswp ! sweeps for GS or JAC coarsest-lev subsolver
|
|
|
|
integer(psb_ipk_) :: cjswp ! sweeps for GS or JAC coarsest-lev subsolver
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! Dump data
|
|
|
|
|
|
|
|
logical :: dump = .false.
|
|
|
|
|
|
|
|
integer(psb_ipk_) :: dlmin ! Minimum level to dump
|
|
|
|
|
|
|
|
integer(psb_ipk_) :: dlmax ! Maximum level to dump
|
|
|
|
|
|
|
|
logical :: dump_ac = .false.
|
|
|
|
|
|
|
|
logical :: dump_rp = .false.
|
|
|
|
|
|
|
|
logical :: dump_tprol = .false.
|
|
|
|
|
|
|
|
logical :: dump_smoother = .false.
|
|
|
|
|
|
|
|
logical :: dump_solver = .false.
|
|
|
|
|
|
|
|
logical :: dump_global_num = .false.
|
|
|
|
|
|
|
|
|
|
|
|
end type precdata
|
|
|
|
end type precdata
|
|
|
|
type(precdata) :: p_choice
|
|
|
|
type(precdata) :: p_choice
|
|
|
|
|
|
|
|
|
|
|
@ -392,6 +403,12 @@ program amg_d_pde2d
|
|
|
|
write(psb_out_unit,'(" ")')
|
|
|
|
write(psb_out_unit,'(" ")')
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (p_choice%dump) then
|
|
|
|
|
|
|
|
call prec%dump(info,istart=p_choice%dlmin,iend=p_choice%dlmax,&
|
|
|
|
|
|
|
|
& ac=p_choice%dump_ac,rp=p_choice%dump_rp,tprol=p_choice%dump_tprol,&
|
|
|
|
|
|
|
|
& smoother=p_choice%dump_smoother, solver=p_choice%dump_solver, &
|
|
|
|
|
|
|
|
& global_num=p_choice%dump_global_num)
|
|
|
|
|
|
|
|
end if
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! iterative method parameters
|
|
|
|
! iterative method parameters
|
|
|
|
!
|
|
|
|
!
|
|
|
@ -530,6 +547,7 @@ contains
|
|
|
|
! preconditioner type
|
|
|
|
! preconditioner type
|
|
|
|
call read_data(prec%descr,inp_unit) ! verbose description of the prec
|
|
|
|
call read_data(prec%descr,inp_unit) ! verbose description of the prec
|
|
|
|
call read_data(prec%ptype,inp_unit) ! preconditioner type
|
|
|
|
call read_data(prec%ptype,inp_unit) ! preconditioner type
|
|
|
|
|
|
|
|
|
|
|
|
! First smoother / 1-lev preconditioner
|
|
|
|
! First smoother / 1-lev preconditioner
|
|
|
|
call read_data(prec%smther,inp_unit) ! smoother type
|
|
|
|
call read_data(prec%smther,inp_unit) ! smoother type
|
|
|
|
call read_data(prec%jsweeps,inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
|
|
|
call read_data(prec%jsweeps,inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
|
|
@ -580,6 +598,17 @@ contains
|
|
|
|
call read_data(prec%cfill,inp_unit) ! fill-in for incompl LU
|
|
|
|
call read_data(prec%cfill,inp_unit) ! fill-in for incompl LU
|
|
|
|
call read_data(prec%cthres,inp_unit) ! Threshold for ILUT
|
|
|
|
call read_data(prec%cthres,inp_unit) ! Threshold for ILUT
|
|
|
|
call read_data(prec%cjswp,inp_unit) ! sweeps for GS/JAC subsolver
|
|
|
|
call read_data(prec%cjswp,inp_unit) ! sweeps for GS/JAC subsolver
|
|
|
|
|
|
|
|
! dump
|
|
|
|
|
|
|
|
call read_data(prec%dump,inp_unit) ! Dump on file?
|
|
|
|
|
|
|
|
call read_data(prec%dlmin,inp_unit) ! Minimum level to dump
|
|
|
|
|
|
|
|
call read_data(prec%dlmax,inp_unit) ! Maximum level to dump
|
|
|
|
|
|
|
|
call read_data(prec%dump_ac,inp_unit)
|
|
|
|
|
|
|
|
call read_data(prec%dump_rp,inp_unit)
|
|
|
|
|
|
|
|
call read_data(prec%dump_tprol,inp_unit)
|
|
|
|
|
|
|
|
call read_data(prec%dump_smoother,inp_unit)
|
|
|
|
|
|
|
|
call read_data(prec%dump_solver,inp_unit)
|
|
|
|
|
|
|
|
call read_data(prec%dump_global_num,inp_unit)
|
|
|
|
|
|
|
|
|
|
|
|
if (inp_unit /= psb_inp_unit) then
|
|
|
|
if (inp_unit /= psb_inp_unit) then
|
|
|
|
close(inp_unit)
|
|
|
|
close(inp_unit)
|
|
|
|
end if
|
|
|
|
end if
|
|
|
@ -626,6 +655,7 @@ contains
|
|
|
|
call psb_bcast(ctxt,prec%mlcycle)
|
|
|
|
call psb_bcast(ctxt,prec%mlcycle)
|
|
|
|
call psb_bcast(ctxt,prec%outer_sweeps)
|
|
|
|
call psb_bcast(ctxt,prec%outer_sweeps)
|
|
|
|
call psb_bcast(ctxt,prec%maxlevs)
|
|
|
|
call psb_bcast(ctxt,prec%maxlevs)
|
|
|
|
|
|
|
|
call psb_bcast(ctxt,prec%csizepp)
|
|
|
|
|
|
|
|
|
|
|
|
call psb_bcast(ctxt,prec%aggr_prol)
|
|
|
|
call psb_bcast(ctxt,prec%aggr_prol)
|
|
|
|
call psb_bcast(ctxt,prec%par_aggr_alg)
|
|
|
|
call psb_bcast(ctxt,prec%par_aggr_alg)
|
|
|
@ -641,13 +671,23 @@ contains
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
call psb_bcast(ctxt,prec%athres)
|
|
|
|
call psb_bcast(ctxt,prec%athres)
|
|
|
|
|
|
|
|
|
|
|
|
call psb_bcast(ctxt,prec%csizepp)
|
|
|
|
|
|
|
|
call psb_bcast(ctxt,prec%cmat)
|
|
|
|
call psb_bcast(ctxt,prec%cmat)
|
|
|
|
call psb_bcast(ctxt,prec%csolve)
|
|
|
|
call psb_bcast(ctxt,prec%csolve)
|
|
|
|
call psb_bcast(ctxt,prec%csbsolve)
|
|
|
|
call psb_bcast(ctxt,prec%csbsolve)
|
|
|
|
call psb_bcast(ctxt,prec%cfill)
|
|
|
|
call psb_bcast(ctxt,prec%cfill)
|
|
|
|
call psb_bcast(ctxt,prec%cthres)
|
|
|
|
call psb_bcast(ctxt,prec%cthres)
|
|
|
|
call psb_bcast(ctxt,prec%cjswp)
|
|
|
|
call psb_bcast(ctxt,prec%cjswp)
|
|
|
|
|
|
|
|
! dump
|
|
|
|
|
|
|
|
call psb_bcast(ctxt,prec%dump)
|
|
|
|
|
|
|
|
call psb_bcast(ctxt,prec%dlmin)
|
|
|
|
|
|
|
|
call psb_bcast(ctxt,prec%dlmax)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call psb_bcast(ctxt,prec%dump_ac)
|
|
|
|
|
|
|
|
call psb_bcast(ctxt,prec%dump_rp)
|
|
|
|
|
|
|
|
call psb_bcast(ctxt,prec%dump_tprol)
|
|
|
|
|
|
|
|
call psb_bcast(ctxt,prec%dump_smoother)
|
|
|
|
|
|
|
|
call psb_bcast(ctxt,prec%dump_solver)
|
|
|
|
|
|
|
|
call psb_bcast(ctxt,prec%dump_global_num)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end subroutine get_parms
|
|
|
|
end subroutine get_parms
|
|
|
|