|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72263 - in sandbox/odeint/branches/karsten: boost/numeric/odeint/algebra boost/numeric/odeint/stepper libs/numeric/odeint/doc/html libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint libs/numeric/odeint/ideas/fusion_runge_kutta/performance libs/numeric/odeint/ideas/fusion_runge_kutta/performance/java
From: mario.mulansky_at_[hidden]
Date: 2011-05-29 12:26:45
Author: mariomulansky
Date: 2011-05-29 12:26:43 EDT (Sun, 29 May 2011)
New Revision: 72263
URL: http://svn.boost.org/trac/boost/changeset/72263
Log:
tests now pass again with gcc and icc (sorry)
Text files modified:
sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/default_operations.hpp | 11 ++++++-----
sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/range_algebra.hpp | 1 -
sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_generic_rk.hpp | 14 +++++++-------
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/concepts.html | 6 +++---
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/extend_odeint.html | 6 +++---
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html | 6 +++---
sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html | 10 +++++-----
sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/generic_rk4_phase_lattice.cpp | 2 +-
sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/java/rk4.java | 33 +++++++++++++++++++++++----------
sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/nr_rk4_phase_lattice.cpp | 2 +-
sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/odeint_rk4_phase_lattice.cpp | 2 +-
sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/phase_lattice.hpp | 2 +-
sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/rt_generic_rk4_phase_lattice.cpp | 4 +++-
13 files changed, 57 insertions(+), 42 deletions(-)
Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/default_operations.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/default_operations.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/default_operations.hpp 2011-05-29 12:26:43 EDT (Sun, 29 May 2011)
@@ -15,6 +15,7 @@
#include <algorithm>
#include <cmath> // for std::max
+#include <boost/array.hpp>
#ifndef __CUDACC__
#include <boost/utility/result_of.hpp>
@@ -234,13 +235,13 @@
template< size_t n , class Fac = double >
struct scale_sumn
{
- BOOST_STATIC_ASSERT( false );
+// BOOST_STATIC_ASSERT( false );
};
template< class Fac >
struct scale_sumn< 1 , Fac > : public scale_sum2< Fac >
{
- scale_sumn( const boost::array<Fac,1> &a , const Fac &dt ) : scale_sum2( 1.0 , a[0]*dt )
+ scale_sumn( const boost::array<Fac,1> &a , const Fac &dt ) : scale_sum2< Fac >( 1.0 , a[0]*dt )
{ }
typedef void result_type;
@@ -249,7 +250,7 @@
template< class Fac >
struct scale_sumn< 2 , Fac > : public scale_sum3< Fac >
{
- scale_sumn( const boost::array<Fac,2> &a , const Fac &dt ) : scale_sum3( 1.0 , a[0]*dt , a[1]*dt )
+ scale_sumn( const boost::array<Fac,2> &a , const Fac &dt ) : scale_sum3< Fac >( 1.0 , a[0]*dt , a[1]*dt )
{ }
typedef void result_type;
@@ -258,7 +259,7 @@
template< class Fac >
struct scale_sumn< 3 , Fac > : public scale_sum4< Fac >
{
- scale_sumn( const boost::array<Fac,3> &a , const Fac &dt ) : scale_sum4( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt )
+ scale_sumn( const boost::array<Fac,3> &a , const Fac &dt ) : scale_sum4< Fac >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt )
{ }
typedef void result_type;
@@ -267,7 +268,7 @@
template< class Fac >
struct scale_sumn< 4 , Fac > : public scale_sum5< Fac >
{
- scale_sumn( const boost::array<Fac,4> &a , const Fac &dt ) : scale_sum5( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt )
+ scale_sumn( const boost::array<Fac,4> &a , const Fac &dt ) : scale_sum5< Fac >( 1.0 , a[0]*dt , a[1]*dt , a[2]*dt , a[3]*dt )
{ }
typedef void result_type;
Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/range_algebra.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/range_algebra.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/range_algebra.hpp 2011-05-29 12:26:43 EDT (Sun, 29 May 2011)
@@ -83,7 +83,6 @@
}
-
/* for the generic stepper
*/
template< size_t n , class S1 , class S2 , class S3 , class S4 , class Op >
Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_generic_rk.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_generic_rk.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_generic_rk.hpp 2011-05-29 12:26:43 EDT (Sun, 29 May 2011)
@@ -26,9 +26,9 @@
#include <boost/ref.hpp>
#include <boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp>
-#include <boost/numeric/odeint/algebra/default_operations.hpp>
#include <boost/numeric/odeint/stepper/detail/macros.hpp>
-#include <boost/numeric/odeint/algebra/generic_algebra.hpp>
+#include <boost/numeric/odeint/algebra/range_algebra.hpp>
+#include <boost/numeric/odeint/algebra/default_operations.hpp>
//#include "fusion_foreach_performance.hpp"
#include <iostream>
@@ -196,11 +196,11 @@
//std::cout << stage_number-2 << ", t': " << t + stage.c * dt << std::endl;
if( stage_number < StageCount )
- algebra_type::for_eachn<stage_number>( x_tmp , x , dxdt , F ,
- typename operations_type::template scale_sumn< stage_number , time_type >( stage.a , dt ) );
+ algebra_type::template for_eachn<stage_number>( x_tmp , x , dxdt , F ,
+ typename operations_type::template scale_sumn< stage_number , time_type >( stage.a , dt ) );
else
- algebra_type::for_eachn<stage_number>( x_out , x , dxdt , F ,
- typename operations_type::template scale_sumn< stage_number , time_type >( stage.a , dt ) );
+ algebra_type::template for_eachn<stage_number>( x_out , x , dxdt , F ,
+ typename operations_type::template scale_sumn< stage_number , time_type >( stage.a , dt ) );
}
};
@@ -235,4 +235,4 @@
}
}
}
-#endif /* EXPLICIT_GENERIC_RK_HPP_ */
\ No newline at end of file
+#endif /* EXPLICIT_GENERIC_RK_HPP_ */
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/concepts.html
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/concepts.html (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/concepts.html 2011-05-29 12:26:43 EDT (Sun, 29 May 2011)
@@ -3,8 +3,8 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Concepts</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
-<link rel="home" href="../index.html" title="Chapter 1. boost.sandbox.numeric.odeint">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../index.html" title="Chapter 1. boost.sandbox.numeric.odeint">
<link rel="up" href="../index.html" title="Chapter 1. boost.sandbox.numeric.odeint">
<link rel="prev" href="extend_odeint/adapt_your_own_operations.html" title="Adapt your own operations">
<link rel="next" href="concepts/concept_system.html" title="Concept system">
@@ -15,7 +15,7 @@
<div class="spirit-nav">
<a accesskey="p" href="extend_odeint/adapt_your_own_operations.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="concepts/concept_system.html"><img src="../images/next.png" alt="Next"></a>
</div>
-<div class="section">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_sandbox_numeric_odeint.concepts"></a><a class="link" href="concepts.html" title="Concepts">Concepts</a>
</h2></div></div></div>
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/extend_odeint.html
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/extend_odeint.html (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/extend_odeint.html 2011-05-29 12:26:43 EDT (Sun, 29 May 2011)
@@ -3,8 +3,8 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Extend odeint</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
-<link rel="home" href="../index.html" title="Chapter 1. boost.sandbox.numeric.odeint">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../index.html" title="Chapter 1. boost.sandbox.numeric.odeint">
<link rel="up" href="../index.html" title="Chapter 1. boost.sandbox.numeric.odeint">
<link rel="prev" href="tutorial/references.html" title="References">
<link rel="next" href="extend_odeint/write_own_steppers.html" title="Write own steppers">
@@ -15,7 +15,7 @@
<div class="spirit-nav">
<a accesskey="p" href="tutorial/references.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="extend_odeint/write_own_steppers.html"><img src="../images/next.png" alt="Next"></a>
</div>
-<div class="section">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_sandbox_numeric_odeint.extend_odeint"></a><a class="link" href="extend_odeint.html" title="Extend odeint">Extend odeint</a>
</h2></div></div></div>
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/boost_sandbox_numeric_odeint/tutorial.html 2011-05-29 12:26:43 EDT (Sun, 29 May 2011)
@@ -3,8 +3,8 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Tutorial</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
-<link rel="home" href="../index.html" title="Chapter 1. boost.sandbox.numeric.odeint">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../index.html" title="Chapter 1. boost.sandbox.numeric.odeint">
<link rel="up" href="../index.html" title="Chapter 1. boost.sandbox.numeric.odeint">
<link rel="prev" href="getting_started/short_example.html" title="Short Example">
<link rel="next" href="tutorial/harmonic_oscillator.html" title="Harmonic oscillator">
@@ -15,7 +15,7 @@
<div class="spirit-nav">
<a accesskey="p" href="getting_started/short_example.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="tutorial/harmonic_oscillator.html"><img src="../images/next.png" alt="Next"></a>
</div>
-<div class="section">
+<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="boost_sandbox_numeric_odeint.tutorial"></a><a class="link" href="tutorial.html" title="Tutorial">Tutorial</a>
</h2></div></div></div>
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/doc/html/index.html 2011-05-29 12:26:43 EDT (Sun, 29 May 2011)
@@ -3,15 +3,15 @@
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Chapter 1. boost.sandbox.numeric.odeint</title>
<link rel="stylesheet" href="boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
-<link rel="home" href="index.html" title="Chapter 1. boost.sandbox.numeric.odeint">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="Chapter 1. boost.sandbox.numeric.odeint">
<link rel="next" href="boost_sandbox_numeric_odeint/getting_started.html" title="Getting started">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"><a accesskey="n" href="boost_sandbox_numeric_odeint/getting_started.html"><img src="images/next.png" alt="Next"></a></div>
-<div class="chapter">
+<div class="chapter" lang="en">
<div class="titlepage"><div>
<div><h2 class="title">
<a name="odeint"></a>Chapter 1. boost.sandbox.numeric.odeint</h2></div>
@@ -23,7 +23,7 @@
</h3></div></div>
<div><p class="copyright">Copyright © 2009 -2011 Karsten Ahnert and Mario Mulansky</p></div>
<div><div class="legalnotice">
-<a name="id563836"></a><p>
+<a name="id549556"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
</p>
@@ -108,7 +108,7 @@
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: May 21, 2011 at 09:07:12 GMT</small></p></td>
+<td align="left"><p><small>Last revised: May 28, 2011 at 18:30:58 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/generic_rk4_phase_lattice.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/generic_rk4_phase_lattice.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/generic_rk4_phase_lattice.cpp 2011-05-29 12:26:43 EDT (Sun, 29 May 2011)
@@ -67,5 +67,5 @@
fusion_wrapper stepper;
- run( stepper , 1000 , 1E-2 );
+ run( stepper , 10000 , 1E-6 );
}
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/java/rk4.java
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/java/rk4.java (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/java/rk4.java 2011-05-29 12:26:43 EDT (Sun, 29 May 2011)
@@ -32,18 +32,31 @@
public static void main( String[] args )
{
- double dt = 1E-10;
- int steps = 20000000;
+ final int loops = 20;
+ final double dt = 1E-10;
+ final int steps = 20000000;
+ double mean = 0.0;
+
FirstOrderIntegrator rk4 = new ClassicalRungeKuttaIntegrator( dt );
- FirstOrderDifferentialEquations ode = new Lorenz();
- double[] y = new double[] { 0.0, 1.0 , 1.0 }; // initial state
- try {
- rk4.integrate(ode, 0.0, y, dt*steps , y);
- } catch(DerivativeException de) {
- System.out.println("wrong exception caught");
- } catch(IntegratorException ie) {
+ final FirstOrderDifferentialEquations ode = new Lorenz();
+
+ for( int n=0 ; n<loops+3 ; n++ )
+ {
+ double[] y = new double[] { 0.0, 1.0 , 1.0 }; // initial state
+ long start = System.currentTimeMillis();
+ try {
+ rk4.integrate(ode, 0.0, y, dt*steps , y);
+ } catch(DerivativeException de) {
+ System.out.println("wrong exception caught");
+ } catch(IntegratorException ie) {
+ }
+ System.out.println( y[0] + " " + y[1] + " " + y[2] );
+ long end = System.currentTimeMillis();
+ System.out.println( "Time: " + (end-start) + " ms" );
+ if( n > 2 )
+ mean += end - start;
}
- System.out.println( y[0] + " " + y[1] + " " + y[2] );
+ System.out.println("Average run time: " + (mean/loops) + " ms" );
}
}
\ No newline at end of file
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/nr_rk4_phase_lattice.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/nr_rk4_phase_lattice.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/nr_rk4_phase_lattice.cpp 2011-05-29 12:26:43 EDT (Sun, 29 May 2011)
@@ -76,5 +76,5 @@
nr_wrapper stepper;
- run( stepper , 1000 , 1E-2 );
+ run( stepper , 10000 , 1E-6 );
}
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/odeint_rk4_phase_lattice.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/odeint_rk4_phase_lattice.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/odeint_rk4_phase_lattice.cpp 2011-05-29 12:26:43 EDT (Sun, 29 May 2011)
@@ -56,5 +56,5 @@
odeint_wrapper stepper;
- run( stepper , 1000 , 1E-2 );
+ run( stepper , 10000 , 1E-6 );
}
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/phase_lattice.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/phase_lattice.hpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/phase_lattice.hpp 2011-05-29 12:26:43 EDT (Sun, 29 May 2011)
@@ -30,4 +30,4 @@
dxdt[N-1] = m_omega[N-1] + sin( x[N-1] - x[N-2] );
}
-};
\ No newline at end of file
+};
Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/rt_generic_rk4_phase_lattice.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/rt_generic_rk4_phase_lattice.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/ideas/fusion_runge_kutta/performance/rt_generic_rk4_phase_lattice.cpp 2011-05-29 12:26:43 EDT (Sun, 29 May 2011)
@@ -68,7 +68,9 @@
int main()
{
+ srand( 12312354 );
+
rt_generic_wrapper stepper;
- run( stepper , 1000 , 1E-2 );
+ run( stepper , 10000 , 1E-6 );
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk