[cig-commits] r4881 - in long/3D/Gale/trunk/src/StGermain: .
Discretisation/Geometry/tests
walter at geodynamics.org
walter at geodynamics.org
Wed Oct 11 13:48:22 PDT 2006
Author: walter
Date: 2006-10-11 13:48:22 -0700 (Wed, 11 Oct 2006)
New Revision: 4881
Modified:
long/3D/Gale/trunk/src/StGermain/
long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/tests/testComplexMath.0of1.expected
long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/tests/testComplexMath.c
Log:
r2938 at earth: boo | 2006-10-11 13:42:48 -0700
r2854 at earth (orig r3842): KathleenHumble | 2006-10-06 00:57:39 -0700
added in a 'special print' macro that
will print out values at a fixed length.
This will stop errors in the .out files
due to rounding errors.
Property changes on: long/3D/Gale/trunk/src/StGermain
___________________________________________________________________
Name: svk:merge
- 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2937
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3841
+ 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2938
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3842
Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/tests/testComplexMath.0of1.expected
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/tests/testComplexMath.0of1.expected 2006-10-11 20:48:20 UTC (rev 4880)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/tests/testComplexMath.0of1.expected 2006-10-11 20:48:22 UTC (rev 4881)
@@ -1,38 +1,38 @@
-StGermain Framework. Copyright (C) 2003-2005 VPAC.
+StGermain Framework revision 3839. Copyright (C) 2003-2005 VPAC.
----------------- Testing Complex Journal Printing Macro -----------------
-x = 1 + 2 i
-y = -1.5 + 3 i
-u = -1.5 - 3 i
-v = 1.5 - 3 i
-i = 0 + 1 i
+x = 1.0000000 + 2.0000000 i
+y = -1.5000000 + 3.0000000 i
+u = -1.5000000 - 3.0000000 i
+v = 1.5000000 - 3.0000000 i
+i = 0.0000000 + 1.0000000 i
----------------- Testing Addition -----------------
-dest = -0.5 + 5 i
-x = -0.5 + 5 i
+dest = -0.5000000 + 5.0000000 i
+x = -0.5000000 + 5.0000000 i
----------------- Testing Subtraction -----------------
-x = 1 + 2 i
-dest = 2.5 - 1 i
+x = 1.0000000 + 2.0000000 i
+dest = 2.5000000 - 1.0000000 i
----------------- Testing Multiplication -----------------
-dest = -7.5 + 0 i
-y = -7.5 + 0 i
+dest = -7.5000000 + 0.0000000 i
+y = -7.5000000 + 0.0000000 i
----------------- Testing Division -----------------
-y = -1.5 + 3 i
-dest = 0.4 - 0.53333 i
+y = -1.5000000 + 3.0000000 i
+dest = 0.4000000 - 0.5333333 i
----------------- Testing Real Number Math stuff -----------------
-dest = 0.5 + 3 i
-dest = 5.5 - 3 i
-dest = -0.15 + 0.3 i
-dest = -0.13333 - 0.26667 i
-dest = 1 + 0 i
+dest = 0.5000000 + 3.0000000 i
+dest = 5.5000000 - 3.0000000 i
+dest = -0.1500000 + 0.3000000 i
+dest = -0.1333333 - 0.2666667 i
+dest = 1.0000000 - 0.0000000 i
----------------- Testing Conjugate -----------------
-x = 1 - 2 i
-x = 1 + 2 i
+x = 1.0000000 - 2.0000000 i
+x = 1.0000000 + 2.0000000 i
----------------- Testing Complex Polar Stuff -----------------
x = 2.2361 e^{i 1.1071} = 1.0000 + 2.0000
@@ -43,32 +43,32 @@
-i = 1.0000 e^{i -1.5708} = 0.0000 + -1.0000
----------------- Testing Complex to real Power Stuff -----------------
-dest = -3 + 4 i
-dest = -3 + 4 i
-dest = -11 - 2 i
-dest = -11 - 2 i
-dest = 0.96283 + 1.5579 i
-dest = -1.5 + 3 i
+dest = -3.0000000 + 4.0000000 i
+dest = -3.0000000 + 4.0000000 i
+dest = -11.0000000 - 2.0000000 i
+dest = -11.0000000 - 2.0000000 i
+dest = 0.9628349 + 1.5578995 i
+dest = -1.5000000 + 3.0000000 i
----------------- Testing Complex to complex Power Stuff -----------------
dest = 0.0078744 + 0.0073865 i
----------------- Testing The Most Beautiful Equation in Mathematics e^{i \pi} + 1 = 0 -----------------
-e^{i \pi} = dest = -1 + 1.2246e-16 i
+e^{i \pi} = dest = -1.0000000 + 0.0000000 i
----------------- Another Beautiful Equation i^i = e^{-\pi/2} -----------------
-e^{-\pi/2} = 0.20788 = dest = 0.20788 + 0 i
+e^{-\pi/2} = 0.20788 = dest = 0.2078796 + 0.0000000 i
----------------- Testing Exponential -----------------
-e^{2 + 3i} = dest = -7.3151 + 1.0427 i
-dest = -7.3151 + 1.0427 i
+e^{2 + 3i} = dest = -7.3151101 + 1.0427437 i
+dest = -7.3151101 + 1.0427437 i
e^{-5 + 7i} = dest = 0.0050798 + 0.0044267 i
dest = 0.0050798 + 0.0044267 i
-e^{i \pi} = dest = -1 + 1.2246e-16 i
+e^{i \pi} = dest = -1.0000000 + 0.0000000 i
----------------- Testing Copy and Zero -----------------
-x = -5 + 7 i
-dest = -1 + 1.2246e-16 i
-dest = -5 + 7 i
-dest = 0 + 0 i
+x = -5.0000000 + 7.0000000 i
+dest = -1.0000000 + 0.0000000 i
+dest = -5.0000000 + 7.0000000 i
+dest = 0.0000000 + 0.0000000 i
Modified: long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/tests/testComplexMath.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/tests/testComplexMath.c 2006-10-11 20:48:20 UTC (rev 4880)
+++ long/3D/Gale/trunk/src/StGermain/Discretisation/Geometry/tests/testComplexMath.c 2006-10-11 20:48:22 UTC (rev 4881)
@@ -36,6 +36,13 @@
#include <stdio.h>
+#undef Journal_PrintCmplx
+/** Print a complex number.
+Will use %.5f formatting */
+#define Journal_PrintCmplx( stream, self ) \
+ Journal_Printf( stream, #self " = %.7f %c %.7f i\n", (self)[ REAL_PART ], (self)[ IMAG_PART ] >= 0.0 ? '+' : '-', fabs( (self)[ IMAG_PART ] ) )
+
+
int main( int argc, char* argv[] ) {
MPI_Comm CommWorld;
int rank;
More information about the cig-commits
mailing list