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

tan2 at geodynamics.org tan2 at geodynamics.org
Mon Mar 19 23:26:19 PDT 2007


Author: tan2
Date: 2007-03-19 23:26:19 -0700 (Mon, 19 Mar 2007)
New Revision: 6316

Modified:
   mc/3D/CitcomS/trunk/lib/Viscosity_structures.c
Log:
Reporting error if low viscosity channel/wedge is turned on, but tracer is turned off

Modified: mc/3D/CitcomS/trunk/lib/Viscosity_structures.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Viscosity_structures.c	2007-03-20 05:57:24 UTC (rev 6315)
+++ mc/3D/CitcomS/trunk/lib/Viscosity_structures.c	2007-03-20 06:26:19 UTC (rev 6316)
@@ -146,7 +146,8 @@
         visc_from_S(E,evisc,propogate);
 
 
-    apply_low_visc_wedge_channel(E, evisc);
+    if(E->viscosity.channel || E->viscosity.wedge)
+        apply_low_visc_wedge_channel(E, evisc);
 
 
     /* min/max cut-off */
@@ -660,10 +661,25 @@
 
 static void apply_low_visc_wedge_channel(struct All_variables *E, float **evisc)
 {
+    void parallel_process_termination();
+
     int i,j,m;
     const int vpts = vpoints[E->mesh.nsd];
     float *F;
 
+    /* low viscosity channel/wedge require tracers to work */
+    if(E->control.tracer == 0) {
+        if(E->parallel.me == 0) {
+            fprintf(stderr, "Error: low viscosity channel/wedge is turned on, "
+                   "but tracer is off!\n");
+            fprintf(E->fp, "Error: low viscosity channel/wedge is turned on, "
+                   "but tracer is off!\n");
+            fflush(E->fp);
+        }
+        parallel_process_termination();
+    }
+
+
     F = (float *)malloc((E->lmesh.nel+1)*sizeof(float));
     for(i=1 ; i<=E->lmesh.nel ; i++)
         F[i] = 0.0;



More information about the cig-commits mailing list