[cig-commits] r8905 - in long/3D/Gale/trunk: . documentation/images
input/benchmarks input/benchmarks/sinusoid
walter at geodynamics.org
walter at geodynamics.org
Tue Dec 18 12:01:57 PST 2007
Author: walter
Date: 2007-12-18 12:01:56 -0800 (Tue, 18 Dec 2007)
New Revision: 8905
Added:
long/3D/Gale/trunk/documentation/images/sinusoid_error.png
long/3D/Gale/trunk/input/benchmarks/sinusoid/
long/3D/Gale/trunk/input/benchmarks/sinusoid/Makefile
long/3D/Gale/trunk/input/benchmarks/sinusoid/README
long/3D/Gale/trunk/input/benchmarks/sinusoid/munch_data.cxx
long/3D/Gale/trunk/input/benchmarks/sinusoid/sinusoid.xml
Modified:
long/3D/Gale/trunk/
Log:
r1996 at earth: boo | 2007-12-18 11:31:49 -0800
Add detailed info for how to do sinusoid benchmark
Property changes on: long/3D/Gale/trunk
___________________________________________________________________
Name: svk:merge
- 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:1995
+ 3a629746-de10-0410-b17b-fd6ecaaa963e:/cig:1996
Added: long/3D/Gale/trunk/documentation/images/sinusoid_error.png
===================================================================
(Binary files differ)
Property changes on: long/3D/Gale/trunk/documentation/images/sinusoid_error.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: long/3D/Gale/trunk/input/benchmarks/sinusoid/Makefile
===================================================================
--- long/3D/Gale/trunk/input/benchmarks/sinusoid/Makefile 2007-12-18 20:01:52 UTC (rev 8904)
+++ long/3D/Gale/trunk/input/benchmarks/sinusoid/Makefile 2007-12-18 20:01:56 UTC (rev 8905)
@@ -0,0 +1,2 @@
+munch_data: munch_data.cxx
+ g++ munch_data.cxx -o munch_data
Added: long/3D/Gale/trunk/input/benchmarks/sinusoid/README
===================================================================
--- long/3D/Gale/trunk/input/benchmarks/sinusoid/README 2007-12-18 20:01:52 UTC (rev 8904)
+++ long/3D/Gale/trunk/input/benchmarks/sinusoid/README 2007-12-18 20:01:56 UTC (rev 8905)
@@ -0,0 +1,52 @@
+# 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
+
+# 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 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
+
+
+
+# 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")
+
+# 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_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')
Added: long/3D/Gale/trunk/input/benchmarks/sinusoid/munch_data.cxx
===================================================================
--- long/3D/Gale/trunk/input/benchmarks/sinusoid/munch_data.cxx 2007-12-18 20:01:52 UTC (rev 8904)
+++ long/3D/Gale/trunk/input/benchmarks/sinusoid/munch_data.cxx 2007-12-18 20:01:56 UTC (rev 8905)
@@ -0,0 +1,72 @@
+#include <iostream>
+#include <string>
+#include <vector>
+#include <utility>
+#include <sstream>
+#include <fstream>
+
+using namespace std;
+
+
+void read_files(const string &dir, vector<pair<double,double> > &data,
+ const int steps, const double &offset)
+{
+ ofstream error((dir+"/error").c_str());
+ error << "0 0.1\n";
+ for(int i=1;i<=steps;++i)
+ {
+ double time, height;
+ {
+ stringstream s;
+ s << dir << "/timeInfo.";
+ s.width(5);
+ s.fill('0');
+ s << i << ".dat";
+ ifstream timefile(s.str().c_str());
+ double t, dt;
+ timefile >> t >> dt;
+ time=t+dt;
+ }
+ {
+ stringstream s;
+ s << dir << "/VelocityMagnitudeField.";
+ s.width(5);
+ s.fill('0');
+ s << i << ".dat";
+ ifstream vfile(s.str().c_str());
+ while(vfile)
+ {
+ double n, z, v, x, y;
+ vfile >> n >> x >> y >> z >> v;
+ if(vfile)
+ height=y;
+ }
+ }
+ data.push_back(make_pair(time,height));
+
+ error << time << " " << height-offset << "\n";
+ }
+}
+
+
+int main()
+{
+ vector<pair<double,double> > low_short, medium_short, high_short,
+ low_medium, medium_medium, high_medium,
+ low_tall, medium_tall, high_tall;
+
+// 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);
+
+}
Copied: long/3D/Gale/trunk/input/benchmarks/sinusoid/sinusoid.xml (from rev 8030, long/3D/Gale/trunk/input/benchmarks/sinusoid.xml)
More information about the cig-commits
mailing list