Added options for coarse BJAC sets

mergeparmatch
Cirdans-Home 4 years ago
parent baa4e78626
commit 64a65e3f6c

@ -435,6 +435,14 @@ subroutine amg_ccprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
do il=ilev_, ilmax_ do il=ilev_, ilmax_
call p%precv(il)%set(what,amg_repl_mat_,info,pos=pos) call p%precv(il)%set(what,amg_repl_mat_,info,pos=pos)
end do end do
case('BJAC_STOP')
do il=ilev_, ilmax_
call p%precv(il)%set('SMOOTHER_STOP',string,info,pos=pos)
end do
case('BJAC_TRACE')
do il=ilev_, ilmax_
call p%precv(il)%set('SMOOTHER_TRACE',string,info,pos=pos)
end do
case('COARSE_SUBSOLVE') case('COARSE_SUBSOLVE')
if (ilev_ /= nlev_) then if (ilev_ /= nlev_) then
write(psb_err_unit,*) name,& write(psb_err_unit,*) name,&
@ -711,6 +719,15 @@ subroutine amg_ccprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
end select end select
endif endif
case('BJAC_STOP')
if (nlev_ > 1) then
call p%precv(il)%set('SMOOTHER_STOP',string,info,pos=pos)
end if
case('BJAC_TRACE')
if (nlev_ > 1) then
call p%precv(il)%set('SMOOTHER_TRACE',string,info,pos=pos)
end if
case('COARSE_SUBSOLVE') case('COARSE_SUBSOLVE')
if (nlev_ > 1) then if (nlev_ > 1) then
call p%precv(nlev_)%set('SUB_SOLVE',string,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',string,info,pos=pos)
@ -840,10 +857,17 @@ subroutine amg_ccprecsetr(p,what,val,info,ilev,ilmax,pos,idx)
! !
if (present(ilev)) then if (present(ilev)) then
select case(psb_toupper(trim(what)))
case('BJAC_STOPTOL')
do il=ilev_, ilmax_
call p%precv(il)%set('SMOOTHER_STOPTOL',val,info,pos=pos)
end do
case default
! Nothing to do here, setted elsewhere
do il=ilev_, ilmax_ do il=ilev_, ilmax_
call p%precv(il)%set(what,val,info,pos=pos,idx=idx) call p%precv(il)%set(what,val,info,pos=pos,idx=idx)
end do end do
end select
else if (.not.present(ilev)) then else if (.not.present(ilev)) then
! !
! ilev not specified: set preconditioner parameters at all the appropriate levels ! ilev not specified: set preconditioner parameters at all the appropriate levels
@ -853,7 +877,9 @@ subroutine amg_ccprecsetr(p,what,val,info,ilev,ilmax,pos,idx)
case('COARSE_ILUTHRS') case('COARSE_ILUTHRS')
ilev_=nlev_ ilev_=nlev_
call p%precv(ilev_)%set('SUB_ILUTHRS',val,info,pos=pos) call p%precv(ilev_)%set('SUB_ILUTHRS',val,info,pos=pos)
case('BJAC_STOPTOL')
ilev_=nlev_
call p%precv(ilev_)%set('SMOOTHER_STOPTOL',val,info,pos=pos)
case default case default
do il=1,nlev_ do il=1,nlev_

@ -447,6 +447,14 @@ subroutine amg_dcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
do il=ilev_, ilmax_ do il=ilev_, ilmax_
call p%precv(il)%set(what,amg_repl_mat_,info,pos=pos) call p%precv(il)%set(what,amg_repl_mat_,info,pos=pos)
end do end do
case('BJAC_STOP')
do il=ilev_, ilmax_
call p%precv(il)%set('SMOOTHER_STOP',string,info,pos=pos)
end do
case('BJAC_TRACE')
do il=ilev_, ilmax_
call p%precv(il)%set('SMOOTHER_TRACE',string,info,pos=pos)
end do
case('COARSE_SUBSOLVE') case('COARSE_SUBSOLVE')
if (ilev_ /= nlev_) then if (ilev_ /= nlev_) then
write(psb_err_unit,*) name,& write(psb_err_unit,*) name,&
@ -751,6 +759,15 @@ subroutine amg_dcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
end select end select
endif endif
case('BJAC_STOP')
if (nlev_ > 1) then
call p%precv(il)%set('SMOOTHER_STOP',string,info,pos=pos)
end if
case('BJAC_TRACE')
if (nlev_ > 1) then
call p%precv(il)%set('SMOOTHER_TRACE',string,info,pos=pos)
end if
case('COARSE_SUBSOLVE') case('COARSE_SUBSOLVE')
if (nlev_ > 1) then if (nlev_ > 1) then
call p%precv(nlev_)%set('SUB_SOLVE',string,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',string,info,pos=pos)
@ -880,10 +897,17 @@ subroutine amg_dcprecsetr(p,what,val,info,ilev,ilmax,pos,idx)
! !
if (present(ilev)) then if (present(ilev)) then
select case(psb_toupper(trim(what)))
case('BJAC_STOPTOL')
do il=ilev_, ilmax_
call p%precv(il)%set('SMOOTHER_STOPTOL',val,info,pos=pos)
end do
case default
! Nothing to do here, setted elsewhere
do il=ilev_, ilmax_ do il=ilev_, ilmax_
call p%precv(il)%set(what,val,info,pos=pos,idx=idx) call p%precv(il)%set(what,val,info,pos=pos,idx=idx)
end do end do
end select
else if (.not.present(ilev)) then else if (.not.present(ilev)) then
! !
! ilev not specified: set preconditioner parameters at all the appropriate levels ! ilev not specified: set preconditioner parameters at all the appropriate levels
@ -893,7 +917,9 @@ subroutine amg_dcprecsetr(p,what,val,info,ilev,ilmax,pos,idx)
case('COARSE_ILUTHRS') case('COARSE_ILUTHRS')
ilev_=nlev_ ilev_=nlev_
call p%precv(ilev_)%set('SUB_ILUTHRS',val,info,pos=pos) call p%precv(ilev_)%set('SUB_ILUTHRS',val,info,pos=pos)
case('BJAC_STOPTOL')
ilev_=nlev_
call p%precv(ilev_)%set('SMOOTHER_STOPTOL',val,info,pos=pos)
case default case default
do il=1,nlev_ do il=1,nlev_

@ -435,6 +435,14 @@ subroutine amg_scprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
do il=ilev_, ilmax_ do il=ilev_, ilmax_
call p%precv(il)%set(what,amg_repl_mat_,info,pos=pos) call p%precv(il)%set(what,amg_repl_mat_,info,pos=pos)
end do end do
case('BJAC_STOP')
do il=ilev_, ilmax_
call p%precv(il)%set('SMOOTHER_STOP',string,info,pos=pos)
end do
case('BJAC_TRACE')
do il=ilev_, ilmax_
call p%precv(il)%set('SMOOTHER_TRACE',string,info,pos=pos)
end do
case('COARSE_SUBSOLVE') case('COARSE_SUBSOLVE')
if (ilev_ /= nlev_) then if (ilev_ /= nlev_) then
write(psb_err_unit,*) name,& write(psb_err_unit,*) name,&
@ -711,6 +719,15 @@ subroutine amg_scprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
end select end select
endif endif
case('BJAC_STOP')
if (nlev_ > 1) then
call p%precv(il)%set('SMOOTHER_STOP',string,info,pos=pos)
end if
case('BJAC_TRACE')
if (nlev_ > 1) then
call p%precv(il)%set('SMOOTHER_TRACE',string,info,pos=pos)
end if
case('COARSE_SUBSOLVE') case('COARSE_SUBSOLVE')
if (nlev_ > 1) then if (nlev_ > 1) then
call p%precv(nlev_)%set('SUB_SOLVE',string,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',string,info,pos=pos)
@ -840,10 +857,17 @@ subroutine amg_scprecsetr(p,what,val,info,ilev,ilmax,pos,idx)
! !
if (present(ilev)) then if (present(ilev)) then
select case(psb_toupper(trim(what)))
case('BJAC_STOPTOL')
do il=ilev_, ilmax_
call p%precv(il)%set('SMOOTHER_STOPTOL',val,info,pos=pos)
end do
case default
! Nothing to do here, setted elsewhere
do il=ilev_, ilmax_ do il=ilev_, ilmax_
call p%precv(il)%set(what,val,info,pos=pos,idx=idx) call p%precv(il)%set(what,val,info,pos=pos,idx=idx)
end do end do
end select
else if (.not.present(ilev)) then else if (.not.present(ilev)) then
! !
! ilev not specified: set preconditioner parameters at all the appropriate levels ! ilev not specified: set preconditioner parameters at all the appropriate levels
@ -853,7 +877,9 @@ subroutine amg_scprecsetr(p,what,val,info,ilev,ilmax,pos,idx)
case('COARSE_ILUTHRS') case('COARSE_ILUTHRS')
ilev_=nlev_ ilev_=nlev_
call p%precv(ilev_)%set('SUB_ILUTHRS',val,info,pos=pos) call p%precv(ilev_)%set('SUB_ILUTHRS',val,info,pos=pos)
case('BJAC_STOPTOL')
ilev_=nlev_
call p%precv(ilev_)%set('SMOOTHER_STOPTOL',val,info,pos=pos)
case default case default
do il=1,nlev_ do il=1,nlev_

@ -447,6 +447,14 @@ subroutine amg_zcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
do il=ilev_, ilmax_ do il=ilev_, ilmax_
call p%precv(il)%set(what,amg_repl_mat_,info,pos=pos) call p%precv(il)%set(what,amg_repl_mat_,info,pos=pos)
end do end do
case('BJAC_STOP')
do il=ilev_, ilmax_
call p%precv(il)%set('SMOOTHER_STOP',string,info,pos=pos)
end do
case('BJAC_TRACE')
do il=ilev_, ilmax_
call p%precv(il)%set('SMOOTHER_TRACE',string,info,pos=pos)
end do
case('COARSE_SUBSOLVE') case('COARSE_SUBSOLVE')
if (ilev_ /= nlev_) then if (ilev_ /= nlev_) then
write(psb_err_unit,*) name,& write(psb_err_unit,*) name,&
@ -751,6 +759,15 @@ subroutine amg_zcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
end select end select
endif endif
case('BJAC_STOP')
if (nlev_ > 1) then
call p%precv(il)%set('SMOOTHER_STOP',string,info,pos=pos)
end if
case('BJAC_TRACE')
if (nlev_ > 1) then
call p%precv(il)%set('SMOOTHER_TRACE',string,info,pos=pos)
end if
case('COARSE_SUBSOLVE') case('COARSE_SUBSOLVE')
if (nlev_ > 1) then if (nlev_ > 1) then
call p%precv(nlev_)%set('SUB_SOLVE',string,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',string,info,pos=pos)
@ -880,10 +897,17 @@ subroutine amg_zcprecsetr(p,what,val,info,ilev,ilmax,pos,idx)
! !
if (present(ilev)) then if (present(ilev)) then
select case(psb_toupper(trim(what)))
case('BJAC_STOPTOL')
do il=ilev_, ilmax_
call p%precv(il)%set('SMOOTHER_STOPTOL',val,info,pos=pos)
end do
case default
! Nothing to do here, setted elsewhere
do il=ilev_, ilmax_ do il=ilev_, ilmax_
call p%precv(il)%set(what,val,info,pos=pos,idx=idx) call p%precv(il)%set(what,val,info,pos=pos,idx=idx)
end do end do
end select
else if (.not.present(ilev)) then else if (.not.present(ilev)) then
! !
! ilev not specified: set preconditioner parameters at all the appropriate levels ! ilev not specified: set preconditioner parameters at all the appropriate levels
@ -893,7 +917,9 @@ subroutine amg_zcprecsetr(p,what,val,info,ilev,ilmax,pos,idx)
case('COARSE_ILUTHRS') case('COARSE_ILUTHRS')
ilev_=nlev_ ilev_=nlev_
call p%precv(ilev_)%set('SUB_ILUTHRS',val,info,pos=pos) call p%precv(ilev_)%set('SUB_ILUTHRS',val,info,pos=pos)
case('BJAC_STOPTOL')
ilev_=nlev_
call p%precv(ilev_)%set('SMOOTHER_STOPTOL',val,info,pos=pos)
case default case default
do il=1,nlev_ do il=1,nlev_

Loading…
Cancel
Save