Added missign @LX@ implementation of new sparse matrix sum routines

This commit is contained in:
Cirdans-Home
2020-04-08 10:47:20 +02:00
parent 44db94ad63
commit ca296fc0cf
16 changed files with 1276 additions and 0 deletions
+76
View File
@@ -3532,6 +3532,29 @@ subroutine psb_lz_base_scals(d,a,info)
end subroutine psb_lz_base_scals
subroutine psb_lz_base_scalplusidentity(d,a,info)
use psb_z_base_mat_mod, psb_protect_name => psb_lz_base_scalplusidentity
use psb_error_mod
implicit none
class(psb_lz_base_sparse_mat), intent(inout) :: a
complex(psb_dpk_), intent(in) :: d
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_) :: err_act
character(len=20) :: name='lz_scalplusidentity'
logical, parameter :: debug=.false.
call psb_erractionsave(err_act)
! This is the base version. If we get here
! it means the derived class is incomplete,
! so we throw an error.
info = psb_err_missing_override_method_
call psb_errpush(info,name,a_err=a%get_fmt())
call psb_error_handler(err_act)
end subroutine psb_lz_base_scalplusidentity
subroutine psb_lz_base_scal(d,a,info,side)
use psb_z_base_mat_mod, psb_protect_name => psb_lz_base_scal
use psb_error_mod
@@ -3743,6 +3766,59 @@ subroutine psb_lz_base_aclsum(d,a)
end subroutine psb_lz_base_aclsum
subroutine psb_lz_base_spaxpby(alpha,a,beta,b,info)
use psb_error_mod
use psb_const_mod
use psb_z_base_mat_mod, psb_protect_name => psb_lz_base_spaxpby
complex(psb_dpk_), intent(in) :: alpha
class(psb_lz_base_sparse_mat), intent(inout) :: a
complex(psb_dpk_), intent(in) :: beta
class(psb_lz_base_sparse_mat), intent(inout) :: b
integer(psb_ipk_), intent(out) :: info
! Auxiliary
integer(psb_ipk_) :: err_act
character(len=20) :: name='spaxpby'
logical, parameter :: debug=.false.
type(psb_lz_coo_sparse_mat) :: acoo
call psb_erractionsave(err_act)
if((a%get_ncols() /= b%get_ncols()).or.(a%get_nrows() /= b%get_nrows())) then
info = psb_err_from_subroutine_
call psb_errpush(info,name)
goto 9999
end if
call a%mv_to_coo(acoo,info)
if (info /= psb_success_) then
info = psb_err_from_subroutine_
call psb_errpush(info,name, a_err='mv_to_coo')
goto 9999
end if
call acoo%spaxpby(alpha,beta,b,info)
if (info /= psb_success_) then
info = psb_err_from_subroutine_
call psb_errpush(info,name, a_err='spaxby')
goto 9999
end if
call acoo%mv_to_fmt(a,info)
if (info /= psb_success_) then
info = psb_err_from_subroutine_
call psb_errpush(info,name, a_err='mv_to_fmt')
goto 9999
end if
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(err_act)
return
end subroutine psb_lz_base_spaxpby
subroutine psb_lz_base_get_diag(a,d,info)
use psb_error_mod
use psb_const_mod