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

tan2 at geodynamics.org tan2 at geodynamics.org
Wed Oct 17 13:32:54 PDT 2007


Author: tan2
Date: 2007-10-17 13:32:54 -0700 (Wed, 17 Oct 2007)
New Revision: 8129

Modified:
   mc/3D/CitcomS/trunk/lib/Drive_solvers.c
   mc/3D/CitcomS/trunk/lib/Global_operations.c
   mc/3D/CitcomS/trunk/lib/Initial_temperature.c
   mc/3D/CitcomS/trunk/lib/Instructions.c
   mc/3D/CitcomS/trunk/lib/Output.c
Log:
Added back minor modification from r8111

Modified: mc/3D/CitcomS/trunk/lib/Drive_solvers.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Drive_solvers.c	2007-10-17 19:36:29 UTC (rev 8128)
+++ mc/3D/CitcomS/trunk/lib/Drive_solvers.c	2007-10-17 20:32:54 UTC (rev 8129)
@@ -142,8 +142,9 @@
   } /*end if SDEPV or PDEPV */
 
   /* remove the rigid rotation component from the velocity solution */
-  if(E->sphere.caps == 12 && E->control.remove_rigid_rotation)
+  if(E->sphere.caps == 12 && E->control.remove_rigid_rotation) {
       remove_rigid_rot(E);
+  }
 
   return;
 }

Modified: mc/3D/CitcomS/trunk/lib/Global_operations.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Global_operations.c	2007-10-17 19:36:29 UTC (rev 8128)
+++ mc/3D/CitcomS/trunk/lib/Global_operations.c	2007-10-17 20:32:54 UTC (rev 8129)
@@ -787,6 +787,9 @@
     return;
 }
 
+/*
+ * remove rigid body rotation from the velocity
+ */
 
 void remove_rigid_rot(struct All_variables *E)
 {
@@ -861,7 +864,8 @@
     tr = acos(fxyz[3] / rot);
 
     if (E->parallel.me==0) {
-            fprintf(E->fp,"Rigid rotation: rot=%e tr=%e fr=%e\n",rot,tr*180/M_PI,fr*180/M_PI);
+        fprintf(E->fp,"Rigid rotation: rot=%e tr=%e fr=%e\n",rot,tr*180/M_PI,fr*180/M_PI);
+        fprintf(stderr,"Rigid rotation: rot=%e tr=%e fr=%e\n",rot,tr*180/M_PI,fr*180/M_PI);
     }
 
 

Modified: mc/3D/CitcomS/trunk/lib/Initial_temperature.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Initial_temperature.c	2007-10-17 19:36:29 UTC (rev 8128)
+++ mc/3D/CitcomS/trunk/lib/Initial_temperature.c	2007-10-17 20:32:54 UTC (rev 8129)
@@ -76,12 +76,12 @@
      for whole mantle.
 
      tic_method is 4: read in initial temperature distribution from a set of netcdf grd
-                      files. this required the GGRD extension to be compiled in 
+                      files. this required the GGRD extension to be compiled in
 
   */
 
   switch(E->convection.tic_method){
-  case -1:			/* restart from file */
+  case -1:	/* read from file, no other options needed */
     break;
   case 0:
   case 3:
@@ -118,7 +118,7 @@
       E->convection.perturb_ll[0] = 2;
       E->convection.load_depth[0] = (noz+1)/2;
     }
-    
+
     break;
   case 1:			/* case 1 */
 
@@ -144,8 +144,8 @@
     input_float("blob_dT", &(E->convection.blob_dT), "0.18,nomin,nomax", m);
     break;
   case 4:
-    /* 
-       case 4: initial temp from grd files 
+    /*
+       case 4: initial temp from grd files
     */
 #ifdef USE_GGRD
     /* read in some more parameters */
@@ -190,6 +190,7 @@
   if (E->control.lith_age)
     lith_age_construct_tic(E);
   else if (E->convection.tic_method == -1) {
+      /* read temperature from file */
 #ifdef USE_GZDIR
       if(strcmp(E->output.format, "ascii-gz") == 0)
           restart_tic_from_gzdir_file(E);

Modified: mc/3D/CitcomS/trunk/lib/Instructions.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Instructions.c	2007-10-17 19:36:29 UTC (rev 8128)
+++ mc/3D/CitcomS/trunk/lib/Instructions.c	2007-10-17 20:32:54 UTC (rev 8129)
@@ -341,9 +341,9 @@
   input_int("levels",&(E->mesh.levels),"0",m);
 
   input_int("coor",&(E->control.coor),"0",m);
-  if(E->control.coor == 2){	
-    /* 
-       refinement in two layers 
+  if(E->control.coor == 2){
+    /*
+       refinement in two layers
     */
     /* number of refinement layers */
     E->control.coor_refine[0] = 0.10; /* bottom 10% */
@@ -352,8 +352,8 @@
     E->control.coor_refine[3] = 0.20; /* get 20% of the nodes */
     input_float_vector("coor_refine",4,E->control.coor_refine,m);
   }else if(E->control.coor == 3){
-    /* 
-       
+    /*
+
     refinement CitcomCU style, by reading in layers, e.g.
 
 	r_grid_layers=3		# minus 1 is number of layers with uniform grid in r
@@ -369,7 +369,7 @@
     /* associated node numbers */
     input_int_vector("nr", E->control.rlayers, (E->control.nrlayer),m);
    }
-  
+
   input_string("coor_file",E->control.coor_file,"",m);
 
   input_int("nprocx",&(E->parallel.nprocx),"1",m);
@@ -386,16 +386,17 @@
 
   input_int("stokes_flow_only",&(E->control.stokes),"0",m);
 
-  input_int("restart",&(E->control.restart),"0",m);
+  /* restart from checkpoint file */
+  input_boolean("restart",&(E->control.restart),"off",m);
   input_int("post_p",&(E->control.post_p),"0",m);
   input_int("solution_cycles_init",&(E->monitor.solution_cycles_init),"0",m);
 
   /* for layers    */
-  /* 
+  /*
 
-  these boundaries are a little wacko 
-     
+  these boundaries are a little wacko
 
+
   */
   input_float("z_cmb",&(E->viscosity.zcmb),"0.45",m); /* does this ever get used? */
   input_float("z_lmantle",&(E->viscosity.zlm),"0.45",m);
@@ -1251,8 +1252,8 @@
   }
 
   if (E->control.restart || E->control.post_p ||
-      E->convection.tic_method == -1 ||
-      (E->control.tracer && E->trace.ic_method == 2)) {
+      (E->convection.tic_method == -1) ||
+      (E->control.tracer && (E->trace.ic_method == 2))) {
       found = strchr(E->control.data_prefix_old, '/');
       if (found) {
 	  fprintf(stderr, "error in input parameter: datafile_old='%s' contains '/'\n", E->control.data_file);
@@ -1355,8 +1356,8 @@
 	     E->control.data_prefix);
 
     if (E->control.restart || E->control.post_p ||
-        E->convection.tic_method == -1 ||
-        (E->control.tracer && E->trace.ic_method == 2)) {
+        (E->convection.tic_method == -1) ||
+        (E->control.tracer && (E->trace.ic_method == 2))) {
 	expand_datadir(E, E->control.data_dir_old);
 	snprintf(E->control.old_P_file, 200, "%s/%s", E->control.data_dir_old,
 		 E->control.data_prefix_old);

Modified: mc/3D/CitcomS/trunk/lib/Output.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Output.c	2007-10-17 19:36:29 UTC (rev 8128)
+++ mc/3D/CitcomS/trunk/lib/Output.c	2007-10-17 20:32:54 UTC (rev 8129)
@@ -74,7 +74,8 @@
 
       */
       input_int("gzdir_vtkio",&(E->output.gzdir.vtk_io),"0",m);
-      input_boolean("gzdir_rnr",&(E->output.gzdir.rnr),"off",m); /* remove net rotation? */
+      /* remove net rotation on output step? */
+      input_boolean("gzdir_rnr",&(E->output.gzdir.rnr),"off",m);
       E->output.gzdir.vtk_base_init = 0;
       E->output.gzdir.vtk_base_save = 1; /* should we save the basis vectors? (memory!) */
       //fprintf(stderr,"gzdir: vtkio: %i save basis vectors: %i\n",



More information about the cig-commits mailing list