[cig-commits] r6353 - mc/3D/CitcomS/trunk/lib

tan2 at geodynamics.org tan2 at geodynamics.org
Thu Mar 22 12:57:57 PDT 2007


Author: tan2
Date: 2007-03-22 12:57:57 -0700 (Thu, 22 Mar 2007)
New Revision: 6353

Modified:
   mc/3D/CitcomS/trunk/lib/Full_tracer_advection.c
   mc/3D/CitcomS/trunk/lib/Regional_tracer_advection.c
   mc/3D/CitcomS/trunk/lib/Tracer_setup.c
Log:
Calling find_tracers() and count_tracers_of_flavors() in initialize_tracers(), so that the former two functions can become static/private

Modified: mc/3D/CitcomS/trunk/lib/Full_tracer_advection.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Full_tracer_advection.c	2007-03-22 19:55:18 UTC (rev 6352)
+++ mc/3D/CitcomS/trunk/lib/Full_tracer_advection.c	2007-03-22 19:57:57 UTC (rev 6353)
@@ -127,7 +127,6 @@
     char output_file[200];
     void get_neighboring_caps();
     void initialize_tracers();
-    void find_tracers();
     void analytical_test();
 
     /* Some error control */
@@ -219,17 +218,7 @@
 
     initialize_tracers(E);
 
-    /* find elements */
 
-    find_tracers(E);
-
-
-    /* count # of tracers of each flavor */
-
-    if (E->trace.nflavors > 0)
-        count_tracers_of_flavors(E);
-
-
     if (E->trace.ianalytical_tracer_test==1) {
         //TODO: walk into this code...
         analytical_test(E);

Modified: mc/3D/CitcomS/trunk/lib/Regional_tracer_advection.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Regional_tracer_advection.c	2007-03-22 19:55:18 UTC (rev 6352)
+++ mc/3D/CitcomS/trunk/lib/Regional_tracer_advection.c	2007-03-22 19:57:57 UTC (rev 6353)
@@ -56,6 +56,8 @@
 
 void regional_tracer_setup(struct All_variables *E)
 {
+    void initialize_tracers();
+
     char output_file[255];
 
     /* Some error control */
@@ -140,17 +142,6 @@
     initialize_tracers(E);
 
 
-    /* find elements */
-
-    find_tracers(E);
-
-
-    /* count # of tracers of each flavor */
-
-    if (E->trace.nflavors > 0)
-        count_tracers_of_flavors(E);
-
-
     composition_setup(E);
     tracer_post_processing(E);
 

Modified: mc/3D/CitcomS/trunk/lib/Tracer_setup.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Tracer_setup.c	2007-03-22 19:55:18 UTC (rev 6352)
+++ mc/3D/CitcomS/trunk/lib/Tracer_setup.c	2007-03-22 19:57:57 UTC (rev 6353)
@@ -51,9 +51,10 @@
 void expand_later_array(struct All_variables *E, int j);
 void expand_tracer_arrays(struct All_variables *E, int j);
 void tracer_post_processing(struct All_variables *E);
-void count_tracers_of_flavors(struct All_variables *E);
 
 
+static void find_tracers(struct All_variables *E);
+static void count_tracers_of_flavors(struct All_variables *E);
 static void predict_tracers(struct All_variables *E);
 static void correct_tracers(struct All_variables *E);
 static void make_tracer_array(struct All_variables *E);
@@ -268,7 +269,6 @@
     double velocity_vector[4];
 
     void cart_to_sphere();
-    void find_tracers();
 
 
     dt=E->advection.timestep;
@@ -366,7 +366,6 @@
     double Vx_pred,Vy_pred,Vz_pred;
 
     void cart_to_sphere();
-    void find_tracers();
 
 
     dt=E->advection.timestep;
@@ -431,7 +430,7 @@
 /* other processor domains if necessary.                       */
 /* Array ielement is filled with elemental values.                */
 
-void find_tracers(struct All_variables *E)
+static void find_tracers(struct All_variables *E)
 {
 
     int iel;
@@ -546,7 +545,7 @@
 /* Each tracer can be of different "flavors", which is the 0th index   */
 /* of extraq. How to interprete "flavor" is left for the application.  */
 
-void count_tracers_of_flavors(struct All_variables *E)
+static void count_tracers_of_flavors(struct All_variables *E)
 {
 
     int j, flavor, e, kk;
@@ -609,6 +608,17 @@
     E->trace.ilast_tracer_count = isum_tracers(E);
     fprintf(E->trace.fpt, "Sum of Tracers: %d\n", E->trace.ilast_tracer_count);
 
+
+    /* find elements */
+
+    find_tracers(E);
+
+
+    /* count # of tracers of each flavor */
+
+    if (E->trace.nflavors > 0)
+        count_tracers_of_flavors(E);
+
     return;
 }
 



More information about the cig-commits mailing list