[cig-commits] [commit] rajesh-petsc-schur: cleaned up global_p_norm2; results dont match master (8a35780)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Nov 5 19:04:00 PST 2014
Repository : https://github.com/geodynamics/citcoms
On branch : rajesh-petsc-schur
Link : https://github.com/geodynamics/citcoms/compare/464e1b32299b15819f93efd98d969cddb84dfe51...f97ae655a50bdbd6dac1923a3471ee4dae178fbd
>---------------------------------------------------------------
commit 8a35780beff1b0023a4ac46b65bbe67fbef10844
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date: Tue Sep 9 13:49:26 2014 -0700
cleaned up global_p_norm2; results dont match master
>---------------------------------------------------------------
8a35780beff1b0023a4ac46b65bbe67fbef10844
lib/Global_operations.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/Global_operations.c b/lib/Global_operations.c
index 4c1690c..207aaca 100644
--- a/lib/Global_operations.c
+++ b/lib/Global_operations.c
@@ -622,9 +622,10 @@ double global_p_norm2(struct All_variables *E, double **P)
temp = 0.0;
prod = 0.0;
for (m=1; m<=E->sphere.caps_per_proc; m++)
- for (i=1; i<=E->lmesh.npno; i++) {
+ for (i=0; i<E->lmesh.npno; i++) {
/* L2 norm */
- temp += P[m][i] * P[m][i] * E->eco[m][i].area;
+ /* should be E->eco[m][i].area after E->eco hase been made 0-based */
+ temp += P[m][i] * P[m][i] * E->eco[m][i+1].area;
}
MPI_Allreduce(&temp, &prod, 1, MPI_DOUBLE, MPI_SUM, E->parallel.world);
More information about the CIG-COMMITS
mailing list