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

becker at geodynamics.org becker at geodynamics.org
Fri Apr 24 11:37:50 PDT 2009


Author: becker
Date: 2009-04-24 11:37:49 -0700 (Fri, 24 Apr 2009)
New Revision: 14790

Modified:
   mc/3D/CitcomS/trunk/lib/Instructions.c
   mc/3D/CitcomS/trunk/lib/Viscosity_structures.c
   mc/3D/CitcomS/trunk/lib/global_defs.h
Log:
Added flag to allow using the more precise method of computing strain-rates throughout the globe,
and not just close to the poles. 

precise_strain_rate=on

will select this, default is "odd", i.e. poles only as before.




Modified: mc/3D/CitcomS/trunk/lib/Instructions.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Instructions.c	2009-04-24 04:52:48 UTC (rev 14789)
+++ mc/3D/CitcomS/trunk/lib/Instructions.c	2009-04-24 18:37:49 UTC (rev 14790)
@@ -480,6 +480,9 @@
   input_int("mat_control",&(E->control.mat_control),"0",m);
   input_string("mat_file",E->control.mat_file,"",m);
 
+
+  input_boolean("precise_strain_rate",&(E->control.precise_strain_rate),"off",m);
+
 #ifdef USE_GGRD
 
 

Modified: mc/3D/CitcomS/trunk/lib/Viscosity_structures.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Viscosity_structures.c	2009-04-24 04:52:48 UTC (rev 14789)
+++ mc/3D/CitcomS/trunk/lib/Viscosity_structures.c	2009-04-24 18:37:49 UTC (rev 14790)
@@ -929,7 +929,7 @@
     double theta;
     double ba[9][9][4][7];
     float VV[4][9], Vxyz[7][9], dilation[9];
-
+    
     int e, i, j, p, q, n;
 
     const int nel = E->lmesh.nel;
@@ -939,7 +939,6 @@
     const int ppts = ppoints[dims];
     const int sphere_key = 1;
 
-
     for(e=1; e<=nel; e++) {
 
         get_rtf_at_ppts(E, m, lev, e, rtf);
@@ -969,10 +968,14 @@
             dilation[j] = 0.0;
         }
 
-        if ((theta < 0.09) || (theta > 3.05)) {
+        if ((E->control.precise_strain_rate) || (theta < 0.09) || (theta > 3.05)) {
             /* When the element is close to the poles, use a more
-             * precise method to compute the strain rate. */
+             * precise method to compute the strain rate. 
+	     
+	     if precise_strain_rate=on, will always choose this option
 
+	    */
+
             if ((e-1)%E->lmesh.elz==0) {
                 construct_c3x3matrix_el(E,e,&E->element_Cc,&E->element_Ccx,lev,m,1);
             }

Modified: mc/3D/CitcomS/trunk/lib/global_defs.h
===================================================================
--- mc/3D/CitcomS/trunk/lib/global_defs.h	2009-04-24 04:52:48 UTC (rev 14789)
+++ mc/3D/CitcomS/trunk/lib/global_defs.h	2009-04-24 18:37:49 UTC (rev 14790)
@@ -486,6 +486,8 @@
     int lith_age_old_cycles;
     float lith_age_depth;
 
+  int precise_strain_rate; /* use proper computation for strain-rates in whole domain, not just poles */
+
     int temperature_bound_adj;
     float depth_bound_adj;
     float width_bound_adj;



More information about the CIG-COMMITS mailing list