Fix SHFT implementation

maint-3.8.1
Salvatore Filippone 1 year ago
parent 0b184e4313
commit 250a6300ba

@ -145,6 +145,7 @@ subroutine psb_ciluk_fact(fill_in,ialg,a,l,u,d,info,blck,shft)
! Local Variables ! Local Variables
integer(psb_ipk_) :: l1, l2, m, err_act integer(psb_ipk_) :: l1, l2, m, err_act
complex(psb_spk_) :: shft_
type(psb_cspmat_type), pointer :: blck_ type(psb_cspmat_type), pointer :: blck_
type(psb_c_csr_sparse_mat) :: ll, uu type(psb_c_csr_sparse_mat) :: ll, uu
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
@ -168,6 +169,11 @@ subroutine psb_ciluk_fact(fill_in,ialg,a,l,u,d,info,blck,shft)
goto 9999 goto 9999
end if end if
endif endif
if (present(shft)) then
shft_ = shft
else
shft_ = czero
end if
m = a%get_nrows() + blck_%get_nrows() m = a%get_nrows() + blck_%get_nrows()
if ((m /= l%get_nrows()).or.(m /= u%get_nrows()).or.& if ((m /= l%get_nrows()).or.(m /= u%get_nrows()).or.&

@ -143,6 +143,7 @@ subroutine psb_cilut_fact(fill_in,thres,a,l,u,d,info,blck,iscale,shft)
! Local Variables ! Local Variables
integer(psb_ipk_) :: l1, l2, m, err_act, iscale_ integer(psb_ipk_) :: l1, l2, m, err_act, iscale_
complex(psb_spk_) :: shft_
type(psb_cspmat_type), pointer :: blck_ type(psb_cspmat_type), pointer :: blck_
type(psb_c_csr_sparse_mat) :: ll, uu type(psb_c_csr_sparse_mat) :: ll, uu
real(psb_spk_) :: scale real(psb_spk_) :: scale
@ -178,6 +179,11 @@ subroutine psb_cilut_fact(fill_in,thres,a,l,u,d,info,blck,iscale,shft)
else else
iscale_ = psb_ilu_scale_none_ iscale_ = psb_ilu_scale_none_
end if end if
if (present(shft)) then
shft_ = shft
else
shft_ = czero
end if
select case(iscale_) select case(iscale_)
case(psb_ilu_scale_none_) case(psb_ilu_scale_none_)

@ -145,6 +145,7 @@ subroutine psb_diluk_fact(fill_in,ialg,a,l,u,d,info,blck,shft)
! Local Variables ! Local Variables
integer(psb_ipk_) :: l1, l2, m, err_act integer(psb_ipk_) :: l1, l2, m, err_act
real(psb_dpk_) :: shft_
type(psb_dspmat_type), pointer :: blck_ type(psb_dspmat_type), pointer :: blck_
type(psb_d_csr_sparse_mat) :: ll, uu type(psb_d_csr_sparse_mat) :: ll, uu
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
@ -168,6 +169,11 @@ subroutine psb_diluk_fact(fill_in,ialg,a,l,u,d,info,blck,shft)
goto 9999 goto 9999
end if end if
endif endif
if (present(shft)) then
shft_ = shft
else
shft_ = dzero
end if
m = a%get_nrows() + blck_%get_nrows() m = a%get_nrows() + blck_%get_nrows()
if ((m /= l%get_nrows()).or.(m /= u%get_nrows()).or.& if ((m /= l%get_nrows()).or.(m /= u%get_nrows()).or.&

@ -143,6 +143,7 @@ subroutine psb_dilut_fact(fill_in,thres,a,l,u,d,info,blck,iscale,shft)
! Local Variables ! Local Variables
integer(psb_ipk_) :: l1, l2, m, err_act, iscale_ integer(psb_ipk_) :: l1, l2, m, err_act, iscale_
real(psb_dpk_) :: shft_
type(psb_dspmat_type), pointer :: blck_ type(psb_dspmat_type), pointer :: blck_
type(psb_d_csr_sparse_mat) :: ll, uu type(psb_d_csr_sparse_mat) :: ll, uu
real(psb_dpk_) :: scale real(psb_dpk_) :: scale
@ -178,6 +179,11 @@ subroutine psb_dilut_fact(fill_in,thres,a,l,u,d,info,blck,iscale,shft)
else else
iscale_ = psb_ilu_scale_none_ iscale_ = psb_ilu_scale_none_
end if end if
if (present(shft)) then
shft_ = shft
else
shft_ = dzero
end if
select case(iscale_) select case(iscale_)
case(psb_ilu_scale_none_) case(psb_ilu_scale_none_)

@ -145,6 +145,7 @@ subroutine psb_siluk_fact(fill_in,ialg,a,l,u,d,info,blck,shft)
! Local Variables ! Local Variables
integer(psb_ipk_) :: l1, l2, m, err_act integer(psb_ipk_) :: l1, l2, m, err_act
real(psb_spk_) :: shft_
type(psb_sspmat_type), pointer :: blck_ type(psb_sspmat_type), pointer :: blck_
type(psb_s_csr_sparse_mat) :: ll, uu type(psb_s_csr_sparse_mat) :: ll, uu
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
@ -168,6 +169,11 @@ subroutine psb_siluk_fact(fill_in,ialg,a,l,u,d,info,blck,shft)
goto 9999 goto 9999
end if end if
endif endif
if (present(shft)) then
shft_ = shft
else
shft_ = szero
end if
m = a%get_nrows() + blck_%get_nrows() m = a%get_nrows() + blck_%get_nrows()
if ((m /= l%get_nrows()).or.(m /= u%get_nrows()).or.& if ((m /= l%get_nrows()).or.(m /= u%get_nrows()).or.&

@ -143,6 +143,7 @@ subroutine psb_silut_fact(fill_in,thres,a,l,u,d,info,blck,iscale,shft)
! Local Variables ! Local Variables
integer(psb_ipk_) :: l1, l2, m, err_act, iscale_ integer(psb_ipk_) :: l1, l2, m, err_act, iscale_
real(psb_spk_) :: shft_
type(psb_sspmat_type), pointer :: blck_ type(psb_sspmat_type), pointer :: blck_
type(psb_s_csr_sparse_mat) :: ll, uu type(psb_s_csr_sparse_mat) :: ll, uu
real(psb_spk_) :: scale real(psb_spk_) :: scale
@ -178,6 +179,11 @@ subroutine psb_silut_fact(fill_in,thres,a,l,u,d,info,blck,iscale,shft)
else else
iscale_ = psb_ilu_scale_none_ iscale_ = psb_ilu_scale_none_
end if end if
if (present(shft)) then
shft_ = shft
else
shft_ = szero
end if
select case(iscale_) select case(iscale_)
case(psb_ilu_scale_none_) case(psb_ilu_scale_none_)

@ -145,6 +145,7 @@ subroutine psb_ziluk_fact(fill_in,ialg,a,l,u,d,info,blck,shft)
! Local Variables ! Local Variables
integer(psb_ipk_) :: l1, l2, m, err_act integer(psb_ipk_) :: l1, l2, m, err_act
complex(psb_dpk_) :: shft_
type(psb_zspmat_type), pointer :: blck_ type(psb_zspmat_type), pointer :: blck_
type(psb_z_csr_sparse_mat) :: ll, uu type(psb_z_csr_sparse_mat) :: ll, uu
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
@ -168,6 +169,11 @@ subroutine psb_ziluk_fact(fill_in,ialg,a,l,u,d,info,blck,shft)
goto 9999 goto 9999
end if end if
endif endif
if (present(shft)) then
shft_ = shft
else
shft_ = zzero
end if
m = a%get_nrows() + blck_%get_nrows() m = a%get_nrows() + blck_%get_nrows()
if ((m /= l%get_nrows()).or.(m /= u%get_nrows()).or.& if ((m /= l%get_nrows()).or.(m /= u%get_nrows()).or.&

@ -143,6 +143,7 @@ subroutine psb_zilut_fact(fill_in,thres,a,l,u,d,info,blck,iscale,shft)
! Local Variables ! Local Variables
integer(psb_ipk_) :: l1, l2, m, err_act, iscale_ integer(psb_ipk_) :: l1, l2, m, err_act, iscale_
complex(psb_dpk_) :: shft_
type(psb_zspmat_type), pointer :: blck_ type(psb_zspmat_type), pointer :: blck_
type(psb_z_csr_sparse_mat) :: ll, uu type(psb_z_csr_sparse_mat) :: ll, uu
real(psb_dpk_) :: scale real(psb_dpk_) :: scale
@ -178,6 +179,11 @@ subroutine psb_zilut_fact(fill_in,thres,a,l,u,d,info,blck,iscale,shft)
else else
iscale_ = psb_ilu_scale_none_ iscale_ = psb_ilu_scale_none_
end if end if
if (present(shft)) then
shft_ = shft
else
shft_ = zzero
end if
select case(iscale_) select case(iscale_)
case(psb_ilu_scale_none_) case(psb_ilu_scale_none_)

Loading…
Cancel
Save