Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68271 - in sandbox/odeint/branches/karsten: . boost/numeric/odeint/algebra boost/numeric/odeint/algebra/external boost/numeric/odeint/stepper libs/numeric/odeint/test
From: karsten.ahnert_at_[hidden]
Date: 2011-01-19 05:18:47


Author: karsten
Date: 2011-01-19 05:18:43 EST (Wed, 19 Jan 2011)
New Revision: 68271
URL: http://svn.boost.org/trac/boost/changeset/68271

Log:
changing the operations to work with units in future
Text files modified:
   sandbox/odeint/branches/karsten/TODO | 7 ++-
   sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/external/mkl_operations.hpp | 13 ++++--
   sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/standard_algebra.hpp | 5 ++
   sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/standard_operations.hpp | 78 +++++++++++++++++++++++++++++----------
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_dopri5.hpp | 2
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_explicit_euler.hpp | 4 +-
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/error_checker.hpp | 15 ++++---
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_dopri5.hpp | 16 ++++----
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_rk54_ck.hpp | 16 ++++----
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_euler.hpp | 4 +-
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_rk4.hpp | 14 ++++--
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/check_resize.cpp | 14 +++---
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/check_stepper_concepts.cpp | 13 +++---
   13 files changed, 128 insertions(+), 73 deletions(-)

Modified: sandbox/odeint/branches/karsten/TODO
==============================================================================
--- sandbox/odeint/branches/karsten/TODO (original)
+++ sandbox/odeint/branches/karsten/TODO 2011-01-19 05:18:43 EST (Wed, 19 Jan 2011)
@@ -1,8 +1,11 @@
-* operations that fit units and result_of
+* Unit test
+ * test operations
+ * test algebra
+OK * operations that fit units
+* operations that fit result_of
 * include test/thrust in jam system, use system from
 * change stepper to stepper_units
 * change error_stepper to rrror_stepper_units
-* change stepper to stepper_units
 * include fusion_algebra in tests
 * split check_concepts into check_stepper_concept, check_error_stepper_concept, check_controlled_stepper_concept
 

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/external/mkl_operations.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/external/mkl_operations.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/external/mkl_operations.hpp 2011-01-19 05:18:43 EST (Wed, 19 Jan 2011)
@@ -29,15 +29,18 @@
 /* only defined for doubles */
 struct mkl_operations
 {
+ template< class Fac1 , class Fac2 > struct scale_sum2;
 
- typedef double time_type;
 
- struct scale_sum2
+ template<>
+ struct scale_sum2< double , double >
     {
- const time_type m_alpha1;
- const time_type m_alpha2;
+ typedef double Fac1;
+ typedef double Fac2;
+ const Fac1 m_alpha1;
+ const Fac2 m_alpha2;
 
- scale_sum2( const time_type alpha1 , const time_type alpha2 ) : m_alpha1( alpha1 ) , m_alpha2( alpha2 ) { }
+ scale_sum2( const Fac1 alpha1 , const Fac2 alpha2 ) : m_alpha1( alpha1 ) , m_alpha2( alpha2 ) { }
 
         template< class T1 , class T2 , class T3 >
         void operator()( T1 &t1 , const T2 &t2 , const T3 &t3) const

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/standard_algebra.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/standard_algebra.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/standard_algebra.hpp 2011-01-19 05:18:43 EST (Wed, 19 Jan 2011)
@@ -25,9 +25,12 @@
 namespace odeint {
 
 /*
- * The const versions are needed for boost.range to work, i.e.
+ * Hints:
+ *
+ * 1. The const versions are needed for boost.range to work, i.e.
  * it allows you to do
  * for_each1( make_pair( vec1.begin() , vec1.begin() + 10 ) , op );
+ *
  */
 struct standard_algebra
 {

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/standard_operations.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/standard_operations.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/algebra/standard_operations.hpp 2011-01-19 05:18:43 EST (Wed, 19 Jan 2011)
@@ -23,17 +23,16 @@
 /*
  * have to be changed if thrust device_vector or gsl_vector are used
  */
-template< class Time >
 struct standard_operations
 {
- typedef Time time_type;
 
+ template< class Fac1 , class Fac2 >
         struct scale_sum2
         {
- const time_type m_alpha1;
- const time_type m_alpha2;
+ const Fac1 m_alpha1;
+ const Fac2 m_alpha2;
 
- scale_sum2( const time_type alpha1 , const time_type alpha2 ) : m_alpha1( alpha1 ) , m_alpha2( alpha2 ) { }
+ scale_sum2( const Fac1 &alpha1 , const Fac2 &alpha2 ) : m_alpha1( alpha1 ) , m_alpha2( alpha2 ) { }
 
                 template< class T1 , class T2 , class T3 >
                 void operator()( T1 &t1 , const T2 &t2 , const T3 &t3) const
@@ -42,11 +41,15 @@
                 }
         };
 
+
+ template< class Fac1 , class Fac2 , class Fac3 >
         struct scale_sum3
         {
- const time_type m_alpha1 , m_alpha2 , m_alpha3;
+ const Fac1 m_alpha1;
+ const Fac2 m_alpha2;
+ const Fac3 m_alpha3;
 
- scale_sum3( const time_type alpha1 , const time_type alpha2 , const time_type alpha3 )
+ scale_sum3( const Fac1 &alpha1 , const Fac2 &alpha2 , const Fac3 &alpha3 )
                         : m_alpha1( alpha1 ) , m_alpha2( alpha2 ) , m_alpha3( alpha3 ) { }
 
                 template< class T1 , class T2 , class T3 , class T4 >
@@ -56,11 +59,16 @@
                 }
         };
 
+
+ template< class Fac1 , class Fac2 , class Fac3 , class Fac4 >
         struct scale_sum4
         {
- const time_type m_alpha1 , m_alpha2 , m_alpha3 , m_alpha4;
+ const Fac1 m_alpha1;
+ const Fac2 m_alpha2;
+ const Fac3 m_alpha3;
+ const Fac4 m_alpha4;
 
- scale_sum4( const time_type alpha1 , const time_type alpha2 , const time_type alpha3 , const time_type alpha4)
+ scale_sum4( const Fac1 &alpha1 , const Fac2 &alpha2 , const Fac3 &alpha3 , const Fac4 &alpha4 )
                                 : m_alpha1( alpha1 ) , m_alpha2( alpha2 ) , m_alpha3( alpha3 ) , m_alpha4( alpha4 ) { }
 
                 template< class T1 , class T2 , class T3 , class T4 , class T5 >
@@ -70,11 +78,17 @@
                 }
         };
 
+
+ template< class Fac1 , class Fac2 , class Fac3 , class Fac4 , class Fac5 >
         struct scale_sum5
         {
- const time_type m_alpha1 , m_alpha2 , m_alpha3 , m_alpha4 , m_alpha5;
+ const Fac1 m_alpha1;
+ const Fac2 m_alpha2;
+ const Fac3 m_alpha3;
+ const Fac4 m_alpha4;
+ const Fac5 m_alpha5;
 
- scale_sum5( const time_type alpha1 , const time_type alpha2 , const time_type alpha3 , const time_type alpha4 , const time_type alpha5)
+ scale_sum5( const Fac1 &alpha1 , const Fac2 &alpha2 , const Fac3 &alpha3 , const Fac4 &alpha4 , const Fac5 &alpha5 )
                         : m_alpha1( alpha1 ) , m_alpha2( alpha2 ) , m_alpha3( alpha3 ) , m_alpha4( alpha4 ) , m_alpha5( alpha5 ) { }
 
                 template< class T1 , class T2 , class T3 , class T4 , class T5 , class T6 >
@@ -84,11 +98,18 @@
                 }
         };
 
+
+ template< class Fac1 , class Fac2 , class Fac3 , class Fac4 , class Fac5 , class Fac6 >
         struct scale_sum6
         {
- const time_type m_alpha1 , m_alpha2 , m_alpha3 , m_alpha4 , m_alpha5 , m_alpha6;
+ const Fac1 m_alpha1;
+ const Fac2 m_alpha2;
+ const Fac3 m_alpha3;
+ const Fac4 m_alpha4;
+ const Fac5 m_alpha5;
+ const Fac6 m_alpha6;
 
- scale_sum6( const time_type alpha1 , const time_type alpha2 , const time_type alpha3 , const time_type alpha4 , const time_type alpha5 , const time_type alpha6 )
+ scale_sum6( const Fac1 &alpha1 , const Fac2 &alpha2 , const Fac3 &alpha3 , const Fac4 &alpha4 , const Fac5 &alpha5 , const Fac6 &alpha6 )
                         : m_alpha1( alpha1 ) , m_alpha2( alpha2 ) , m_alpha3( alpha3 ) , m_alpha4( alpha4 ) , m_alpha5( alpha5 ) , m_alpha6( alpha6 ){ }
 
                 template< class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 >
@@ -98,12 +119,20 @@
                 }
         };
 
+
+ template< class Fac1 , class Fac2 , class Fac3 , class Fac4 , class Fac5 , class Fac6 , class Fac7 >
         struct scale_sum7
         {
- const time_type m_alpha1 , m_alpha2 , m_alpha3 , m_alpha4 , m_alpha5 , m_alpha6 , m_alpha7;
+ const Fac1 m_alpha1;
+ const Fac2 m_alpha2;
+ const Fac3 m_alpha3;
+ const Fac4 m_alpha4;
+ const Fac5 m_alpha5;
+ const Fac6 m_alpha6;
+ const Fac7 m_alpha7;
 
- scale_sum7( const time_type alpha1 , const time_type alpha2 , const time_type alpha3 , const time_type alpha4 ,
- const time_type alpha5 , const time_type alpha6 , const time_type alpha7 )
+ scale_sum7( const Fac1 &alpha1 , const Fac2 &alpha2 , const Fac3 &alpha3 , const Fac4 &alpha4 ,
+ const Fac5 &alpha5 , const Fac6 &alpha6 , const Fac7 &alpha7 )
                         : m_alpha1( alpha1 ) , m_alpha2( alpha2 ) , m_alpha3( alpha3 ) , m_alpha4( alpha4 ) , m_alpha5( alpha5 ) , m_alpha6( alpha6 ) , m_alpha7( alpha7 ) { }
 
                 template< class T1 , class T2 , class T3 , class T4 , class T5 , class T6 , class T7 , class T8 >
@@ -114,17 +143,25 @@
         };
 
 
+ template< class Fac1 , class Fac2 >
+ static scale_sum2< Fac1 , Fac2 > make_scale_sum2( const Fac1 &alpha1 , const Fac2 &alpha2 )
+ {
+ return scale_sum2< Fac1 , Fac2 >( alpha1 , alpha2 );
+ }
+
+
 
 
 
 
 
 
+ template< class Fac1 >
         struct rel_error
         {
- const time_type m_eps_abs , m_eps_rel , m_a_x , m_a_dxdt;
+ const Fac1 m_eps_abs , m_eps_rel , m_a_x , m_a_dxdt;
 
- rel_error( const time_type eps_abs , const time_type eps_rel , const time_type a_x , const time_type a_dxdt )
+ rel_error( const Fac1 &eps_abs , const Fac1 &eps_rel , const Fac1 &a_x , const Fac1 &a_dxdt )
                         : m_eps_abs( eps_abs ) , m_eps_rel( eps_rel ) , m_a_x( a_x ) , m_a_dxdt( a_dxdt ) { }
 
 
@@ -141,17 +178,18 @@
         /* ToDo : this is a reduction-operation so it needs 2 arguments for usage in reduce() functions,
          * but for vector spaces only one argument should be supplied - this should be rethought in details.
          */
+ template< class Fac1 >
         struct maximum
         {
                 template< class T1 , class T2 >
- time_type operator()( const T1 &t1 , const T2 &t2 ) const
+ Fac1 operator()( const T1 &t1 , const T2 &t2 ) const
                 {
                         using std::max;
                         return max( t1 , t2 );
                 }
 
                 template< class T >
- time_type operator()( const T &t1 ) const
+ Fac1 operator()( const T &t1 ) const
                 { // for the vector space algebra
                         return max( t1 );
                 }

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_dopri5.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_dopri5.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_dopri5.hpp 2011-01-19 05:18:43 EST (Wed, 19 Jan 2011)
@@ -182,7 +182,7 @@
                 const state_type &k7 = *m_current_deriv;
 
                 algebra_type::for_each8( x , *m_old_state , k1 , k3 , k4 , k5 , k6 , k7 ,
- typename operations_type::scale_sum7( 1.0 , dt * b1_theta , dt * b3_theta , dt * b4_theta , dt * b5_theta , dt * b6_theta , dt * b7_theta ) );
+ typename operations_type::template scale_sum7< time_type , time_type , time_type , time_type , time_type , time_type , time_type >( 1.0 , dt * b1_theta , dt * b3_theta , dt * b4_theta , dt * b5_theta , dt * b6_theta , dt * b7_theta ) );
         }
 
         const state_type& current_state( void ) const

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_explicit_euler.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_explicit_euler.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_explicit_euler.hpp 2011-01-19 05:18:43 EST (Wed, 19 Jan 2011)
@@ -24,7 +24,7 @@
     class State ,
     class Time = double ,
         class Algebra = standard_algebra ,
- class Operations = standard_operations< Time > ,
+ class Operations = standard_operations ,
         class AdjustSizePolicy = adjust_size_initially_tag
>
 class dense_output_explicit_euler
@@ -80,7 +80,7 @@
         void calc_state( time_type t , state_type &x )
         {
                 time_type delta = t - m_t_old;
- algebra_type::for_each3( x , *m_old_state , m_euler.m_dxdt , typename operations_type::scale_sum2( 1.0 , delta ) );
+ algebra_type::for_each3( x , *m_old_state , m_euler.m_dxdt , typename operations_type::template scale_sum2< time_type , time_type >( 1.0 , delta ) );
         }
 
         void adjust_size( const state_type &x )

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/error_checker.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/error_checker.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/error_checker.hpp 2011-01-19 05:18:43 EST (Wed, 19 Jan 2011)
@@ -21,10 +21,13 @@
 namespace odeint {
 
 
-template< class State ,
- class Time ,
- class Algebra = standard_algebra ,
- class Operations = standard_operations< Time > >
+template
+<
+ class State ,
+ class Time ,
+ class Algebra = standard_algebra ,
+ class Operations = standard_operations
+>
 class error_checker_standard
 {
 public:
@@ -43,9 +46,9 @@
         time_type error( const state_type &x_old , const state_type &dxdt_old , state_type &x_err , const time_type &dt )
         { // this overwrites x_err !
                 algebra_type::for_each3( x_old , dxdt_old , x_err ,
- typename operations_type::rel_error( m_eps_abs , m_eps_rel , m_a_x , m_a_dxdt*dt ) );
+ typename operations_type::template rel_error< time_type >( m_eps_abs , m_eps_rel , m_a_x , m_a_dxdt*dt ) );
 
- return algebra_type::template reduce< time_type >( x_err , typename operations_type::maximum() , 0.0 );
+ return algebra_type::template reduce< time_type >( x_err , typename operations_type::template maximum< time_type >() , 0.0 );
         }
 
 private:

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_dopri5.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_dopri5.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_dopri5.hpp 2011-01-19 05:18:43 EST (Wed, 19 Jan 2011)
@@ -33,7 +33,7 @@
     class State ,
     class Time = double ,
         class Algebra = standard_algebra ,
- class Operations = standard_operations< Time > ,
+ class Operations = standard_operations ,
         class AdjustSizePolicy = adjust_size_initially_tag
>
 class explicit_error_dopri5
@@ -123,29 +123,29 @@
 
         //m_x1 = x + dt*b21*dxdt
         algebra_type::for_each3( m_x1 , in , dxdt_in ,
- typename operations_type::scale_sum2( 1.0 , dt*b21 ) );
+ typename operations_type::template scale_sum2< time_type , time_type >( 1.0 , dt*b21 ) );
 
         sys( m_x1 , m_x2 , t + dt*a2 );
         // m_x1 = x + dt*b31*dxdt + dt*b32*m_x2
         algebra_type::for_each4( m_x1 , in , dxdt_in , m_x2 ,
- typename operations_type::scale_sum3( 1.0 , dt*b31 , dt*b32 ));
+ typename operations_type::template scale_sum3< time_type , time_type , time_type >( 1.0 , dt*b31 , dt*b32 ));
 
         sys( m_x1 , m_x3 , t + dt*a3 );
         // m_x1 = x + dt * (b41*dxdt + b42*m_x2 + b43*m_x3)
         algebra_type::for_each5( m_x1 , in , dxdt_in , m_x2 , m_x3 ,
- typename operations_type::scale_sum4( 1.0 , dt*b41 , dt*b42 , dt*b43 ));
+ typename operations_type::template scale_sum4< time_type , time_type , time_type , time_type >( 1.0 , dt*b41 , dt*b42 , dt*b43 ));
 
         sys( m_x1, m_x4 , t + dt*a4 );
         algebra_type::for_each6( m_x1 , in , dxdt_in , m_x2 , m_x3 , m_x4 ,
- typename operations_type::scale_sum5( 1.0 , dt*b51 , dt*b52 , dt*b53 , dt*b54 ));
+ typename operations_type::template scale_sum5< time_type , time_type , time_type , time_type , time_type >( 1.0 , dt*b51 , dt*b52 , dt*b53 , dt*b54 ));
 
         sys( m_x1 , m_x5 , t + dt*a5 );
         algebra_type::for_each7( m_x1 , in , dxdt_in , m_x2 , m_x3 , m_x4 , m_x5 ,
- typename operations_type::scale_sum6( 1.0 , dt*b61 , dt*b62 , dt*b63 , dt*b64 , dt*b65 ));
+ typename operations_type::template scale_sum6< time_type , time_type , time_type , time_type , time_type , time_type >( 1.0 , dt*b61 , dt*b62 , dt*b63 , dt*b64 , dt*b65 ));
 
         sys( m_x1 , m_x6 , t + dt );
         algebra_type::for_each7( out , in , dxdt_in , m_x3 , m_x4 , m_x5 , m_x6 ,
- typename operations_type::scale_sum6( 1.0 , dt*c1 , dt*c3 , dt*c4 , dt*c5 , dt*c6 ));
+ typename operations_type::template scale_sum6< time_type , time_type , time_type , time_type , time_type , time_type >( 1.0 , dt*c1 , dt*c3 , dt*c4 , dt*c5 , dt*c6 ));
 
         // the new derivative
         sys( out , dxdt_out , t + dt );
@@ -174,7 +174,7 @@
 
         //error estimate
         algebra_type::for_each7( xerr , dxdt_in , m_x3 , m_x4 , m_x5 , m_x6 , dxdt_out ,
- typename operations_type::scale_sum6( dt*dc1 , dt*dc3 , dt*dc4 , dt*dc5 , dt*dc6 , dt*dc7 ) );
+ typename operations_type::template scale_sum6< time_type , time_type , time_type , time_type , time_type , time_type >( dt*dc1 , dt*dc3 , dt*dc4 , dt*dc5 , dt*dc6 , dt*dc7 ) );
         }
 
 

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_rk54_ck.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_rk54_ck.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_error_rk54_ck.hpp 2011-01-19 05:18:43 EST (Wed, 19 Jan 2011)
@@ -38,7 +38,7 @@
     class State ,
     class Time = double ,
         class Algebra = standard_algebra ,
- class Operations = standard_operations< Time > ,
+ class Operations = standard_operations ,
         class AdjustSizePolicy = adjust_size_initially_tag
>
 class explicit_error_rk54_ck
@@ -98,7 +98,7 @@
 
                 //error estimate
                 algebra_type::for_each6( xerr , dxdt , m_x3 , m_x4 , m_x5 , m_x6 ,
- typename operations_type::scale_sum5( dt*dc1 , dt*dc3 , dt*dc4 , dt*dc5 , dt*dc6 ));
+ typename operations_type::template scale_sum5< time_type , time_type , time_type , time_type , time_type >( dt*dc1 , dt*dc3 , dt*dc4 , dt*dc5 , dt*dc6 ));
 
         }
 
@@ -140,29 +140,29 @@
 
                 //m_x1 = x + dt*b21*dxdt
                 algebra_type::for_each3( m_x1 , in , dxdt ,
- typename operations_type::scale_sum2( 1.0 , dt*b21 ) );
+ typename operations_type::template scale_sum2< time_type , time_type >( 1.0 , dt*b21 ) );
 
                 sys( m_x1 , m_x2 , t + dt*a2 );
                 // m_x1 = x + dt*b31*dxdt + dt*b32*m_x2
                 algebra_type::for_each4( m_x1 , in , dxdt , m_x2 ,
- typename operations_type::scale_sum3( 1.0 , dt*b31 , dt*b32 ));
+ typename operations_type::template scale_sum3< time_type , time_type , time_type >( 1.0 , dt*b31 , dt*b32 ));
 
                 sys( m_x1 , m_x3 , t + dt*a3 );
                 // m_x1 = x + dt * (b41*dxdt + b42*m_x2 + b43*m_x3)
                 algebra_type::for_each5( m_x1 , in , dxdt , m_x2 , m_x3 ,
- typename operations_type::scale_sum4( 1.0 , dt*b41 , dt*b42 , dt*b43 ));
+ typename operations_type::template scale_sum4< time_type , time_type , time_type , time_type >( 1.0 , dt*b41 , dt*b42 , dt*b43 ));
 
                 sys( m_x1, m_x4 , t + dt*a4 );
                 algebra_type::for_each6( m_x1 , in , dxdt , m_x2 , m_x3 , m_x4 ,
- typename operations_type::scale_sum5( 1.0 , dt*b51 , dt*b52 , dt*b53 , dt*b54 ));
+ typename operations_type::template scale_sum5< time_type , time_type , time_type , time_type , time_type >( 1.0 , dt*b51 , dt*b52 , dt*b53 , dt*b54 ));
 
                 sys( m_x1 , m_x5 , t + dt*a5 );
                 algebra_type::for_each7( m_x1 , in , dxdt , m_x2 , m_x3 , m_x4 , m_x5 ,
- typename operations_type::scale_sum6( 1.0 , dt*b61 , dt*b62 , dt*b63 , dt*b64 , dt*b65 ));
+ typename operations_type::template scale_sum6< time_type , time_type , time_type , time_type , time_type , time_type >( 1.0 , dt*b61 , dt*b62 , dt*b63 , dt*b64 , dt*b65 ));
 
                 sys( m_x1 , m_x6 , t + dt*a6 );
                 algebra_type::for_each6( out , in , dxdt , m_x3 , m_x4 , m_x6 ,
- typename operations_type::scale_sum5( 1.0 , dt*c1 , dt*c3 , dt*c4 , dt*c6 ));
+ typename operations_type::template scale_sum5< time_type , time_type , time_type , time_type , time_type >( 1.0 , dt*c1 , dt*c3 , dt*c4 , dt*c6 ));
 
         }
 

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_euler.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_euler.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_euler.hpp 2011-01-19 05:18:43 EST (Wed, 19 Jan 2011)
@@ -30,7 +30,7 @@
     class State ,
     class Time = double ,
         class Algebra = standard_algebra ,
- class Operations = standard_operations< Time > ,
+ class Operations = standard_operations ,
         class AdjustSizePolicy = adjust_size_initially_tag
>
 class explicit_euler
@@ -47,7 +47,7 @@
         template< class System >
         void do_step_impl( System system , const state_type &in , const state_type &dxdt , const time_type t , state_type & out , const time_type dt )
         {
- algebra_type::for_each3( out , in , dxdt , typename operations_type::scale_sum2( 1.0 , dt ) );
+ algebra_type::for_each3( out , in , dxdt , typename operations_type::template scale_sum2< time_type , time_type >( 1.0 , dt ) );
         }
 };
 

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_rk4.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_rk4.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/explicit_rk4.hpp 2011-01-19 05:18:43 EST (Wed, 19 Jan 2011)
@@ -31,7 +31,7 @@
     class State ,
     class Time = double ,
         class Algebra = standard_algebra ,
- class Operations = standard_operations< Time > ,
+ class Operations = standard_operations ,
         class AdjustSizePolicy = adjust_size_initially_tag
>
 class explicit_rk4
@@ -81,20 +81,23 @@
 
         // dt * dxdt = k1
         // m_xt = x + dh*dxdt
- algebra_type::for_each3( m_xt , in , dxdt , typename operations_type::scale_sum2( val1 , dh ) );
+ algebra_type::for_each3( m_xt , in , dxdt ,
+ typename operations_type::template scale_sum2< time_type , time_type >( val1 , dh ) );
 
 
         // dt * m_dxt = k2
         sys( m_xt , m_dxt , th );
 
         // m_xt = x + dh*m_dxt
- algebra_type::for_each3( m_xt , in , m_dxt , typename operations_type::scale_sum2( val1 , dh ) );
+ algebra_type::for_each3( m_xt , in , m_dxt ,
+ typename operations_type::template scale_sum2< time_type , time_type >( val1 , dh ) );
 
 
         // dt * m_dxm = k3
         sys( m_xt , m_dxm , th );
         //m_xt = x + dt*m_dxm
- algebra_type::for_each3( m_xt , in , m_dxm , typename operations_type::scale_sum2( val1 , dt ) );
+ algebra_type::for_each3( m_xt , in , m_dxm ,
+ typename operations_type::template scale_sum2< time_type , time_type >( val1 , dt ) );
 
 
         // dt * m_dxh = k4
@@ -102,7 +105,8 @@
         //x += dt/6 * ( m_dxdt + m_dxt + val2*m_dxm )
         time_type dt6 = dt / static_cast<time_type>( 6.0 );
         time_type dt3 = dt / static_cast<time_type>( 3.0 );
- algebra_type::for_each6( out , in , dxdt , m_dxt , m_dxm , m_dxh , typename operations_type::scale_sum5( 1.0 , dt6 , dt3 , dt3 , dt6 ) );
+ algebra_type::for_each6( out , in , dxdt , m_dxt , m_dxm , m_dxh ,
+ typename operations_type::template scale_sum5< time_type , time_type , time_type , time_type , time_type >( 1.0 , dt6 , dt3 , dt3 , dt6 ) );
         }
 
 

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/check_resize.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/check_resize.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/check_resize.cpp 2011-01-19 05:18:43 EST (Wed, 19 Jan 2011)
@@ -61,13 +61,13 @@
 BOOST_AUTO_TEST_SUITE( check_resize_test )
 
 
-typedef explicit_euler< test_array_type , double , standard_algebra , standard_operations< double > , adjust_size_manually_tag > euler_manual_type;
-typedef explicit_euler< test_array_type , double , standard_algebra , standard_operations< double > , adjust_size_initially_tag > euler_initially_type;
-typedef explicit_euler< test_array_type , double , standard_algebra , standard_operations< double > , adjust_size_always_tag > euler_always_type;
-
-typedef explicit_rk4< test_array_type , double , standard_algebra , standard_operations< double > , adjust_size_manually_tag > rk4_manual_type;
-typedef explicit_rk4< test_array_type , double , standard_algebra , standard_operations< double > , adjust_size_initially_tag > rk4_initially_type;
-typedef explicit_rk4< test_array_type , double , standard_algebra , standard_operations< double > , adjust_size_always_tag > rk4_always_type;
+typedef explicit_euler< test_array_type , double , standard_algebra , standard_operations , adjust_size_manually_tag > euler_manual_type;
+typedef explicit_euler< test_array_type , double , standard_algebra , standard_operations , adjust_size_initially_tag > euler_initially_type;
+typedef explicit_euler< test_array_type , double , standard_algebra , standard_operations , adjust_size_always_tag > euler_always_type;
+
+typedef explicit_rk4< test_array_type , double , standard_algebra , standard_operations , adjust_size_manually_tag > rk4_manual_type;
+typedef explicit_rk4< test_array_type , double , standard_algebra , standard_operations , adjust_size_initially_tag > rk4_initially_type;
+typedef explicit_rk4< test_array_type , double , standard_algebra , standard_operations , adjust_size_always_tag > rk4_always_type;
 
 
 typedef mpl::vector<

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/check_stepper_concepts.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/check_stepper_concepts.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/check_stepper_concepts.cpp 2011-01-19 05:18:43 EST (Wed, 19 Jan 2011)
@@ -18,11 +18,16 @@
 #include <vector>
 #include <cmath>
 #include <iostream>
+
 #include <tr1/array>
 
-#include <boost/ref.hpp>
 #include <boost/test/unit_test.hpp>
 
+#include <boost/ref.hpp>
+#include <boost/bind.hpp>
+#include <boost/utility.hpp>
+#include <boost/type_traits/add_reference.hpp>
+
 #include <boost/mpl/vector.hpp>
 #include <boost/mpl/for_each.hpp>
 #include <boost/mpl/insert_range.hpp>
@@ -31,14 +36,9 @@
 #include <boost/mpl/placeholders.hpp>
 #include <boost/mpl/inserter.hpp>
 
-#include <boost/bind.hpp>
-#include <boost/utility.hpp>
-
 #include <boost/numeric/odeint.hpp>
 #include <boost/numeric/odeint/algebra/vector_space_algebra.hpp>
 
-#include <boost/type_traits/add_reference.hpp>
-
 #include "vector_space_1d.hpp"
 
 
@@ -53,6 +53,7 @@
 typedef vector_space_1d< double > vector_space_type;
 typedef std::tr1::array< double , 1 > array_type;
 
+
 const double result = 2.2;
 
 typedef mpl::vector< vector_type , vector_space_type , array_type >::type container_types;


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