Modified precset to warn about overriding COARSE_MAT

fixmatch
Salvatore Filippone 2 years ago
parent bccde3a8b0
commit 92e0fd7f19

@ -94,6 +94,7 @@ module amg_base_prec_type
integer(psb_ipk_) :: aggr_omega_alg, aggr_eig, aggr_filter integer(psb_ipk_) :: aggr_omega_alg, aggr_eig, aggr_filter
integer(psb_ipk_) :: coarse_mat, coarse_solve integer(psb_ipk_) :: coarse_mat, coarse_solve
contains contains
procedure, pass(pm) :: get_coarse_mat => ml_parms_get_coarse_mat
procedure, pass(pm) :: get_coarse => ml_parms_get_coarse procedure, pass(pm) :: get_coarse => ml_parms_get_coarse
procedure, pass(pm) :: clone => ml_parms_clone procedure, pass(pm) :: clone => ml_parms_clone
procedure, pass(pm) :: descr => ml_parms_descr procedure, pass(pm) :: descr => ml_parms_descr
@ -577,6 +578,33 @@ contains
end select end select
end function amg_stringval end function amg_stringval
function amg_get_coarse_mat_name(val) result(res)
character(len=15) :: res
integer :: val
select case(val)
case (0,1)
res = matrix_names(val)
case default
res = 'Unknown '
end select
end function amg_get_coarse_mat_name
subroutine amg_warn_coarse_mat(val,expected)
integer(psb_ipk_) :: val, expected
if (val /= expected) then
write(0,*) 'Warning: resetting COARSE_MAT on an existing hierarchy from ',&
& amg_get_coarse_mat_name(val), ' to ',amg_get_coarse_mat_name(expected)
end if
end subroutine amg_warn_coarse_mat
function ml_parms_get_coarse_mat(pm) result(res)
implicit none
class(amg_ml_parms), intent(in) :: pm
integer(psb_ipk_) :: res
res = pm%coarse_mat
end function ml_parms_get_coarse_mat
subroutine ml_parms_get_coarse(pm,pmin) subroutine ml_parms_get_coarse(pm,pmin)
implicit none implicit none
class(amg_ml_parms), intent(inout) :: pm class(amg_ml_parms), intent(inout) :: pm

@ -336,6 +336,7 @@ subroutine amg_ccprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
! Local variables ! Local variables
integer(psb_ipk_) :: ilev_, nlev_,val,ilmax_, il integer(psb_ipk_) :: ilev_, nlev_,val,ilmax_, il
character(len=*), parameter :: name='amg_precsetc' character(len=*), parameter :: name='amg_precsetc'
logical :: hier_asb
info = psb_success_ info = psb_success_
@ -459,6 +460,7 @@ subroutine amg_ccprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
return return
end if end if
if (nlev_ > 1) then if (nlev_ > 1) then
hier_asb = p%precv(nlev_)%ac%is_asb()
select case (psb_toupper(string)) select case (psb_toupper(string))
case('BJAC') case('BJAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
@ -469,7 +471,11 @@ subroutine amg_ccprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#else #else
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
#endif #endif
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info)
case('L1-BJAC') case('L1-BJAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos)
#if defined(HAVE_SLU_) #if defined(HAVE_SLU_)
@ -479,55 +485,91 @@ subroutine amg_ccprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#else #else
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
#endif #endif
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info)
case('SLU') case('SLU')
#if defined(HAVE_SLU_) #if defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('ILU') case('ILU')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('ILUT') case('ILUT')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_t_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_t_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('MILU') case('MILU')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_milu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_milu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('MUMPS') case('MUMPS')
#if defined(HAVE_MUMPS_) #if defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('UMF') case('UMF')
#if defined(HAVE_SLU_) #if defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
@ -535,42 +577,69 @@ subroutine amg_ccprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#if defined(HAVE_SLU_) #if defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('JACOBI','JAC') case('JACOBI','JAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_diag_scale_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('L1-JACOBI','L1-JAC') case('L1-JACOBI','L1-JAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_l1_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_l1_diag_scale_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('GS','FBGS') case('GS','FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('BWGS') case('BWGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_bwgs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_bwgs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('L1-GS','L1-FBGS') case('L1-GS','L1-FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('KRM') case('KRM')
block block
type(amg_c_krm_solver_type) :: krm_slv type(amg_c_krm_solver_type) :: krm_slv
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos)
call p%precv(nlev_)%set(krm_slv,info) call p%precv(nlev_)%set(krm_slv,info)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
end block end block
end select end select
@ -610,11 +679,16 @@ subroutine amg_ccprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
case('COARSE_MAT') case('COARSE_MAT')
if (nlev_ > 1) then if (nlev_ > 1) then
hier_asb = p%precv(nlev_)%ac%is_asb()
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_stringval(string))
call p%precv(nlev_)%set('COARSE_MAT',string,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',string,info,pos=pos)
end if end if
case('COARSE_SOLVE') case('COARSE_SOLVE')
if (nlev_ > 1) then if (nlev_ > 1) then
hier_asb = p%precv(nlev_)%ac%is_asb()
call p%precv(nlev_)%set('COARSE_SOLVE',string,info,pos=pos) call p%precv(nlev_)%set('COARSE_SOLVE',string,info,pos=pos)
select case (psb_toupper(trim(string))) select case (psb_toupper(trim(string)))
case('BJAC') case('BJAC')
@ -626,6 +700,9 @@ subroutine amg_ccprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#else #else
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
#endif #endif
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info)
case('L1-BJAC') case('L1-BJAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos)
@ -636,55 +713,91 @@ subroutine amg_ccprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#else #else
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
#endif #endif
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info)
case('SLU') case('SLU')
#if defined(HAVE_SLU_) #if defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('ILU') case('ILU')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('ILUT') case('ILUT')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_t_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_t_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('MILU') case('MILU')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_milu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_milu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('MUMPS') case('MUMPS')
#if defined(HAVE_MUMPS_) #if defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('UMF') case('UMF')
#if defined(HAVE_SLU_) #if defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
@ -692,42 +805,69 @@ subroutine amg_ccprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#if defined(HAVE_SLU_) #if defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('JACOBI','JAC') case('JACOBI','JAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_diag_scale_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('L1-JACOBI','L1-JAC') case('L1-JACOBI','L1-JAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_l1_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_l1_diag_scale_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('GS','FBGS') case('GS','FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('BWGS') case('BWGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_bwgs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_bwgs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('L1-FBGS','L1-GS') case('L1-FBGS','L1-GS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('KRM') case('KRM')
block block
type(amg_c_krm_solver_type) :: krm_slv type(amg_c_krm_solver_type) :: krm_slv
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos)
call p%precv(nlev_)%set(krm_slv,info) call p%precv(nlev_)%set(krm_slv,info)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
end block end block
end select end select

@ -237,7 +237,6 @@ subroutine amg_cprecinit(ctxt,prec,ptype,info)
#else #else
call prec%set('COARSE_SOLVE','ILU',info) call prec%set('COARSE_SOLVE','ILU',info)
#endif #endif
case default case default
write(psb_err_unit,*) name,& write(psb_err_unit,*) name,&
&': Warning: Unknown preconditioner type request "',ptype,'"' &': Warning: Unknown preconditioner type request "',ptype,'"'

@ -348,6 +348,7 @@ subroutine amg_dcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
! Local variables ! Local variables
integer(psb_ipk_) :: ilev_, nlev_,val,ilmax_, il integer(psb_ipk_) :: ilev_, nlev_,val,ilmax_, il
character(len=*), parameter :: name='amg_precsetc' character(len=*), parameter :: name='amg_precsetc'
logical :: hier_asb
info = psb_success_ info = psb_success_
@ -471,6 +472,7 @@ subroutine amg_dcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
return return
end if end if
if (nlev_ > 1) then if (nlev_ > 1) then
hier_asb = p%precv(nlev_)%ac%is_asb()
select case (psb_toupper(string)) select case (psb_toupper(string))
case('BJAC') case('BJAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
@ -483,7 +485,11 @@ subroutine amg_dcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#else #else
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
#endif #endif
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info)
case('L1-BJAC') case('L1-BJAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos)
#if defined(HAVE_UMF_) #if defined(HAVE_UMF_)
@ -495,59 +501,98 @@ subroutine amg_dcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#else #else
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
#endif #endif
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info)
case('SLU') case('SLU')
#if defined(HAVE_SLU_) #if defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('ILU') case('ILU')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('ILUT') case('ILUT')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_t_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_t_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('MILU') case('MILU')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_milu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_milu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('MUMPS') case('MUMPS')
#if defined(HAVE_MUMPS_) #if defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('UMF') case('UMF')
#if defined(HAVE_UMF_) #if defined(HAVE_UMF_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_umf_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_umf_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_SLU_) #elif defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
@ -555,50 +600,83 @@ subroutine amg_dcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#if defined(HAVE_SLUDIST_) #if defined(HAVE_SLUDIST_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_sludist_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_sludist_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#elif defined(HAVE_UMF_) #elif defined(HAVE_UMF_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_umf_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_umf_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_SLU_) #elif defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('JACOBI','JAC') case('JACOBI','JAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_diag_scale_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('L1-JACOBI','L1-JAC') case('L1-JACOBI','L1-JAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_l1_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_l1_diag_scale_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('GS','FBGS') case('GS','FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('BWGS') case('BWGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_bwgs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_bwgs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('L1-GS','L1-FBGS') case('L1-GS','L1-FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('KRM') case('KRM')
block block
type(amg_d_krm_solver_type) :: krm_slv type(amg_d_krm_solver_type) :: krm_slv
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos)
call p%precv(nlev_)%set(krm_slv,info) call p%precv(nlev_)%set(krm_slv,info)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
end block end block
end select end select
@ -638,11 +716,16 @@ subroutine amg_dcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
case('COARSE_MAT') case('COARSE_MAT')
if (nlev_ > 1) then if (nlev_ > 1) then
hier_asb = p%precv(nlev_)%ac%is_asb()
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_stringval(string))
call p%precv(nlev_)%set('COARSE_MAT',string,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',string,info,pos=pos)
end if end if
case('COARSE_SOLVE') case('COARSE_SOLVE')
if (nlev_ > 1) then if (nlev_ > 1) then
hier_asb = p%precv(nlev_)%ac%is_asb()
call p%precv(nlev_)%set('COARSE_SOLVE',string,info,pos=pos) call p%precv(nlev_)%set('COARSE_SOLVE',string,info,pos=pos)
select case (psb_toupper(trim(string))) select case (psb_toupper(trim(string)))
case('BJAC') case('BJAC')
@ -656,6 +739,9 @@ subroutine amg_dcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#else #else
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
#endif #endif
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info)
case('L1-BJAC') case('L1-BJAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos)
@ -668,59 +754,98 @@ subroutine amg_dcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#else #else
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
#endif #endif
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info)
case('SLU') case('SLU')
#if defined(HAVE_SLU_) #if defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('ILU') case('ILU')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('ILUT') case('ILUT')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_t_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_t_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('MILU') case('MILU')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_milu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_milu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('MUMPS') case('MUMPS')
#if defined(HAVE_MUMPS_) #if defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('UMF') case('UMF')
#if defined(HAVE_UMF_) #if defined(HAVE_UMF_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_umf_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_umf_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_SLU_) #elif defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
@ -728,50 +853,83 @@ subroutine amg_dcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#if defined(HAVE_SLUDIST_) #if defined(HAVE_SLUDIST_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_sludist_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_sludist_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#elif defined(HAVE_UMF_) #elif defined(HAVE_UMF_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_umf_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_umf_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_SLU_) #elif defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('JACOBI','JAC') case('JACOBI','JAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_diag_scale_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('L1-JACOBI','L1-JAC') case('L1-JACOBI','L1-JAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_l1_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_l1_diag_scale_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('GS','FBGS') case('GS','FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('BWGS') case('BWGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_bwgs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_bwgs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('L1-FBGS','L1-GS') case('L1-FBGS','L1-GS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('KRM') case('KRM')
block block
type(amg_d_krm_solver_type) :: krm_slv type(amg_d_krm_solver_type) :: krm_slv
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos)
call p%precv(nlev_)%set(krm_slv,info) call p%precv(nlev_)%set(krm_slv,info)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
end block end block
end select end select

@ -242,7 +242,6 @@ subroutine amg_dprecinit(ctxt,prec,ptype,info)
#else #else
call prec%set('COARSE_SOLVE','ILU',info) call prec%set('COARSE_SOLVE','ILU',info)
#endif #endif
case default case default
write(psb_err_unit,*) name,& write(psb_err_unit,*) name,&
&': Warning: Unknown preconditioner type request "',ptype,'"' &': Warning: Unknown preconditioner type request "',ptype,'"'

@ -336,6 +336,7 @@ subroutine amg_scprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
! Local variables ! Local variables
integer(psb_ipk_) :: ilev_, nlev_,val,ilmax_, il integer(psb_ipk_) :: ilev_, nlev_,val,ilmax_, il
character(len=*), parameter :: name='amg_precsetc' character(len=*), parameter :: name='amg_precsetc'
logical :: hier_asb
info = psb_success_ info = psb_success_
@ -459,6 +460,7 @@ subroutine amg_scprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
return return
end if end if
if (nlev_ > 1) then if (nlev_ > 1) then
hier_asb = p%precv(nlev_)%ac%is_asb()
select case (psb_toupper(string)) select case (psb_toupper(string))
case('BJAC') case('BJAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
@ -469,7 +471,11 @@ subroutine amg_scprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#else #else
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
#endif #endif
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info)
case('L1-BJAC') case('L1-BJAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos)
#if defined(HAVE_SLU_) #if defined(HAVE_SLU_)
@ -479,55 +485,91 @@ subroutine amg_scprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#else #else
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
#endif #endif
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info)
case('SLU') case('SLU')
#if defined(HAVE_SLU_) #if defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('ILU') case('ILU')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('ILUT') case('ILUT')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_t_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_t_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('MILU') case('MILU')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_milu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_milu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('MUMPS') case('MUMPS')
#if defined(HAVE_MUMPS_) #if defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('UMF') case('UMF')
#if defined(HAVE_SLU_) #if defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
@ -535,42 +577,69 @@ subroutine amg_scprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#if defined(HAVE_SLU_) #if defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('JACOBI','JAC') case('JACOBI','JAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_diag_scale_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('L1-JACOBI','L1-JAC') case('L1-JACOBI','L1-JAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_l1_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_l1_diag_scale_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('GS','FBGS') case('GS','FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('BWGS') case('BWGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_bwgs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_bwgs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('L1-GS','L1-FBGS') case('L1-GS','L1-FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('KRM') case('KRM')
block block
type(amg_s_krm_solver_type) :: krm_slv type(amg_s_krm_solver_type) :: krm_slv
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos)
call p%precv(nlev_)%set(krm_slv,info) call p%precv(nlev_)%set(krm_slv,info)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
end block end block
end select end select
@ -610,11 +679,16 @@ subroutine amg_scprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
case('COARSE_MAT') case('COARSE_MAT')
if (nlev_ > 1) then if (nlev_ > 1) then
hier_asb = p%precv(nlev_)%ac%is_asb()
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_stringval(string))
call p%precv(nlev_)%set('COARSE_MAT',string,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',string,info,pos=pos)
end if end if
case('COARSE_SOLVE') case('COARSE_SOLVE')
if (nlev_ > 1) then if (nlev_ > 1) then
hier_asb = p%precv(nlev_)%ac%is_asb()
call p%precv(nlev_)%set('COARSE_SOLVE',string,info,pos=pos) call p%precv(nlev_)%set('COARSE_SOLVE',string,info,pos=pos)
select case (psb_toupper(trim(string))) select case (psb_toupper(trim(string)))
case('BJAC') case('BJAC')
@ -626,6 +700,9 @@ subroutine amg_scprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#else #else
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
#endif #endif
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info)
case('L1-BJAC') case('L1-BJAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos)
@ -636,55 +713,91 @@ subroutine amg_scprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#else #else
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
#endif #endif
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info)
case('SLU') case('SLU')
#if defined(HAVE_SLU_) #if defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('ILU') case('ILU')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('ILUT') case('ILUT')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_t_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_t_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('MILU') case('MILU')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_milu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_milu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('MUMPS') case('MUMPS')
#if defined(HAVE_MUMPS_) #if defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('UMF') case('UMF')
#if defined(HAVE_SLU_) #if defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
@ -692,42 +805,69 @@ subroutine amg_scprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#if defined(HAVE_SLU_) #if defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('JACOBI','JAC') case('JACOBI','JAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_diag_scale_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('L1-JACOBI','L1-JAC') case('L1-JACOBI','L1-JAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_l1_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_l1_diag_scale_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('GS','FBGS') case('GS','FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('BWGS') case('BWGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_bwgs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_bwgs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('L1-FBGS','L1-GS') case('L1-FBGS','L1-GS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('KRM') case('KRM')
block block
type(amg_s_krm_solver_type) :: krm_slv type(amg_s_krm_solver_type) :: krm_slv
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos)
call p%precv(nlev_)%set(krm_slv,info) call p%precv(nlev_)%set(krm_slv,info)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
end block end block
end select end select

@ -237,7 +237,6 @@ subroutine amg_sprecinit(ctxt,prec,ptype,info)
#else #else
call prec%set('COARSE_SOLVE','ILU',info) call prec%set('COARSE_SOLVE','ILU',info)
#endif #endif
case default case default
write(psb_err_unit,*) name,& write(psb_err_unit,*) name,&
&': Warning: Unknown preconditioner type request "',ptype,'"' &': Warning: Unknown preconditioner type request "',ptype,'"'

@ -348,6 +348,7 @@ subroutine amg_zcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
! Local variables ! Local variables
integer(psb_ipk_) :: ilev_, nlev_,val,ilmax_, il integer(psb_ipk_) :: ilev_, nlev_,val,ilmax_, il
character(len=*), parameter :: name='amg_precsetc' character(len=*), parameter :: name='amg_precsetc'
logical :: hier_asb
info = psb_success_ info = psb_success_
@ -471,6 +472,7 @@ subroutine amg_zcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
return return
end if end if
if (nlev_ > 1) then if (nlev_ > 1) then
hier_asb = p%precv(nlev_)%ac%is_asb()
select case (psb_toupper(string)) select case (psb_toupper(string))
case('BJAC') case('BJAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
@ -483,7 +485,11 @@ subroutine amg_zcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#else #else
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
#endif #endif
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info)
case('L1-BJAC') case('L1-BJAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos)
#if defined(HAVE_UMF_) #if defined(HAVE_UMF_)
@ -495,59 +501,98 @@ subroutine amg_zcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#else #else
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
#endif #endif
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info)
case('SLU') case('SLU')
#if defined(HAVE_SLU_) #if defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('ILU') case('ILU')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('ILUT') case('ILUT')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_t_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_t_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('MILU') case('MILU')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_milu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_milu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('MUMPS') case('MUMPS')
#if defined(HAVE_MUMPS_) #if defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('UMF') case('UMF')
#if defined(HAVE_UMF_) #if defined(HAVE_UMF_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_umf_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_umf_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_SLU_) #elif defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
@ -555,50 +600,83 @@ subroutine amg_zcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#if defined(HAVE_SLUDIST_) #if defined(HAVE_SLUDIST_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_sludist_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_sludist_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#elif defined(HAVE_UMF_) #elif defined(HAVE_UMF_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_umf_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_umf_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_SLU_) #elif defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('JACOBI','JAC') case('JACOBI','JAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_diag_scale_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('L1-JACOBI','L1-JAC') case('L1-JACOBI','L1-JAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_l1_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_l1_diag_scale_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('GS','FBGS') case('GS','FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('BWGS') case('BWGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_bwgs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_bwgs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('L1-GS','L1-FBGS') case('L1-GS','L1-FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('KRM') case('KRM')
block block
type(amg_z_krm_solver_type) :: krm_slv type(amg_z_krm_solver_type) :: krm_slv
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos)
call p%precv(nlev_)%set(krm_slv,info) call p%precv(nlev_)%set(krm_slv,info)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
end block end block
end select end select
@ -638,11 +716,16 @@ subroutine amg_zcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
case('COARSE_MAT') case('COARSE_MAT')
if (nlev_ > 1) then if (nlev_ > 1) then
hier_asb = p%precv(nlev_)%ac%is_asb()
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_stringval(string))
call p%precv(nlev_)%set('COARSE_MAT',string,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',string,info,pos=pos)
end if end if
case('COARSE_SOLVE') case('COARSE_SOLVE')
if (nlev_ > 1) then if (nlev_ > 1) then
hier_asb = p%precv(nlev_)%ac%is_asb()
call p%precv(nlev_)%set('COARSE_SOLVE',string,info,pos=pos) call p%precv(nlev_)%set('COARSE_SOLVE',string,info,pos=pos)
select case (psb_toupper(trim(string))) select case (psb_toupper(trim(string)))
case('BJAC') case('BJAC')
@ -656,6 +739,9 @@ subroutine amg_zcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#else #else
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
#endif #endif
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info)
case('L1-BJAC') case('L1-BJAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos)
@ -668,59 +754,98 @@ subroutine amg_zcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#else #else
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
#endif #endif
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info)
case('SLU') case('SLU')
#if defined(HAVE_SLU_) #if defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('ILU') case('ILU')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('ILUT') case('ILUT')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_t_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_t_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('MILU') case('MILU')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_milu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_milu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
case('MUMPS') case('MUMPS')
#if defined(HAVE_MUMPS_) #if defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('UMF') case('UMF')
#if defined(HAVE_UMF_) #if defined(HAVE_UMF_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_umf_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_umf_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_SLU_) #elif defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
@ -728,50 +853,83 @@ subroutine amg_zcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
#if defined(HAVE_SLUDIST_) #if defined(HAVE_SLUDIST_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_sludist_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_sludist_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#elif defined(HAVE_UMF_) #elif defined(HAVE_UMF_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_umf_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_umf_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_SLU_) #elif defined(HAVE_SLU_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_slu_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_repl_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_repl_mat_,info,pos=pos)
#elif defined(HAVE_MUMPS_) #elif defined(HAVE_MUMPS_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_mumps_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#else #else
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',psb_ilu_n_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
#endif #endif
case('JACOBI','JAC') case('JACOBI','JAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_diag_scale_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('L1-JACOBI','L1-JAC') case('L1-JACOBI','L1-JAC')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_l1_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_l1_diag_scale_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('GS','FBGS') case('GS','FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('BWGS') case('BWGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_bwgs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_bwgs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('L1-FBGS','L1-GS') case('L1-FBGS','L1-GS')
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_l1_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',amg_gs_,info,pos=pos)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
case('KRM') case('KRM')
block block
type(amg_z_krm_solver_type) :: krm_slv type(amg_z_krm_solver_type) :: krm_slv
call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',amg_krm_,info,pos=pos)
call p%precv(nlev_)%set(krm_slv,info) call p%precv(nlev_)%set(krm_slv,info)
if (hier_asb) &
& call amg_warn_coarse_mat(p%precv(nlev_)%parms%get_coarse_mat(),&
& amg_distr_mat_)
call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',amg_distr_mat_,info,pos=pos)
end block end block
end select end select

@ -242,7 +242,6 @@ subroutine amg_zprecinit(ctxt,prec,ptype,info)
#else #else
call prec%set('COARSE_SOLVE','ILU',info) call prec%set('COARSE_SOLVE','ILU',info)
#endif #endif
case default case default
write(psb_err_unit,*) name,& write(psb_err_unit,*) name,&
&': Warning: Unknown preconditioner type request "',ptype,'"' &': Warning: Unknown preconditioner type request "',ptype,'"'

Loading…
Cancel
Save