[cig-commits] r14175 - in long/3D/Gale/trunk: . src/StgFEM/plugins/StandardConditionFunctions

walter at geodynamics.org walter at geodynamics.org
Sat Feb 28 21:46:02 PST 2009


Author: walter
Date: 2009-02-28 21:46:02 -0800 (Sat, 28 Feb 2009)
New Revision: 14175

Modified:
   long/3D/Gale/trunk/
   long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c
Log:
 r2513 at dante:  boo | 2009-02-28 21:44:47 -0800
 Remove the StepFunctionLessThan option, since it was redundant and confusing



Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
   - 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2512
   + 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:2513

Modified: long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c
===================================================================
--- long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c	2009-03-01 05:45:58 UTC (rev 14174)
+++ long/3D/Gale/trunk/src/StgFEM/plugins/StandardConditionFunctions/StandardConditionFunctions.c	2009-03-01 05:46:02 UTC (rev 14175)
@@ -1194,7 +1194,6 @@
 	double                  lower_offset, upper_offset;
 	double                  value, lower_value, upper_value;
 	unsigned		dim;
-	Bool			less;
 
 	feVariable = (FeVariable*)FieldVariable_Register_GetByName( context->fieldVariable_Register, "VelocityField" );
 	feMesh       = feVariable->feMesh;
@@ -1204,7 +1203,6 @@
 	upper_offset = Dictionary_GetDouble_WithDefault( dictionary, "StepFunctionUpperOffset", lower_offset );
 	value = Dictionary_GetDouble_WithDefault( dictionary, "StepFunctionValue", 0.0 );
 	dim = Dictionary_GetUnsignedInt_WithDefault( dictionary, "StepFunctionDim", 0 );
-	less = Dictionary_GetBool_WithDefault( dictionary, "StepFunctionLessThan", True );
 
         lower_value = Dictionary_GetDouble_WithDefault( dictionary, "StepFunctionLowerValue", 0.0 );
         upper_value = Dictionary_GetDouble_WithDefault( dictionary, "StepFunctionUpperValue", value );
@@ -1215,28 +1213,15 @@
             coord=&(context->currentTime);
           }
 
-	if( less ) {
-          if(coord[dim] > upper_offset) {
-            *result=lower_value;
-          } else if(coord[dim] > lower_offset) {
-            *result=lower_value + 
-              (upper_value-lower_value)
-              *(upper_offset - coord[dim])/(upper_offset-lower_offset);
-          } else {
-            *result=upper_value;
-          }
-	}
-	else {
-          if(coord[dim] < lower_offset) {
-            *result=lower_value;
-          } else if(coord[dim] < upper_offset) {
-            *result=lower_value + 
-              (upper_value-lower_value)
-              *(coord[dim] - lower_offset)/(upper_offset-lower_offset);
-          } else {
-            *result=upper_value;
-          }
-	}
+        if(coord[dim] < lower_offset) {
+          *result=lower_value;
+        } else if(coord[dim] < upper_offset) {
+          *result=lower_value + 
+            (upper_value-lower_value)
+            *(coord[dim] - lower_offset)/(upper_offset-lower_offset);
+        } else {
+          *result=upper_value;
+        }
 }
 
 



More information about the CIG-COMMITS mailing list