From 0f309850cc473406b4b580b7e0ed02c2841e8e38 Mon Sep 17 00:00:00 2001 From: Cirdans-Home Date: Thu, 2 Apr 2020 17:36:09 +0200 Subject: [PATCH] Corrected routine for weighted masked 2norm --- base/modules/serial/psb_c_vect_mod.F90 | 2 +- base/modules/serial/psb_d_vect_mod.F90 | 2 +- base/modules/serial/psb_s_vect_mod.F90 | 2 +- base/modules/serial/psb_z_vect_mod.F90 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/base/modules/serial/psb_c_vect_mod.F90 b/base/modules/serial/psb_c_vect_mod.F90 index 8beb57a1..384b0457 100644 --- a/base/modules/serial/psb_c_vect_mod.F90 +++ b/base/modules/serial/psb_c_vect_mod.F90 @@ -1030,7 +1030,7 @@ contains integer(psb_ipk_) :: info if (allocated(x%v).and.allocated(w%v).and.allocated(id%v)) then - call w%v%acmp(id%v,szero,info) + where( abs(id%v%v) <= szero) x%v%v = szero call w%v%mlt(x%v,info) res = w%v%nrm2(n) else diff --git a/base/modules/serial/psb_d_vect_mod.F90 b/base/modules/serial/psb_d_vect_mod.F90 index 99198a3d..306ef735 100644 --- a/base/modules/serial/psb_d_vect_mod.F90 +++ b/base/modules/serial/psb_d_vect_mod.F90 @@ -1037,7 +1037,7 @@ contains integer(psb_ipk_) :: info if (allocated(x%v).and.allocated(w%v).and.allocated(id%v)) then - call w%v%acmp(id%v,dzero,info) + where( abs(id%v%v) <= dzero) x%v%v = dzero call w%v%mlt(x%v,info) res = w%v%nrm2(n) else diff --git a/base/modules/serial/psb_s_vect_mod.F90 b/base/modules/serial/psb_s_vect_mod.F90 index c2a3a6d9..23e12c32 100644 --- a/base/modules/serial/psb_s_vect_mod.F90 +++ b/base/modules/serial/psb_s_vect_mod.F90 @@ -1037,7 +1037,7 @@ contains integer(psb_ipk_) :: info if (allocated(x%v).and.allocated(w%v).and.allocated(id%v)) then - call w%v%acmp(id%v,szero,info) + where( abs(id%v%v) <= szero) x%v%v = szero call w%v%mlt(x%v,info) res = w%v%nrm2(n) else diff --git a/base/modules/serial/psb_z_vect_mod.F90 b/base/modules/serial/psb_z_vect_mod.F90 index 76331b0a..7c3bf127 100644 --- a/base/modules/serial/psb_z_vect_mod.F90 +++ b/base/modules/serial/psb_z_vect_mod.F90 @@ -1030,7 +1030,7 @@ contains integer(psb_ipk_) :: info if (allocated(x%v).and.allocated(w%v).and.allocated(id%v)) then - call w%v%acmp(id%v,dzero,info) + where( abs(id%v%v) <= dzero) x%v%v = dzero call w%v%mlt(x%v,info) res = w%v%nrm2(n) else