mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-06 14:44:55 +00:00
Adjustments for POLYNOMIAL smoothers.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -4,16 +4,17 @@ CSR ! Storage format CSR COO JAD
|
||||
CONST ! PDECOEFF: CONST, EXP, GAUSS Coefficients of the PDE
|
||||
BICGSTAB ! Iterative method: BiCGSTAB BiCGSTABL BiCG CG CGS FCG GCR RGMRES
|
||||
2 ! ISTOPC
|
||||
00500 ! ITMAX
|
||||
00050 ! ITMAX
|
||||
1 ! ITRACE
|
||||
30 ! IRST (restart for RGMRES and BiCGSTABL)
|
||||
1.d-6 ! EPS
|
||||
%%%%%%%%%%% Main preconditioner choices %%%%%%%%%%%%%%%%
|
||||
ML-VBM-VCYCLE-FBGS-D-BJAC ! Longer descriptive name for preconditioner (up to 20 chars)
|
||||
BJAC ! Preconditioner type: NONE JACOBI GS FBGS BJAC AS ML
|
||||
ML ! Preconditioner type: NONE JACOBI GS FBGS BJAC AS ML
|
||||
%%%%%%%%%%% First smoother (for all levels but coarsest) %%%%%%%%%%%%%%%%
|
||||
BJAC ! Smoother type JACOBI FBGS GS BWGS BJAC AS. For 1-level, repeats previous.
|
||||
1 ! Number of sweeps for smoother
|
||||
FBGS ! Smoother type JACOBI FBGS GS BWGS BJAC AS. For 1-level, repeats previous.
|
||||
4 ! Number of sweeps for smoother
|
||||
4 ! degree for polynomial smoother
|
||||
0 ! Number of overlap layers for AS preconditioner
|
||||
HALO ! AS restriction operator: NONE HALO
|
||||
NONE ! AS prolongation operator: NONE SUM AVG
|
||||
@@ -24,8 +25,9 @@ LLK ! AINV variant
|
||||
1 ! Inverse Fill level P for INVK
|
||||
1.d-4 ! Threshold T for ILU(T,P)
|
||||
%%%%%%%%%%% Second smoother, always ignored for non-ML %%%%%%%%%%%%%%%%
|
||||
NONE ! Second (post) smoother, ignored if NONE
|
||||
1 ! Number of sweeps for (post) smoother
|
||||
NONE ! Second (post) smoother, ignored if NONE
|
||||
4 ! Number of sweeps for (post) smoother
|
||||
4 ! degree for polynomial smoother
|
||||
0 ! Number of overlap layers for AS preconditioner
|
||||
HALO ! AS restriction operator: NONE HALO
|
||||
NONE ! AS prolongation operator: NONE SUM AVG
|
||||
|
||||
Reference in New Issue
Block a user