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.
stopcriterion
Salvatore Filippone 17 years ago
parent 2ba7813a64
commit 8f87ed6703

@ -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_,& case(mld_smoother_type_,mld_sub_solve_,mld_sub_restr_,mld_sub_prol_,&
& mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,& & mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,&
& mld_smoother_sweeps_) & mld_smoother_sweeps_)
do ilev_=1,nlev_-1 do ilev_=1,max(1,nlev_-1)
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
write(0,*) name,& write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT' &': 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_,& case(mld_smoother_type_,mld_sub_solve_,mld_sub_restr_,mld_sub_prol_,&
& mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,& & mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,&
& mld_smoother_sweeps_) & mld_smoother_sweeps_)
do ilev_=1,nlev_-1 do ilev_=1,max(1,nlev_-1)
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
write(0,*) name,& write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT' &': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'
@ -483,6 +483,14 @@ subroutine mld_dprecsetr(p,what,val,info,ilev)
endif endif
p%baseprecv(ilev_)%rprcparm(what) = val p%baseprecv(ilev_)%rprcparm(what) = val
end do 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_) case(mld_aggr_damp_)
do ilev_=2,nlev_ do ilev_=2,nlev_
if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then if (.not.allocated(p%baseprecv(ilev_)%rprcparm)) then

@ -321,7 +321,8 @@ module mld_prec_type
integer, parameter :: mld_fact_thrs_ = 1 integer, parameter :: mld_fact_thrs_ = 1
integer, parameter :: mld_aggr_damp_ = 2 integer, parameter :: mld_aggr_damp_ = 2
integer, parameter :: mld_aggr_thresh_ = 3 integer, parameter :: mld_aggr_thresh_ = 3
integer, parameter :: mld_rfpsz_=4 integer, parameter :: mld_coarse_fthrs_ = 4
integer, parameter :: mld_rfpsz_ = 8
! !
! Fields for sparse matrices ensembles stored in av() ! 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_,& case(mld_smoother_type_,mld_sub_solve_,mld_sub_restr_,mld_sub_prol_,&
& mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,& & mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,&
& mld_smoother_sweeps_) & mld_smoother_sweeps_)
do ilev_=1,nlev_-1 do ilev_=1,max(1,nlev_-1)
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
write(0,*) name,& write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT' &': 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_,& case(mld_smoother_type_,mld_sub_solve_,mld_sub_restr_,mld_sub_prol_,&
& mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,& & mld_sub_ren_,mld_sub_ovr_,mld_sub_fillin_,&
& mld_smoother_sweeps_) & mld_smoother_sweeps_)
do ilev_=1,nlev_-1 do ilev_=1,max(1,nlev_-1)
if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then if (.not.allocated(p%baseprecv(ilev_)%iprcparm)) then
write(0,*) name,& write(0,*) name,&
&': Error: Uninitialized preconditioner component, should call MLD_PRECINIT' &': Error: Uninitialized preconditioner component, should call MLD_PRECINIT'

Loading…
Cancel
Save