|
|
|
@ -145,6 +145,7 @@ program amg_d_pde3d
|
|
|
|
|
character(len=16) :: smther ! (pre-)smoother type: BJAC, AS
|
|
|
|
|
integer(psb_ipk_) :: jsweeps ! (pre-)smoother / 1-lev prec. sweeps
|
|
|
|
|
integer(psb_ipk_) :: degree ! degree for polynomial smoother
|
|
|
|
|
character(len=16) :: pvariant ! Polynomial smoother variant
|
|
|
|
|
integer(psb_ipk_) :: novr ! number of overlap layers
|
|
|
|
|
character(len=16) :: restr ! restriction over application of AS
|
|
|
|
|
character(len=16) :: prol ! prolongation over application of AS
|
|
|
|
@ -154,12 +155,13 @@ program amg_d_pde3d
|
|
|
|
|
character(len=16) :: variant ! AINV variant: LLK, etc
|
|
|
|
|
integer(psb_ipk_) :: fill ! fill-in for incomplete LU factorization
|
|
|
|
|
integer(psb_ipk_) :: invfill ! Inverse fill-in for INVK
|
|
|
|
|
real(psb_dpk_) :: thr ! threshold for ILUT factorization
|
|
|
|
|
real(psb_dpk_) :: thr ! threshold for ILUT factorization
|
|
|
|
|
|
|
|
|
|
! AMG post-smoother; ignored by 1-lev preconditioner
|
|
|
|
|
character(len=16) :: smther2 ! post-smoother type: BJAC, AS
|
|
|
|
|
integer(psb_ipk_) :: jsweeps2 ! post-smoother sweeps
|
|
|
|
|
integer(psb_ipk_) :: degree2 ! degree for polynomial smoother
|
|
|
|
|
character(len=16) :: pvariant2 ! Polynomial smoother variant
|
|
|
|
|
integer(psb_ipk_) :: novr2 ! number of overlap layers
|
|
|
|
|
character(len=16) :: restr2 ! restriction over application of AS
|
|
|
|
|
character(len=16) :: prol2 ! prolongation over application of AS
|
|
|
|
@ -169,7 +171,7 @@ program amg_d_pde3d
|
|
|
|
|
character(len=16) :: variant2 ! AINV variant: LLK, etc
|
|
|
|
|
integer(psb_ipk_) :: fill2 ! fill-in for incomplete LU factorization
|
|
|
|
|
integer(psb_ipk_) :: invfill2 ! Inverse fill-in for INVK
|
|
|
|
|
real(psb_dpk_) :: thr2 ! threshold for ILUT factorization
|
|
|
|
|
real(psb_dpk_) :: thr2 ! threshold for ILUT factorization
|
|
|
|
|
|
|
|
|
|
! coarsest-level solver
|
|
|
|
|
character(len=16) :: cmat ! coarsest matrix layout: REPL, DIST
|
|
|
|
@ -291,7 +293,8 @@ program amg_d_pde3d
|
|
|
|
|
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
|
|
|
|
call prec%set('sub_solve', p_choice%solve, info)
|
|
|
|
|
call prec%set('solver_sweeps', p_choice%ssweeps, info)
|
|
|
|
|
call prec%set('smoother_degree', p_choice%degree, info)
|
|
|
|
|
call prec%set('poly_degree', p_choice%degree, info)
|
|
|
|
|
call prec%set('poly_variant', p_choice%variant, info)
|
|
|
|
|
if (psb_toupper(p_choice%solve)=='MUMPS') &
|
|
|
|
|
& call prec%set('mumps_loc_glob','local_solver',info)
|
|
|
|
|
call prec%set('sub_fillin', p_choice%fill, info)
|
|
|
|
@ -339,7 +342,8 @@ program amg_d_pde3d
|
|
|
|
|
|
|
|
|
|
call prec%set('smoother_type', p_choice%smther, info)
|
|
|
|
|
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
|
|
|
|
call prec%set('smoother_degree', p_choice%degree, info)
|
|
|
|
|
call prec%set('poly_degree', p_choice%degree, info)
|
|
|
|
|
call prec%set('poly_variant', p_choice%variant, info)
|
|
|
|
|
|
|
|
|
|
select case (psb_toupper(p_choice%smther))
|
|
|
|
|
case ('GS','BWGS','FBGS','JACOBI','L1-JACOBI','L1-FBGS')
|
|
|
|
@ -370,7 +374,8 @@ program amg_d_pde3d
|
|
|
|
|
if (psb_toupper(p_choice%smther2) /= 'NONE') then
|
|
|
|
|
call prec%set('smoother_type', p_choice%smther2, info,pos='post')
|
|
|
|
|
call prec%set('smoother_sweeps', p_choice%jsweeps2, info,pos='post')
|
|
|
|
|
call prec%set('smoother_degree', p_choice%degree2, info,pos='post')
|
|
|
|
|
call prec%set('poly_degree', p_choice%degree2, info,pos='post')
|
|
|
|
|
call prec%set('poly_variant', p_choice%variant2, info,pos='post')
|
|
|
|
|
select case (psb_toupper(p_choice%smther2))
|
|
|
|
|
case ('GS','BWGS','FBGS','JACOBI','L1-JACOBI','L1-FBGS')
|
|
|
|
|
! do nothing
|
|
|
|
@ -407,7 +412,6 @@ program amg_d_pde3d
|
|
|
|
|
call prec%set('coarse_sweeps', p_choice%cjswp, info)
|
|
|
|
|
|
|
|
|
|
end select
|
|
|
|
|
!!$ call prec%descr(info,iout=psb_out_unit)
|
|
|
|
|
|
|
|
|
|
! build the preconditioner
|
|
|
|
|
call psb_barrier(ctxt)
|
|
|
|
@ -587,7 +591,8 @@ contains
|
|
|
|
|
! First smoother / 1-lev preconditioner
|
|
|
|
|
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%degree,inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
|
|
|
|
call read_data(prec%degree,inp_unit) ! Degree of Polynomial smoother
|
|
|
|
|
call read_data(prec%variant,inp_unit) ! variant for Polynomial
|
|
|
|
|
call read_data(prec%novr,inp_unit) ! number of overlap layers
|
|
|
|
|
call read_data(prec%restr,inp_unit) ! restriction over application of AS
|
|
|
|
|
call read_data(prec%prol,inp_unit) ! prolongation over application of AS
|
|
|
|
@ -600,12 +605,13 @@ contains
|
|
|
|
|
! Second smoother/ AMG post-smoother (if NONE ignored in main)
|
|
|
|
|
call read_data(prec%smther2,inp_unit) ! smoother type
|
|
|
|
|
call read_data(prec%jsweeps2,inp_unit) ! (post-)smoother sweeps
|
|
|
|
|
call read_data(prec%degree2,inp_unit) ! (post-)smoother sweeps
|
|
|
|
|
call read_data(prec%degree2,inp_unit) ! Degree of Polynomial smoother
|
|
|
|
|
call read_data(prec%variant2,inp_unit) ! Polynomial smoother variant
|
|
|
|
|
call read_data(prec%novr2,inp_unit) ! number of overlap layers
|
|
|
|
|
call read_data(prec%restr2,inp_unit) ! restriction over application of AS
|
|
|
|
|
call read_data(prec%prol2,inp_unit) ! prolongation over application of AS
|
|
|
|
|
call read_data(prec%solve2,inp_unit) ! local subsolver
|
|
|
|
|
call read_data(prec%ssweeps2,inp_unit) ! inner solver sweeps
|
|
|
|
|
call read_data(prec%ssweeps2,inp_unit) ! inner solver sweeps
|
|
|
|
|
call read_data(prec%variant2,inp_unit) ! AINV variant
|
|
|
|
|
call read_data(prec%fill2,inp_unit) ! fill-in for incomplete LU
|
|
|
|
|
call read_data(prec%invfill2,inp_unit) !Inverse fill-in for INVK
|
|
|
|
@ -672,6 +678,7 @@ contains
|
|
|
|
|
call psb_bcast(ctxt,prec%smther)
|
|
|
|
|
call psb_bcast(ctxt,prec%jsweeps)
|
|
|
|
|
call psb_bcast(ctxt,prec%degree)
|
|
|
|
|
call psb_bcast(ctxt,prec%variant)
|
|
|
|
|
call psb_bcast(ctxt,prec%novr)
|
|
|
|
|
call psb_bcast(ctxt,prec%restr)
|
|
|
|
|
call psb_bcast(ctxt,prec%prol)
|
|
|
|
@ -685,6 +692,7 @@ contains
|
|
|
|
|
call psb_bcast(ctxt,prec%smther2)
|
|
|
|
|
call psb_bcast(ctxt,prec%jsweeps2)
|
|
|
|
|
call psb_bcast(ctxt,prec%degree2)
|
|
|
|
|
call psb_bcast(ctxt,prec%variant2)
|
|
|
|
|
call psb_bcast(ctxt,prec%novr2)
|
|
|
|
|
call psb_bcast(ctxt,prec%restr2)
|
|
|
|
|
call psb_bcast(ctxt,prec%prol2)
|
|
|
|
|