[cig-commits] [commit] rajesh-petsc-schur: corrected the signatures of return_bulk_value and return_bulk_value_d (fb42b8e)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Nov 5 19:14:40 PST 2014


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

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

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

commit fb42b8e777926dfe2069fd896551da5890f91765
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date:   Thu Sep 25 14:17:49 2014 -0700

    corrected the signatures of return_bulk_value and return_bulk_value_d


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

fb42b8e777926dfe2069fd896551da5890f91765
 lib/Composition_related.c | 8 ++++----
 lib/Global_operations.c   | 8 ++++----
 lib/prototypes.h          | 4 ++--
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/Composition_related.c b/lib/Composition_related.c
index 7aaa1dc..6468cd2 100644
--- a/lib/Composition_related.c
+++ b/lib/Composition_related.c
@@ -538,14 +538,14 @@ static void init_bulk_composition(struct All_variables *E)
 
     double return_bulk_value_d();
     double volume;
-    double *tmp[NCS];
+    double *tmp;
     int i, m;
     const int ival=0;
 
 
     for (i=0; i<E->composition.ncomp; i++) {
 
-        tmp[CPPR] = E->composition.comp_node[i];
+        tmp = E->composition.comp_node[i];
 
         /* ival=0 returns integral not average */
         volume = return_bulk_value_d(E,tmp,ival);
@@ -561,13 +561,13 @@ void get_bulk_composition(struct All_variables *E)
 
     double return_bulk_value_d();
     double volume;
-    double *tmp[NCS];
+    double *tmp;
     int i, m;
     const int ival = 0;
 
     for (i=0; i<E->composition.ncomp; i++) {
 
-        tmp[CPPR] = E->composition.comp_node[i];
+        tmp = E->composition.comp_node[i];
 
         /* ival=0 returns integral not average */
         volume = return_bulk_value_d(E,tmp,ival);
diff --git a/lib/Global_operations.c b/lib/Global_operations.c
index d2bb248..788d8ad 100644
--- a/lib/Global_operations.c
+++ b/lib/Global_operations.c
@@ -301,7 +301,7 @@ void return_elementwise_horiz_ave(E,X,H)
 
 float return_bulk_value(E,Z,average)
      struct All_variables *E;
-     float **Z;
+     float *Z;
      int average;
 
 {
@@ -320,7 +320,7 @@ float return_bulk_value(E,Z,average)
 	    for(i=1;i<=ends;i++) {
 		n = E->ien[el].node[i];
 		volume1 += E->N.vpt[GNVINDEX(i,j)] * E->gDA[el].vpt[j];
-		integral1 += Z[CPPR][n] * E->N.vpt[GNVINDEX(i,j)] * E->gDA[el].vpt[j];
+		integral1 += Z[n] * E->N.vpt[GNVINDEX(i,j)] * E->gDA[el].vpt[j];
                 }
 
           }
@@ -344,7 +344,7 @@ float return_bulk_value(E,Z,average)
 
 double return_bulk_value_d(E,Z,average)
      struct All_variables *E;
-     double **Z;
+     double *Z;
      int average;
 
 {
@@ -363,7 +363,7 @@ double return_bulk_value_d(E,Z,average)
             for(i=1;i<=ends;i++) {
                 n = E->ien[el].node[i];
                 volume1 += E->N.vpt[GNVINDEX(i,j)] * E->gDA[el].vpt[j];
-                integral1 += Z[CPPR][n] * E->N.vpt[GNVINDEX(i,j)] * E->gDA[el].vpt[j];
+                integral1 += Z[n] * E->N.vpt[GNVINDEX(i,j)] * E->gDA[el].vpt[j];
             }
 
        }
diff --git a/lib/prototypes.h b/lib/prototypes.h
index bb00d44..d7af833 100644
--- a/lib/prototypes.h
+++ b/lib/prototypes.h
@@ -195,8 +195,8 @@ void remove_horiz_ave2(struct All_variables *, double *);
 void return_horiz_ave(struct All_variables *, double *, double *);
 void return_horiz_ave_f(struct All_variables *, float *, float *);
 void return_elementwise_horiz_ave(struct All_variables *, double **, double *);
-float return_bulk_value(struct All_variables *, float **, int);
-double return_bulk_value_d(struct All_variables *, double **, int);
+float return_bulk_value(struct All_variables *, float *, int);
+double return_bulk_value_d(struct All_variables *, double *, int);
 float find_max_horizontal(struct All_variables *, double);
 void sum_across_surface(struct All_variables *, float *, int);
 void sum_across_surf_sph1(struct All_variables *, float *, float *);



More information about the CIG-COMMITS mailing list