mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-06 22:55:12 +00:00
mld2p4:
mlprec/mld_cprecset.f90 mlprec/mld_dprecset.f90 mlprec/mld_prec_type.f90 mlprec/mld_sprecset.f90 mlprec/mld_zprecset.f90 Fix precset for lower levels: has to set at least level 1.
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user