[cig-commits] r8907 - in long/3D/Gale/trunk: . input/benchmarks/sinusoid

walter at geodynamics.org walter at geodynamics.org
Tue Dec 18 12:02:04 PST 2007


Author: walter
Date: 2007-12-18 12:02:03 -0800 (Tue, 18 Dec 2007)
New Revision: 8907

Modified:
   long/3D/Gale/trunk/
   long/3D/Gale/trunk/input/benchmarks/sinusoid/README
   long/3D/Gale/trunk/input/benchmarks/sinusoid/munch_data.cxx
Log:
 r1998 at earth:  boo | 2007-12-18 12:03:46 -0800
 Clean up sinusoid benchmark instructions



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

Modified: long/3D/Gale/trunk/input/benchmarks/sinusoid/README
===================================================================
--- long/3D/Gale/trunk/input/benchmarks/sinusoid/README	2007-12-18 20:02:00 UTC (rev 8906)
+++ long/3D/Gale/trunk/input/benchmarks/sinusoid/README	2007-12-18 20:02:03 UTC (rev 8907)
@@ -1,52 +1,26 @@
-# Gale input/benchmarks/sinusoid/sinusoid.xml --elementResI=32 --elementResJ=16 --maxY=0.5 --outputPath=low_short --maxTimeSteps=5
-# Gale input/benchmarks/sinusoid/sinusoid.xml --elementResI=64 --elementResJ=32 --maxY=0.5 --outputPath=medium_short --maxTimeSteps=10
-# Gale input/benchmarks/sinusoid/sinusoid.xml --elementResI=128 --elementResJ=64 --maxY=0.5 --outputPath=high_short --maxTimeSteps=20
+# Run the simulation in low, medium, and high resolution
 
-# Gale input/benchmarks/sinusoid/sinusoid.xml --elementResI=32 --elementResJ=32 --maxY=1.0 --outputPath=low_medium --maxTimeSteps=5
-# Gale input/benchmarks/sinusoid/sinusoid.xml --elementResI=64 --elementResJ=64 --maxY=1.0 --outputPath=medium_medium --maxTimeSteps=10
-# Gale input/benchmarks/sinusoid/sinusoid.xml --elementResI=128 --elementResJ=128 --maxY=1.0 --outputPath=high_medium --maxTimeSteps=20
+./Gale sinusoid.xml --elementResI=16 --elementResJ=32 --maxY=2.0 --outputPath=low --maxTimeSteps=3
+./Gale sinusoid.xml --elementResI=32 --elementResJ=64 --maxY=2.0 --outputPath=medium --maxTimeSteps=5
+./Gale sinusoid.xml --elementResI=64 --elementResJ=128 --maxY=2.0 --outputPath=high --maxTimeSteps=10
 
-Gale input/benchmarks/sinusoid/sinusoid.xml --elementResI=16 --elementResJ=32 --maxY=2.0 --outputPath=tiny_tall --maxTimeSteps=3
-Gale input/benchmarks/sinusoid/sinusoid.xml --elementResI=32 --elementResJ=64 --maxY=2.0 --outputPath=low_tall --maxTimeSteps=5
-Gale input/benchmarks/sinusoid/sinusoid.xml --elementResI=64 --elementResJ=128 --maxY=2.0 --outputPath=medium_tall --maxTimeSteps=10
-# Gale input/benchmarks/sinusoid/sinusoid.xml --elementResI=128 --elementResJ=256 --maxY=2.0 --outputPath=high_tall --maxTimeSteps=20
+# Make the data suitable for plotting
 
+make
+./munch_data
 
+# Run "ipython -pylab" and copy/paste the following lines to create
+# the plot
 
-# low_short=load("low_short/error")
-# medium_short=load("medium_short/error")
-# high_short=load("high_short/error")
-# low_medium=load("low_medium/error")
-# medium_medium=load("medium_medium/error")
-# high_medium=load("high_medium/error")
+low=load("low/error")
+medium=load("medium/error")
+high=load("high/error")
 
-# tiny_tall=load("tiny_tall/error")
-# low_tall=load("low_tall/error")
-# medium_tall=load("medium_tall/error")
-# high_tall=load("high_tall/error")
+plot(low[:,0],abs(low[:,1]-0.1*exp(-low[:,0]/(4*pi))),label="low 16x32")
+plot(medium[:,0],abs(medium[:,1]-0.1*exp(-medium[:,0]/(4*pi))),label="medium 32x64")
+plot(high[:,0],abs(high[:,1]-0.1*exp(-high[:,0]/(4*pi))),label="high 64x128")
 
-# plot(low_short[:,0],abs(low_short[:,1]-0.1*exp(-low_short[:,0]/(4*pi))),label="low_short")
-# plot(medium_short[:,0],abs(medium_short[:,1]-0.1*exp(-medium_short[:,0]/(4*pi))),label="medium_short")
-# plot(high_short[:,0],abs(high_short[:,1]-0.1*exp(-high_short[:,0]/(4*pi))),label="high_short")
-# plot(low_medium[:,0],abs(low_medium[:,1]-0.1*exp(-low_medium[:,0]/(4*pi))),label="low_medium")
-# plot(medium_medium[:,0],abs(medium_medium[:,1]-0.1*exp(-medium_medium[:,0]/(4*pi))),label="medium_medium")
-# plot(high_medium[:,0],abs(high_medium[:,1]-0.1*exp(-high_medium[:,0]/(4*pi))),label="high_medium")
-# plot(low_tall[:,0],abs(low_tall[:,1]-0.1*exp(-low_tall[:,0]/(4*pi))),label="low 32x64")
-# plot(medium_tall[:,0],abs(medium_tall[:,1]-0.1*exp(-medium_tall[:,0]/(4*pi))),label="medium 64x128")
-# plot(high_tall[:,0],abs(high_tall[:,1]-0.1*exp(-high_tall[:,0]/(4*pi))),label="high 128x256")
 
-# legend(loc="upper left")
-
-
-tiny_tall=load("tiny_tall/error")
-low_tall=load("low_tall/error")
-medium_tall=load("medium_tall/error")
-
-plot(tiny_tall[:,0],abs(tiny_tall[:,1]-0.1*exp(-tiny_tall[:,0]/(4*pi))),label="low 16x32")
-plot(low_tall[:,0],abs(low_tall[:,1]-0.1*exp(-low_tall[:,0]/(4*pi))),label="medium 32x64")
-plot(medium_tall[:,0],abs(medium_tall[:,1]-0.1*exp(-medium_tall[:,0]/(4*pi))),label="high 64x128")
-
-
 legend(loc="upper left")
 xlabel('Time')
 ylabel('Error')

Modified: long/3D/Gale/trunk/input/benchmarks/sinusoid/munch_data.cxx
===================================================================
--- long/3D/Gale/trunk/input/benchmarks/sinusoid/munch_data.cxx	2007-12-18 20:02:00 UTC (rev 8906)
+++ long/3D/Gale/trunk/input/benchmarks/sinusoid/munch_data.cxx	2007-12-18 20:02:03 UTC (rev 8907)
@@ -12,6 +12,7 @@
                 const int steps, const double &offset)
 {
   ofstream error((dir+"/error").c_str());
+  /* Manually put in t=0 */
   error << "0 0.1\n";
   for(int i=1;i<=steps;++i)
     {
@@ -51,22 +52,9 @@
 
 int main()
 {
-  vector<pair<double,double> > low_short, medium_short, high_short,
-    low_medium, medium_medium, high_medium,
-    low_tall, medium_tall, high_tall;
+  vector<pair<double,double> > low, medium, high;
 
-//   read_files("low_short",low_short,5,0.5);
-//   read_files("medium_short",medium_short,10,0.5);
-//   read_files("high_short",high_short,20,0.5);
-
-//   read_files("tiny_medium",low_medium,5,1.0);
-//   read_files("low_medium",low_medium,5,1.0);
-//   read_files("medium_medium",medium_medium,10,1.0);
-//   read_files("high_medium",high_medium,7,1.0);
-
-  read_files("tiny_tall",low_tall,3,2.0);
-  read_files("low_tall",low_tall,5,2.0);
-  read_files("medium_tall",medium_tall,10,2.0);
-//   read_files("high_tall",high_tall,20,2.0);
-
+  read_files("low",low,3,2.0);
+  read_files("medium",medium,5,2.0);
+  read_files("high",high,10,2.0);
 }



More information about the cig-commits mailing list