diff --git a/mlprec/mld_cprecset.f90 b/mlprec/mld_cprecset.f90 index 9ae24024..3c392ffd 100644 --- a/mlprec/mld_cprecset.f90 +++ b/mlprec/mld_cprecset.f90 @@ -201,7 +201,7 @@ subroutine mld_cprecseti(p,what,val,info,ilev) case(mld_smoother_type_,mld_sub_solve_,mld_sub_restr_,mld_sub_prol_,& & mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,& & mld_smoother_sweeps_) - do ilev_=1,nlev_-1 + do ilev_=1,max(1,nlev_-1) if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then write(0,*) name,& &': Error: Uninitialized preconditioner component, should call MLD_PRECINIT' diff --git a/mlprec/mld_dprecset.f90 b/mlprec/mld_dprecset.f90 index 87c18104..01df98ae 100644 --- a/mlprec/mld_dprecset.f90 +++ b/mlprec/mld_dprecset.f90 @@ -201,7 +201,7 @@ subroutine mld_dprecseti(p,what,val,info,ilev) case(mld_smoother_type_,mld_sub_solve_,mld_sub_restr_,mld_sub_prol_,& & mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,& & mld_smoother_sweeps_) - do ilev_=1,nlev_-1 + do ilev_=1,max(1,nlev_-1) if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then write(0,*) name,& &': Error: Uninitialized preconditioner component, should call MLD_PRECINIT' @@ -483,6 +483,14 @@ subroutine mld_dprecsetr(p,what,val,info,ilev) endif p%baseprecv(ilev_)%rprcparm(what) = val end do + case(mld_coarse_fthrs_) + ilev_=nlev_ + if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then + write(0,*) name,': Error: Uninitialized preconditioner component, should call MLD_PRECINIT' + info = -1 + return + endif + p%baseprecv(ilev_)%rprcparm(mld_fact_thrs_) = val case(mld_aggr_damp_) do ilev_=2,nlev_ if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then diff --git a/mlprec/mld_prec_type.f90 b/mlprec/mld_prec_type.f90 index d73b9fac..f815a340 100644 --- a/mlprec/mld_prec_type.f90 +++ b/mlprec/mld_prec_type.f90 @@ -318,10 +318,11 @@ module mld_prec_type ! ! Entries in rprcparm: ILU(k,t) threshold, smoothed aggregation omega ! - integer, parameter :: mld_fact_thrs_=1 - integer, parameter :: mld_aggr_damp_=2 - integer, parameter :: mld_aggr_thresh_=3 - integer, parameter :: mld_rfpsz_=4 + integer, parameter :: mld_fact_thrs_ = 1 + integer, parameter :: mld_aggr_damp_ = 2 + integer, parameter :: mld_aggr_thresh_ = 3 + integer, parameter :: mld_coarse_fthrs_ = 4 + integer, parameter :: mld_rfpsz_ = 8 ! ! Fields for sparse matrices ensembles stored in av() diff --git a/mlprec/mld_sprecset.f90 b/mlprec/mld_sprecset.f90 index 5fb16851..3236e5ab 100644 --- a/mlprec/mld_sprecset.f90 +++ b/mlprec/mld_sprecset.f90 @@ -201,7 +201,7 @@ subroutine mld_sprecseti(p,what,val,info,ilev) case(mld_smoother_type_,mld_sub_solve_,mld_sub_restr_,mld_sub_prol_,& & mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,& & mld_smoother_sweeps_) - do ilev_=1,nlev_-1 + do ilev_=1,max(1,nlev_-1) if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then write(0,*) name,& &': Error: Uninitialized preconditioner component, should call MLD_PRECINIT' diff --git a/mlprec/mld_zprecset.f90 b/mlprec/mld_zprecset.f90 index edf2982d..ad23daca 100644 --- a/mlprec/mld_zprecset.f90 +++ b/mlprec/mld_zprecset.f90 @@ -201,7 +201,7 @@ subroutine mld_zprecseti(p,what,val,info,ilev) case(mld_smoother_type_,mld_sub_solve_,mld_sub_restr_,mld_sub_prol_,& & mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,& & mld_smoother_sweeps_) - do ilev_=1,nlev_-1 + do ilev_=1,max(1,nlev_-1) if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then write(0,*) name,& &': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'