[cig-commits] [commit] rajesh-petsc-schur: Changed the shape of E->trace.ntracer_flavor as part of caps_per_proc_removal (e0ede29)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Nov 5 19:13:26 PST 2014


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

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

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

commit e0ede292831bb3dd78fb7fe616b0fa4a8820501b
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date:   Wed Sep 24 12:39:59 2014 -0700

    Changed the shape of E->trace.ntracer_flavor as part of caps_per_proc_removal


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

e0ede292831bb3dd78fb7fe616b0fa4a8820501b
 lib/Composition_related.c  | 10 +++++-----
 lib/Tracer_setup.c         |  8 ++++----
 lib/Viscosity_structures.c |  4 ++--
 lib/tracer_defs.h          |  2 +-
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/lib/Composition_related.c b/lib/Composition_related.c
index 0d476c7..7aaa1dc 100644
--- a/lib/Composition_related.c
+++ b/lib/Composition_related.c
@@ -307,7 +307,7 @@ static void compute_elemental_composition_ratio_method(struct All_variables *E)
         for (e=1; e<=E->lmesh.nel; e++) {
             numtracers = 0;
             for (flavor=0; flavor<E->trace.nflavors; flavor++)
-                numtracers += E->trace.ntracer_flavor[CPPR][flavor][e];
+                numtracers += E->trace.ntracer_flavor[flavor][e];
 
             /* Check for empty entries and compute ratio.  */
             /* If no tracers are in an element, skip this element, */
@@ -321,7 +321,7 @@ static void compute_elemental_composition_ratio_method(struct All_variables *E)
             for(i=0;i<E->composition.ncomp;i++) {
                 flavor = i + 1;
                 E->composition.comp_el[i][e] =
-                    E->trace.ntracer_flavor[CPPR][flavor][e] / (double)numtracers;
+                    E->trace.ntracer_flavor[flavor][e] / (double)numtracers;
             }
         }
 
@@ -370,7 +370,7 @@ static void compute_elemental_composition_absolute_method(struct All_variables *
         for (e=1; e<=E->lmesh.nel; e++) {
             numtracers = 0;
             for (flavor=0; flavor<E->trace.nflavors; flavor++)
-                numtracers += E->trace.ntracer_flavor[CPPR][flavor][e];
+                numtracers += E->trace.ntracer_flavor[flavor][e];
 
             /* Check for empty entries */
             /* If no tracers are in an element, comp = 0.0 (i.e. is ambient) */
@@ -385,7 +385,7 @@ static void compute_elemental_composition_absolute_method(struct All_variables *
             for(i=0;i<E->composition.ncomp;i++) {
                 flavor = i;
                 comp =
-                    E->trace.ntracer_flavor[CPPR][flavor][e] / E->eco[e].area
+                    E->trace.ntracer_flavor[flavor][e] / E->eco[e].area
                     * domain_volume / E->trace.number_of_tracers;
 
                 /* truncate composition at 1.0 */
@@ -489,7 +489,7 @@ static void fill_composition_from_neighbors(struct All_variables *E)
         for (e=1; e<=E->lmesh.nel; e++) {
             numtracers = 0;
             for (flavor=0; flavor<E->trace.nflavors; flavor++)
-                numtracers += E->trace.ntracer_flavor[CPPR][flavor][e];
+                numtracers += E->trace.ntracer_flavor[flavor][e];
 
             if (numtracers == 0)
                 is_empty[e] = 1;
diff --git a/lib/Tracer_setup.c b/lib/Tracer_setup.c
index 5e4cae3..437997b 100644
--- a/lib/Tracer_setup.c
+++ b/lib/Tracer_setup.c
@@ -660,7 +660,7 @@ void count_tracers_of_flavors(struct All_variables *E)
         /* first zero arrays */
         for (flavor=0; flavor<E->trace.nflavors; flavor++)
             for (e=1; e<=E->lmesh.nel; e++)
-                E->trace.ntracer_flavor[CPPR][flavor][e] = 0;
+                E->trace.ntracer_flavor[flavor][e] = 0;
 
         numtracers=E->trace.ntracers;
 
@@ -668,7 +668,7 @@ void count_tracers_of_flavors(struct All_variables *E)
         for (kk=1; kk<=numtracers; kk++) {
             e = E->trace.ielement[kk];
             flavor = E->trace.extraq[0][kk];
-            E->trace.ntracer_flavor[CPPR][flavor][e]++;
+            E->trace.ntracer_flavor[flavor][e]++;
         }
 }
 
@@ -1382,9 +1382,9 @@ void allocate_tracer_arrays(struct All_variables *E, int number_of_tracers)
     }
 
     if (E->trace.nflavors > 0) {
-        E->trace.ntracer_flavor[CPPR]=(int **)malloc(E->trace.nflavors*sizeof(int*));
+        E->trace.ntracer_flavor=(int **)malloc(E->trace.nflavors*sizeof(int*));
         for (kk=0;kk<E->trace.nflavors;kk++) {
-            if ((E->trace.ntracer_flavor[CPPR][kk]=(int *)malloc((E->lmesh.nel+1)*sizeof(int)))==NULL) {
+            if ((E->trace.ntracer_flavor[kk]=(int *)malloc((E->lmesh.nel+1)*sizeof(int)))==NULL) {
                 fprintf(E->trace.fpt,"ERROR(initialize tracer arrays)-no memory 1c.%d\n",kk);
                 fflush(E->trace.fpt);
                 exit(10);
diff --git a/lib/Viscosity_structures.c b/lib/Viscosity_structures.c
index aa5df5c..9a16f15 100644
--- a/lib/Viscosity_structures.c
+++ b/lib/Viscosity_structures.c
@@ -1336,7 +1336,7 @@ static void low_viscosity_channel_factor(struct All_variables *E, float *F)
                                 E->sx[3][E->ien[ee].node[8]]);
 
                     /* if ee has tracers in it and is within the channel */
-                    if((E->trace.ntracer_flavor[CPPR][flavor][ee] > 0) &&
+                    if((E->trace.ntracer_flavor[flavor][ee] > 0) &&
                        (rad_mean <= rr + E->viscosity.lv_channel_thickness)) {
                            F[e] = E->viscosity.lv_reduction;
                            break;
@@ -1384,7 +1384,7 @@ static void low_viscosity_wedge_factor(struct All_variables *E, float *F)
                     ee = (k-1)*E->lmesh.elz + ii;
 
                     /* if ee has tracers in it */
-                    if(E->trace.ntracer_flavor[CPPR][flavor][ee] > 0) {
+                    if(E->trace.ntracer_flavor[flavor][ee] > 0) {
                         F[e] = E->viscosity.lv_reduction;
                         break;
                     }
diff --git a/lib/tracer_defs.h b/lib/tracer_defs.h
index 58d021a..2ba794e 100644
--- a/lib/tracer_defs.h
+++ b/lib/tracer_defs.h
@@ -66,7 +66,7 @@ struct TRACE{
 
     /* tracer flavors */
     int nflavors;
-    int **ntracer_flavor[13];
+    int **ntracer_flavor;
 
     int ic_method_for_flavors;
     double *z_interface;



More information about the CIG-COMMITS mailing list