[cig-commits] r8132 - mc/3D/CitcomS/trunk/bin

tan2 at geodynamics.org tan2 at geodynamics.org
Wed Oct 17 13:56:25 PDT 2007


Author: tan2
Date: 2007-10-17 13:56:25 -0700 (Wed, 17 Oct 2007)
New Revision: 8132

Modified:
   mc/3D/CitcomS/trunk/bin/Citcom.c
Log:
Added comments on where C code is replaced by python code in Citcom.c

Modified: mc/3D/CitcomS/trunk/bin/Citcom.c
===================================================================
--- mc/3D/CitcomS/trunk/bin/Citcom.c	2007-10-17 20:55:17 UTC (rev 8131)
+++ mc/3D/CitcomS/trunk/bin/Citcom.c	2007-10-17 20:56:25 UTC (rev 8132)
@@ -81,8 +81,12 @@
     parallel_process_termination();
   }
 
+
+
+  /* this section reads input, allocates memory, and set some initial values;
+   *  replaced by CitcomS.Controller.initialize() */
   world = MPI_COMM_WORLD;
-  E = citcom_init(&world);             /* allocate global E and do initializaion here */
+  E = citcom_init(&world); /* allocate global E and do initializaion here */
 
   solver_init(E);
 
@@ -99,8 +103,13 @@
     fflush(E->fp);
   }
 
-  /* This if-block is replaced by CitcomS.Solver.launch()*/
+
+
+  /* this section sets the initial condition;
+   * replaced by CitcomS.Controller.launch() */
   if (E->control.restart || E->control.post_p) {
+      /* the initial condition is from previous checkpoint */
+
       read_checkpoint(E);
 
       if (E->control.post_p) {
@@ -109,6 +118,8 @@
       }
   }
   else {
+      /* regular init, or read T from file only */
+
       initial_conditions(E);
 
       if(E->control.pseudo_free_surf) {
@@ -126,7 +137,12 @@
   /* information about simulation time and wall clock time */
   output_time(E, E->monitor.solution_cycles);
 
+  output_checkpoint(E);
 
+
+
+  /* this section stops the computation if only computes stokes' problem
+   * no counterpart in pyre */
   if (E->control.stokes)  {
 
     if(E->control.tracer==1)
@@ -135,8 +151,13 @@
     parallel_process_termination();
   }
 
-  while ( E->control.keep_going   &&  (Emergency_stop == 0) )   {
 
+
+
+  /* this section advances the time step;
+   * replaced by CitcomS.Controller.march() */
+  while ( E->control.keep_going   &&  (Emergency_stop == 0) ) {
+
     /* The next few lines of code were replaced by
      * pyCitcom_PG_timestep_solve() in Pyre version.
      * If you modify here, make sure its Pyre counterpart
@@ -211,7 +232,8 @@
 
 
 
-
+  /* this section prints time accounting;
+   * no counterpart in pyre */
   if (E->parallel.me == 0)  {
     fprintf(stderr,"cycles=%d\n",E->monitor.solution_cycles);
     cpu_time_on_vp_it=CPU_time0()-cpu_time_on_vp_it;



More information about the cig-commits mailing list