[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
Thu Sep 25 15:08:44 PDT 2014


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

On branch  : rajesh-petsc-schur
Link       : https://github.com/geodynamics/citcoms/compare/c4c1cf8c9c00db42db37ba9de24475c42f027909...ec0945705eef4b24081ed7ef0f52224d56e1b34c

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

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