[cig-commits] [commit] rajesh-petsc-schur: Corrected the signature of global_div_norm2 (2556a8c)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Nov 5 19:10:35 PST 2014


Repository : https://github.com/geodynamics/citcoms

On branch  : rajesh-petsc-schur
Link       : https://github.com/geodynamics/citcoms/compare/464e1b32299b15819f93efd98d969cddb84dfe51...f97ae655a50bdbd6dac1923a3471ee4dae178fbd

>---------------------------------------------------------------

commit 2556a8cd7bb065b490ed6be9ed4b8eb24f5bbf4f
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date:   Fri Sep 19 09:39:41 2014 -0700

    Corrected the signature of global_div_norm2


>---------------------------------------------------------------

2556a8cd7bb065b490ed6be9ed4b8eb24f5bbf4f
 lib/Global_operations.c | 4 ++--
 lib/prototypes.h        | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/Global_operations.c b/lib/Global_operations.c
index 4b7599e..8e69976 100644
--- a/lib/Global_operations.c
+++ b/lib/Global_operations.c
@@ -610,7 +610,7 @@ double global_p_norm2(struct All_variables *E,  double *P)
 
 
 /* return ||A||^2, where A_i is \int{div(u) d\Omega_i} */
-double global_div_norm2(struct All_variables *E,  double **A)
+double global_div_norm2(struct All_variables *E,  double *A)
 {
     int i, m;
     double prod, temp;
@@ -620,7 +620,7 @@ double global_div_norm2(struct All_variables *E,  double **A)
     for (i=0; i<E->lmesh.npno; i++) {
         /* L2 norm of div(u) */
         /* should be E->eco[i].area after E->eco hase been made 0-based */
-        temp += A[CPPR][i] * A[CPPR][i] / E->eco[i+1].area;
+        temp += A[i] * A[i] / E->eco[i+1].area;
 
         /* L1 norm */
         /*temp += fabs(A[m][i]);*/
diff --git a/lib/prototypes.h b/lib/prototypes.h
index 445ae65..4557b54 100644
--- a/lib/prototypes.h
+++ b/lib/prototypes.h
@@ -206,7 +206,7 @@ double global_vdot(struct All_variables *, double *, double *, int);
 double global_pdot(struct All_variables *, double *, double *, int);
 double global_v_norm2(struct All_variables *, double *);
 double global_p_norm2(struct All_variables *, double *);
-double global_div_norm2(struct All_variables *, double **);
+double global_div_norm2(struct All_variables *, double *);
 double global_tdot_d(struct All_variables *, double **, double **, int);
 float global_tdot(struct All_variables *, float **, float **, int);
 float global_fmin(struct All_variables *, double);



More information about the CIG-COMMITS mailing list