added weighted and masked 2 norm, and compare on complex vector

This commit is contained in:
Cirdans-Home
2020-02-21 13:12:23 +01:00
parent 1b214f3f00
commit 87306f4d1a
22 changed files with 1002 additions and 18 deletions
+7 -5
View File
@@ -53,7 +53,7 @@ program vecoperation
integer(psb_ipk_) :: nr, nlr, info, i, ii, ib=1
integer(psb_lpk_) :: nt
integer(psb_lpk_), allocatable :: myidx(:)
real(psb_dpk_) :: zt(1), dotresult, norm2, norm1, norminf, norm2w
real(psb_dpk_) :: zt(1), dotresult, norm2, norm1, norminf, norm2w, norm2wc
character(len=20) :: name,ch_err,readinput
real(psb_dpk_), allocatable :: vx(:), vy(:), vz(:)
real(psb_dpk_) :: c
@@ -229,11 +229,13 @@ program vecoperation
norm1 = psb_norm1(x,desc_a,info)
norm2 = psb_norm2(x,desc_a,info)
norm2w = psb_norm2(x,absz,desc_a,info)
norm2wc = psb_norm2(x,absz,z,desc_a,info)
norminf = psb_normi(x,desc_a,info)
write(psb_out_unit,'("\|x\|_inf : ",es12.5," \|x\|_1 :",es12.5)')norminf,norm1
write(psb_out_unit,'(" \|x\|_2 : ",es12.5," \|x\|_2,w : ",es12.5)')norm2,norm2w
if (iam == psb_root_) then
write(psb_out_unit,'("\|x\|_inf : ",es12.5," \|x\|_1 :",es12.5)')norminf,norm1
write(psb_out_unit,'(" \|x\|_2 : ",es12.5," \|x\|_2,w : ",es12.5)')norm2,norm2w
write(psb_out_unit,'(" masked \|x\|_2,w : ",es12.5)')norm2wc
end if
!
! cleanup storage and exit