[cig-commits] r4931 - in long/3D/Gale/trunk/src/Underworld: . Rheology/tests/testDirectorRandomness

walter at geodynamics.org walter at geodynamics.org
Wed Oct 11 13:54:11 PDT 2006


Author: walter
Date: 2006-10-11 13:54:10 -0700 (Wed, 11 Oct 2006)
New Revision: 4931

Modified:
   long/3D/Gale/trunk/src/Underworld/
   long/3D/Gale/trunk/src/Underworld/Rheology/tests/testDirectorRandomness/testDirectorRandomness.c
Log:
 r591 at earth:  boo | 2006-10-11 13:52:09 -0700
  r553 at earth (orig r330):  KathleenHumble | 2006-09-12 22:01:19 -0700
  fixing up a typo and logical fault in print statement
  in testDirectorRandomness.c
  changing Standard deviation threshold to 
  a much higher number 
  (as I'm not sure of the theoretical value of this quantity
  with such a small data set)
  
 



Property changes on: long/3D/Gale/trunk/src/Underworld
___________________________________________________________________
Name: svk:merge
   - 9570c393-cf10-0410-b476-9a651db1e55a:/cig:590
c24a034b-ab11-0410-afe6-cfe714e2959e:/trunk:329
   + 9570c393-cf10-0410-b476-9a651db1e55a:/cig:591
c24a034b-ab11-0410-afe6-cfe714e2959e:/trunk:330

Modified: long/3D/Gale/trunk/src/Underworld/Rheology/tests/testDirectorRandomness/testDirectorRandomness.c
===================================================================
--- long/3D/Gale/trunk/src/Underworld/Rheology/tests/testDirectorRandomness/testDirectorRandomness.c	2006-10-11 20:54:08 UTC (rev 4930)
+++ long/3D/Gale/trunk/src/Underworld/Rheology/tests/testDirectorRandomness/testDirectorRandomness.c	2006-10-11 20:54:10 UTC (rev 4931)
@@ -7,7 +7,7 @@
 
 #include <assert.h>
 
-#define TEST_RAND_DIR_ERROR 1e-01
+#define TEST_RAND_DIR_ERROR 1
 
 void Underworld_testDirectorRandomness_Function( FiniteElementContext* context ) {
 	AlignmentSwarmVariable* alignment              = (AlignmentSwarmVariable*) LiveComponentRegister_Get( context->CF->LCRegister, "alignment" );
@@ -68,15 +68,16 @@
 	/* Calculate standard deviation */
 	circleAngleStdDev = sqrt(circleAngleSum / (36-1));
 	
-	if (fabs(circleAngleStdDev - 2.82843) < TEST_RAND_DIR_ERROR ) {
+	#define TheoreticalStandardDeviation 2.82843
+	if (fabs(circleAngleStdDev - TheoreticalStandardDeviation) < TEST_RAND_DIR_ERROR ) {
 		Journal_Printf( stream, "The standard deviation of director normals is within "
 		"tolerance, %g, of expected standard deviation, %.1f \n\n", 
-		TEST_RAND_DIR_ERROR, circleAngleStdDev);
+		TEST_RAND_DIR_ERROR, TheoreticalStandardDeviation);
 	}
 	else {
 		Journal_Printf( stream, "The standard deviation of director normals is not within"
-		"tolerance, %g, of expected standard deviation, %.1f \n\n", 
-		TEST_RAND_DIR_ERROR, circleAngleStdDev);
+		" tolerance, %g, of expected standard deviation, %.1f,instead is = %.1f \n\n", 
+		TEST_RAND_DIR_ERROR, TheoreticalStandardDeviation, circleAngleStdDev);
 	}
 	
 	if (circleErrorFlag == False) {



More information about the cig-commits mailing list