Rewrite precbld to simply call hierarchy/smoothers.

stopcriterion
Salvatore Filippone 7 years ago
parent 7d4264176a
commit d2ebac6a77

@ -130,64 +130,24 @@ subroutine mld_cprecbld(a,desc_a,prec,info,amold,vmold,imold)
end if end if
! !
! Number of levels = 1 ! Build the preconditioner
! !
if (iszv == 1) then call prec%hierarchy_build(a,desc_a,info)
!
! Check on the iprcparm contents: they should be the same if (info /= psb_success_) then
! on all processes. info=psb_err_internal_error_
! call psb_errpush(info,name,a_err='Error from hierarchy build')
call psb_bcast(ictxt,prec%precv(1)%parms) goto 9999
end if
prec%precv(1)%base_a => a
prec%precv(1)%base_desc => desc_a call prec%smoothers_build(a,desc_a,info,amold,vmold,imold)
if (info /= psb_success_) then if (info /= psb_success_) then
call psb_errpush(psb_err_internal_error_,name,a_err='Base level precbuild.') info=psb_err_internal_error_
goto 9999 call psb_errpush(info,name,a_err='Error from smoothers build')
end if goto 9999
call prec%precv(1)%check(info)
if (info /= psb_success_) then
write(0,*) ' Smoother check error',info
call psb_errpush(psb_err_internal_error_,name,&
& a_err='One level preconditioner check.')
goto 9999
endif
call prec%precv(1)%sm%build(a,desc_a,info,&
& amold=amold,vmold=vmold,imold=imold)
if (info /= psb_success_) then
call psb_errpush(psb_err_internal_error_,name,&
& a_err='One level preconditioner build.')
goto 9999
endif
!
! Number of levels > 1
!
else if (iszv > 1) then
!
! Build the multilevel preconditioner
!
call prec%hierarchy_build(a,desc_a,info)
if (info /= psb_success_) then
info=psb_err_internal_error_
call psb_errpush(info,name,a_err='Error from hierarchy build')
goto 9999
end if
call prec%smoothers_build(a,desc_a,info,amold,vmold,imold)
if (info /= psb_success_) then
info=psb_err_internal_error_
call psb_errpush(info,name,a_err='Error from smoothers build')
goto 9999
end if
end if end if
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -130,64 +130,24 @@ subroutine mld_dprecbld(a,desc_a,prec,info,amold,vmold,imold)
end if end if
! !
! Number of levels = 1 ! Build the preconditioner
! !
if (iszv == 1) then call prec%hierarchy_build(a,desc_a,info)
!
! Check on the iprcparm contents: they should be the same if (info /= psb_success_) then
! on all processes. info=psb_err_internal_error_
! call psb_errpush(info,name,a_err='Error from hierarchy build')
call psb_bcast(ictxt,prec%precv(1)%parms) goto 9999
end if
prec%precv(1)%base_a => a
prec%precv(1)%base_desc => desc_a call prec%smoothers_build(a,desc_a,info,amold,vmold,imold)
if (info /= psb_success_) then if (info /= psb_success_) then
call psb_errpush(psb_err_internal_error_,name,a_err='Base level precbuild.') info=psb_err_internal_error_
goto 9999 call psb_errpush(info,name,a_err='Error from smoothers build')
end if goto 9999
call prec%precv(1)%check(info)
if (info /= psb_success_) then
write(0,*) ' Smoother check error',info
call psb_errpush(psb_err_internal_error_,name,&
& a_err='One level preconditioner check.')
goto 9999
endif
call prec%precv(1)%sm%build(a,desc_a,info,&
& amold=amold,vmold=vmold,imold=imold)
if (info /= psb_success_) then
call psb_errpush(psb_err_internal_error_,name,&
& a_err='One level preconditioner build.')
goto 9999
endif
!
! Number of levels > 1
!
else if (iszv > 1) then
!
! Build the multilevel preconditioner
!
call prec%hierarchy_build(a,desc_a,info)
if (info /= psb_success_) then
info=psb_err_internal_error_
call psb_errpush(info,name,a_err='Error from hierarchy build')
goto 9999
end if
call prec%smoothers_build(a,desc_a,info,amold,vmold,imold)
if (info /= psb_success_) then
info=psb_err_internal_error_
call psb_errpush(info,name,a_err='Error from smoothers build')
goto 9999
end if
end if end if
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -130,64 +130,24 @@ subroutine mld_sprecbld(a,desc_a,prec,info,amold,vmold,imold)
end if end if
! !
! Number of levels = 1 ! Build the preconditioner
! !
if (iszv == 1) then call prec%hierarchy_build(a,desc_a,info)
!
! Check on the iprcparm contents: they should be the same if (info /= psb_success_) then
! on all processes. info=psb_err_internal_error_
! call psb_errpush(info,name,a_err='Error from hierarchy build')
call psb_bcast(ictxt,prec%precv(1)%parms) goto 9999
end if
prec%precv(1)%base_a => a
prec%precv(1)%base_desc => desc_a call prec%smoothers_build(a,desc_a,info,amold,vmold,imold)
if (info /= psb_success_) then if (info /= psb_success_) then
call psb_errpush(psb_err_internal_error_,name,a_err='Base level precbuild.') info=psb_err_internal_error_
goto 9999 call psb_errpush(info,name,a_err='Error from smoothers build')
end if goto 9999
call prec%precv(1)%check(info)
if (info /= psb_success_) then
write(0,*) ' Smoother check error',info
call psb_errpush(psb_err_internal_error_,name,&
& a_err='One level preconditioner check.')
goto 9999
endif
call prec%precv(1)%sm%build(a,desc_a,info,&
& amold=amold,vmold=vmold,imold=imold)
if (info /= psb_success_) then
call psb_errpush(psb_err_internal_error_,name,&
& a_err='One level preconditioner build.')
goto 9999
endif
!
! Number of levels > 1
!
else if (iszv > 1) then
!
! Build the multilevel preconditioner
!
call prec%hierarchy_build(a,desc_a,info)
if (info /= psb_success_) then
info=psb_err_internal_error_
call psb_errpush(info,name,a_err='Error from hierarchy build')
goto 9999
end if
call prec%smoothers_build(a,desc_a,info,amold,vmold,imold)
if (info /= psb_success_) then
info=psb_err_internal_error_
call psb_errpush(info,name,a_err='Error from smoothers build')
goto 9999
end if
end if end if
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -130,64 +130,24 @@ subroutine mld_zprecbld(a,desc_a,prec,info,amold,vmold,imold)
end if end if
! !
! Number of levels = 1 ! Build the preconditioner
! !
if (iszv == 1) then call prec%hierarchy_build(a,desc_a,info)
!
! Check on the iprcparm contents: they should be the same if (info /= psb_success_) then
! on all processes. info=psb_err_internal_error_
! call psb_errpush(info,name,a_err='Error from hierarchy build')
call psb_bcast(ictxt,prec%precv(1)%parms) goto 9999
end if
prec%precv(1)%base_a => a
prec%precv(1)%base_desc => desc_a call prec%smoothers_build(a,desc_a,info,amold,vmold,imold)
if (info /= psb_success_) then if (info /= psb_success_) then
call psb_errpush(psb_err_internal_error_,name,a_err='Base level precbuild.') info=psb_err_internal_error_
goto 9999 call psb_errpush(info,name,a_err='Error from smoothers build')
end if goto 9999
call prec%precv(1)%check(info)
if (info /= psb_success_) then
write(0,*) ' Smoother check error',info
call psb_errpush(psb_err_internal_error_,name,&
& a_err='One level preconditioner check.')
goto 9999
endif
call prec%precv(1)%sm%build(a,desc_a,info,&
& amold=amold,vmold=vmold,imold=imold)
if (info /= psb_success_) then
call psb_errpush(psb_err_internal_error_,name,&
& a_err='One level preconditioner build.')
goto 9999
endif
!
! Number of levels > 1
!
else if (iszv > 1) then
!
! Build the multilevel preconditioner
!
call prec%hierarchy_build(a,desc_a,info)
if (info /= psb_success_) then
info=psb_err_internal_error_
call psb_errpush(info,name,a_err='Error from hierarchy build')
goto 9999
end if
call prec%smoothers_build(a,desc_a,info,amold,vmold,imold)
if (info /= psb_success_) then
info=psb_err_internal_error_
call psb_errpush(info,name,a_err='Error from smoothers build')
goto 9999
end if
end if end if
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

Loading…
Cancel
Save