mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-20 12:52:14 +00:00
Change handling of stopping criterion, refactor GMRES
This commit is contained in:
@@ -156,13 +156,31 @@ Subroutine psb_dcgstab_vect(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,ist
|
||||
|
||||
If (Present(istop)) Then
|
||||
istop_ = istop
|
||||
Else
|
||||
istop_ = 2
|
||||
Endif
|
||||
else
|
||||
istop_ = psb_get_istop_default()
|
||||
endif
|
||||
if (.not.psb_is_valid_istop(istop_)) then
|
||||
info=psb_err_invalid_istop_
|
||||
err=info
|
||||
call psb_errpush(info,name,i_err=(/istop_/))
|
||||
goto 9999
|
||||
end if
|
||||
!
|
||||
! ISTOP_ = 1: Normwise backward error, infinity norm
|
||||
! ISTOP_ = 2: ||r||/||b|| norm 2
|
||||
! istop_ = 1: normwise backward error, infinity norm
|
||||
! istop_ = 2: ||r||/||b|| norm 2
|
||||
!
|
||||
select case(istop_)
|
||||
case(psb_istop_ani_,psb_istop_bn2_,&
|
||||
& psb_istop_rn2_abs_, psb_istop_rrn2_)
|
||||
! nothing needed
|
||||
case default
|
||||
! should never get here
|
||||
info=psb_err_internal_error_
|
||||
err=info
|
||||
call psb_errpush(info,name,a_err="invalid istop_")
|
||||
goto 9999
|
||||
end select
|
||||
|
||||
! = if (.not.same_type_as(x,b)) then
|
||||
! = write(0,*) 'Warning: different dynamic types for X and B '
|
||||
! = end if
|
||||
|
||||
Reference in New Issue
Block a user