Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72547 - in sandbox/odeint/branches/karsten: boost/numeric/odeint/stepper libs/numeric/odeint/test
From: mario.mulansky_at_[hidden]
Date: 2011-06-11 20:49:12


Author: mariomulansky
Date: 2011-06-11 20:49:10 EDT (Sat, 11 Jun 2011)
New Revision: 72547
URL: http://svn.boost.org/trac/boost/changeset/72547

Log:
adjusted tests to run with msvc 10
rosenbrock4.cpp still fails with NULL pointer exception, see rosenbrock4_controller.hpp. Maybe add rosenbrock4_controller to copying tests to find out whats going on.
However, on msvc 9 all tests run
Text files modified:
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/rosenbrock4_controller.hpp | 8 +++++
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/rosenbrock4_dense_output.hpp | 10 +++++--
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/adams_bashforth.cpp | 6 ++++
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/fusion_algebra.cpp | 1
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/generic_error_stepper.cpp | 6 ++++
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/generic_stepper.cpp | 6 ++++
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/implicit_euler.cpp | 42 +++++++++++++++++++++----------
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/range_algebra.cpp | 22 ++++++++--------
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/resizing.cpp | 6 ++++
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/rosenbrock4.cpp | 53 ++++++++++++++++++++++++---------------
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/stepper_concepts.cpp | 6 ++++
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/stepper_copying.cpp | 6 ++++
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/stepper_with_ranges.cpp | 16 ++++++++---
   13 files changed, 132 insertions(+), 56 deletions(-)

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/rosenbrock4_controller.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/rosenbrock4_controller.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/rosenbrock4_controller.hpp 2011-06-11 20:49:10 EDT (Sat, 11 Jun 2011)
@@ -13,6 +13,8 @@
 
 #include <boost/numeric/odeint/stepper/rosenbrock4.hpp>
 
+#include <iostream>
+
 
 namespace boost {
 namespace numeric {
@@ -30,8 +32,12 @@
 
         void copy_variables( const rosenbrock4_controller &rb )
         {
+ /** @ToDo: MSVC 10 fails on these copy operations with invalid null pointer exception, find out why
+ * maybe add rosenbrock4 to stepper_copying test cases
+ */
                 m_stepper = rb.m_stepper;
                 m_xerr = rb.m_xerr;
+ /* end MSVC 10 error */
                 m_atol = rb.m_atol;
                 m_rtol = rb.m_rtol;
                 m_first_step = rb.m_first_step;
@@ -66,7 +72,7 @@
       m_first_step( true ) , m_err_old( 0.0 ) , m_dt_old( 0.0 ) ,
       m_last_rejected( false )
         {
- initialize_variables();
+ initialize_variables();
                 copy_variables( rb );
         }
 

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/rosenbrock4_dense_output.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/rosenbrock4_dense_output.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/rosenbrock4_dense_output.hpp 2011-06-11 20:49:10 EDT (Sat, 11 Jun 2011)
@@ -9,6 +9,7 @@
 #define STEPPER_ROSENBROCK4_DENSE_OUTPUT_HPP_
 
 #include <utility>
+#include <iostream>
 
 #include <boost/numeric/odeint/stepper/rosenbrock4_controller.hpp>
 
@@ -58,17 +59,20 @@
 
         rosenbrock4_dense_output( const controlled_stepper_type &stepper = controlled_stepper_type() )
         : m_stepper( stepper ) , m_state_adjuster() ,
- m_x1() , m_x2() , m_current_state( &m_x1 ) , m_old_state( &m_x2 ) ,
- m_t() , m_t_old() , m_dt()
+ m_x1() , m_x2() , m_t() , m_t_old() , m_dt()
         {
+ m_current_state = &m_x1;
+ m_old_state = &m_x2;
                 initialize_variables();
         }
 
         rosenbrock4_dense_output( const rosenbrock4_dense_output &rb )
         : m_stepper() , m_state_adjuster() ,
- m_x1() , m_x2() , m_current_state( &m_x1 ) , m_old_state( &m_x2 ) ,
+ m_x1() , m_x2() ,
           m_t() , m_t_old() , m_dt()
         {
+ m_current_state = &m_x1;
+ m_old_state = &m_x2;
                 initialize_variables();
                 copy_variables( rb );
         }

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/adams_bashforth.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/adams_bashforth.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/adams_bashforth.cpp 2011-06-11 20:49:10 EDT (Sat, 11 Jun 2011)
@@ -10,6 +10,12 @@
  copy at http://www.boost.org/LICENSE_1_0.txt)
 */
 
+// disable checked iterator warning for msvc
+#include <boost/config.hpp>
+#ifdef BOOST_MSVC
+ #pragma warning(disable:4996)
+#endif
+
 #define BOOST_TEST_MODULE odeint_adams_bashforth
 
 #include <utility>

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/fusion_algebra.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/fusion_algebra.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/fusion_algebra.cpp 2011-06-11 20:49:10 EDT (Sat, 11 Jun 2011)
@@ -10,7 +10,6 @@
 #include <complex>
 #include <utility>
 #include <functional>
-#include <tr1/array>
 
 #include <boost/test/unit_test.hpp>
 #include <boost/test/floating_point_comparison.hpp>

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/generic_error_stepper.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/generic_error_stepper.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/generic_error_stepper.cpp 2011-06-11 20:49:10 EDT (Sat, 11 Jun 2011)
@@ -10,6 +10,12 @@
  copy at http://www.boost.org/LICENSE_1_0.txt)
 */
 
+// disable checked iterator warning for msvc
+#include <boost/config.hpp>
+#ifdef BOOST_MSVC
+ #pragma warning(disable:4996)
+#endif
+
 #define BOOST_TEST_MODULE odeint_generic_error_stepper
 
 #include <iostream>

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/generic_stepper.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/generic_stepper.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/generic_stepper.cpp 2011-06-11 20:49:10 EDT (Sat, 11 Jun 2011)
@@ -10,6 +10,12 @@
  copy at http://www.boost.org/LICENSE_1_0.txt)
 */
 
+// disable checked iterator warning for msvc
+#include <boost/config.hpp>
+#ifdef BOOST_MSVC
+ #pragma warning(disable:4996)
+#endif
+
 #define BOOST_TEST_MODULE odeint_generic_stepper
 
 #include <iostream>

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/implicit_euler.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/implicit_euler.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/implicit_euler.cpp 2011-06-11 20:49:10 EDT (Sat, 11 Jun 2011)
@@ -10,12 +10,19 @@
  copy at http://www.boost.org/LICENSE_1_0.txt)
 */
 
-#define BOOST_TEST_MODULE odeint_implicit_euler
+// disable checked iterator warning for msvc
+#include <boost/config.hpp>
+#ifdef BOOST_MSVC
+ #pragma warning(disable:4996)
+#endif
 
-#include <utility>
+#define BOOST_TEST_MODULE odeint_implicit_euler
 
 #include <boost/test/unit_test.hpp>
 
+#include <utility>
+#include <iostream>
+
 #include <boost/numeric/odeint/stepper/implicit_euler.hpp>
 #include <boost/numeric/odeint/util/ublas_resize.hpp>
 
@@ -29,20 +36,26 @@
 typedef boost::numeric::ublas::vector< value_type > state_type;
 typedef boost::numeric::ublas::matrix< value_type > matrix_type;
 
-
-void sys( const state_type &x , state_type &dxdt , const value_type t )
+/* use functors, because functions don't work with msvc 10, I guess this is a bug */
+struct sys
 {
- dxdt( 0 ) = x( 0 ) + 2 * x( 1 );
- dxdt( 1 ) = x( 1 );
-}
+ void operator()( const state_type &x , state_type &dxdt , const value_type t ) const
+ {
+ dxdt( 0 ) = x( 0 ) + 2 * x( 1 );
+ dxdt( 1 ) = x( 1 );
+ }
+};
 
-void jacobi( const state_type &x , matrix_type &jacobi , const value_type t )
+struct jacobi
 {
- jacobi( 0 , 0 ) = 1;
- jacobi( 0 , 1 ) = 2;
- jacobi( 1 , 0 ) = 0;
- jacobi( 1 , 1 ) = 1;
-}
+ void operator()( const state_type &x , matrix_type &jacobi , const value_type t ) const
+ {
+ jacobi( 0 , 0 ) = 1;
+ jacobi( 0 , 1 ) = 2;
+ jacobi( 1 , 0 ) = 0;
+ jacobi( 1 , 1 ) = 1;
+ }
+};
 
 BOOST_AUTO_TEST_SUITE( implicit_euler_test )
 
@@ -54,7 +67,8 @@
 
     value_type eps = 1E-12;
 
- stepper.do_step( std::make_pair( sys , jacobi ) , x , 0.0 , 0.1 );
+ /* make_pair doesn't work with function pointers on msvc 10 */
+ stepper.do_step( std::make_pair( sys() , jacobi() ) , x , 0.0 , 0.1 );
 
     using std::abs;
 

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/range_algebra.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/range_algebra.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/range_algebra.cpp 2011-06-11 20:49:10 EDT (Sat, 11 Jun 2011)
@@ -11,7 +11,7 @@
 #include <complex>
 #include <utility>
 #include <functional>
-#include <tr1/array>
+#include <boost/array.hpp>
 
 #include <boost/test/unit_test.hpp>
 #include <boost/test/floating_point_comparison.hpp>
@@ -36,7 +36,7 @@
 
 BOOST_AUTO_TEST_CASE( for_each2 )
 {
- std::tr1::array< double , 2 > x1 = {{ 1.0 , 1.0 }} , x2 = {{ 2.0 , 2.0 }};
+ boost::array< double , 2 > x1 = {{ 1.0 , 1.0 }} , x2 = {{ 2.0 , 2.0 }};
         range_algebra::for_each2( x1 , x2 , default_operations::scale_sum1<>( 1.0 ) );
         BOOST_CHECK_CLOSE( x1[0] , 2.0 , 1.0e-10 );
         BOOST_CHECK_CLOSE( x1[1] , 2.0 , 1.0e-10 );
@@ -44,7 +44,7 @@
 
 BOOST_AUTO_TEST_CASE( for_each3 )
 {
- std::tr1::array< double , 2 > x1 = {{ 1.0 , 1.0 }} , x2 = {{ 2.0 , 2.0 }} , x3 = {{ 3.0 , 3.0 }};
+ boost::array< double , 2 > x1 = {{ 1.0 , 1.0 }} , x2 = {{ 2.0 , 2.0 }} , x3 = {{ 3.0 , 3.0 }};
         range_algebra::for_each3( x1 , x2 , x3 , default_operations::scale_sum2<>( 1.0 , 2.0 ) );
         BOOST_CHECK_CLOSE( x1[0] , 8.0 , 1.0e-10 );
         BOOST_CHECK_CLOSE( x1[1] , 8.0 , 1.0e-10 );
@@ -52,7 +52,7 @@
 
 BOOST_AUTO_TEST_CASE( for_each4 )
 {
- std::tr1::array< double , 2 > x1 = {{ 1.0 , 1.0 }} , x2 = {{ 2.0 , 2.0 }} , x3 = {{ 3.0 , 3.0 }} , x4 = {{ 4.0 , 4.0 }};
+ boost::array< double , 2 > x1 = {{ 1.0 , 1.0 }} , x2 = {{ 2.0 , 2.0 }} , x3 = {{ 3.0 , 3.0 }} , x4 = {{ 4.0 , 4.0 }};
         range_algebra::for_each4( x1 , x2 , x3 , x4 , default_operations::scale_sum3<>( 1.0 , 2.0 , 3.0 ) );
         BOOST_CHECK_CLOSE( x1[0] , 20.0 , 1.0e-10 );
         BOOST_CHECK_CLOSE( x1[1] , 20.0 , 1.0e-10 );
@@ -60,7 +60,7 @@
 
 BOOST_AUTO_TEST_CASE( for_each5 )
 {
- std::tr1::array< double , 2 > x1 = {{ 1.0 , 1.0 }} , x2 = {{ 2.0 , 2.0 }} , x3 = {{ 3.0 , 3.0 }} , x4 = {{ 4.0 , 4.0 }} , x5 = {{ 5.0 , 5.0 }};
+ boost::array< double , 2 > x1 = {{ 1.0 , 1.0 }} , x2 = {{ 2.0 , 2.0 }} , x3 = {{ 3.0 , 3.0 }} , x4 = {{ 4.0 , 4.0 }} , x5 = {{ 5.0 , 5.0 }};
         range_algebra::for_each5( x1 , x2 , x3 , x4 , x5 , default_operations::scale_sum4<>( 1.0 , 2.0 , 3.0 , 4.0 ) );
         BOOST_CHECK_CLOSE( x1[0] , 40.0 , 1.0e-10 );
         BOOST_CHECK_CLOSE( x1[1] , 40.0 , 1.0e-10 );
@@ -68,7 +68,7 @@
 
 BOOST_AUTO_TEST_CASE( for_each6 )
 {
- std::tr1::array< double , 2 > x1 = {{ 1.0 , 1.0 }} , x2 = {{ 2.0 , 2.0 }} , x3 = {{ 3.0 , 3.0 }} , x4 = {{ 4.0 , 4.0 }} , x5 = {{ 5.0 , 5.0 }} , x6 = {{ 6.0 , 6.0 }};
+ boost::array< double , 2 > x1 = {{ 1.0 , 1.0 }} , x2 = {{ 2.0 , 2.0 }} , x3 = {{ 3.0 , 3.0 }} , x4 = {{ 4.0 , 4.0 }} , x5 = {{ 5.0 , 5.0 }} , x6 = {{ 6.0 , 6.0 }};
         range_algebra::for_each6( x1 , x2 , x3 , x4 , x5 , x6 ,default_operations::scale_sum5<>( 1.0 , 2.0 , 3.0 , 4.0 , 5.0 ) );
         BOOST_CHECK_CLOSE( x1[0] , 70.0 , 1.0e-10 );
         BOOST_CHECK_CLOSE( x1[1] , 70.0 , 1.0e-10 );
@@ -76,7 +76,7 @@
 
 BOOST_AUTO_TEST_CASE( for_each7 )
 {
- std::tr1::array< double , 2 > x1 = {{ 1.0 , 1.0 }} , x2 = {{ 2.0 , 2.0 }} , x3 = {{ 3.0 , 3.0 }} , x4 = {{ 4.0 , 4.0 }} , x5 = {{ 5.0 , 5.0 }} , x6 = {{ 6.0 , 6.0 }} , x7 = {{ 7.0 , 7.0 }};
+ boost::array< double , 2 > x1 = {{ 1.0 , 1.0 }} , x2 = {{ 2.0 , 2.0 }} , x3 = {{ 3.0 , 3.0 }} , x4 = {{ 4.0 , 4.0 }} , x5 = {{ 5.0 , 5.0 }} , x6 = {{ 6.0 , 6.0 }} , x7 = {{ 7.0 , 7.0 }};
         range_algebra::for_each7( x1 , x2 , x3 , x4 , x5 , x6 , x7 , default_operations::scale_sum6<>( 1.0 , 2.0 , 3.0 , 4.0 , 5.0 , 6.0 ) );
         BOOST_CHECK_CLOSE( x1[0] , 112.0 , 1.0e-10 );
         BOOST_CHECK_CLOSE( x1[1] , 112.0 , 1.0e-10 );
@@ -84,7 +84,7 @@
 
 BOOST_AUTO_TEST_CASE( for_each8 )
 {
- std::tr1::array< double , 2 > x1 = {{ 1.0 , 1.0 }} , x2 = {{ 2.0 , 2.0 }} , x3 = {{ 3.0 , 3.0 }} , x4 = {{ 4.0 , 4.0 }} , x5 = {{ 5.0 , 5.0 }} , x6 = {{ 6.0 , 6.0 }} , x7 = {{ 7.0 , 7.0 }} , x8 = {{ 8.0 , 8.0 }};
+ boost::array< double , 2 > x1 = {{ 1.0 , 1.0 }} , x2 = {{ 2.0 , 2.0 }} , x3 = {{ 3.0 , 3.0 }} , x4 = {{ 4.0 , 4.0 }} , x5 = {{ 5.0 , 5.0 }} , x6 = {{ 6.0 , 6.0 }} , x7 = {{ 7.0 , 7.0 }} , x8 = {{ 8.0 , 8.0 }};
         range_algebra::for_each8( x1 , x2 , x3 , x4 , x5 , x6 , x7 , x8 , default_operations::scale_sum7<>( 1.0 , 2.0 , 3.0 , 4.0 , 5.0 , 6.0 , 7.0 ) );
         BOOST_CHECK_CLOSE( x1[0] , 168.0 , 1.0e-10 );
         BOOST_CHECK_CLOSE( x1[1] , 168.0 , 1.0e-10 );
@@ -92,7 +92,7 @@
 
 BOOST_AUTO_TEST_CASE( reduce )
 {
- std::tr1::array< double , 2 > x = {{ 1.25 , 2.25 }};
+ boost::array< double , 2 > x = {{ 1.25 , 2.25 }};
         double sum = range_algebra::reduce( x , std::plus< double >() , 0.0 );
         BOOST_CHECK_CLOSE( sum , 3.5 , 1.0e-10 );
         BOOST_CHECK_CLOSE( x[0] , 1.25 , 1.0e-10 );
@@ -105,8 +105,8 @@
         typedef units::quantity< si::time , double > time_type;
         typedef units::quantity< si::length , double > length_type;
         typedef units::quantity< si::velocity , double > velocity_type;
- std::tr1::array< length_type , 2 > x1 = {{ 1.0 * si::meter , 1.0 * si::meter }};
- std::tr1::array< velocity_type , 2 > x2 = {{ 2.0 * si::meter / si::seconds , 2.0 * si::meter / si::seconds }};
+ boost::array< length_type , 2 > x1 = {{ 1.0 * si::meter , 1.0 * si::meter }};
+ boost::array< velocity_type , 2 > x2 = {{ 2.0 * si::meter / si::seconds , 2.0 * si::meter / si::seconds }};
         range_algebra::for_each2( x1 , x2 , default_operations::scale_sum1< time_type >( 0.1 * si::second ) );
         BOOST_CHECK_CLOSE( x1[0].value() , 0.2 , 1.0e-10 );
         BOOST_CHECK_CLOSE( x1[1].value() , 0.2 , 1.0e-10 );

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/resizing.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/resizing.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/resizing.cpp 2011-06-11 20:49:10 EDT (Sat, 11 Jun 2011)
@@ -10,6 +10,12 @@
  copy at http://www.boost.org/LICENSE_1_0.txt)
 */
 
+// disable checked iterator warning for msvc
+#include <boost/config.hpp>
+#ifdef BOOST_MSVC
+ #pragma warning(disable:4996)
+#endif
+
 #define BOOST_TEST_MODULE odeint_resize
 
 #include <vector>

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/rosenbrock4.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/rosenbrock4.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/rosenbrock4.cpp 2011-06-11 20:49:10 EDT (Sat, 11 Jun 2011)
@@ -10,9 +10,16 @@
  copy at http://www.boost.org/LICENSE_1_0.txt)
 */
 
+// disable checked iterator warning for msvc
+#include <boost/config.hpp>
+#ifdef BOOST_MSVC
+ #pragma warning(disable:4996)
+#endif
+
 #define BOOST_TEST_MODULE odeint_rosenbrock4
 
 #include <utility>
+#include <iostream>
 
 #include <boost/test/unit_test.hpp>
 
@@ -31,21 +38,27 @@
 typedef boost::numeric::ublas::matrix< value_type > matrix_type;
 
 
-void sys( const state_type &x , state_type &dxdt , const value_type &t )
+struct sys
 {
- dxdt( 0 ) = x( 0 ) + 2 * x( 1 );
- dxdt( 1 ) = x( 1 );
-}
+ void operator()( const state_type &x , state_type &dxdt , const value_type &t ) const
+ {
+ dxdt( 0 ) = x( 0 ) + 2 * x( 1 );
+ dxdt( 1 ) = x( 1 );
+ }
+};
 
-void jacobi( const state_type &x , matrix_type &jacobi , const value_type &t , state_type &dfdt )
+struct jacobi
 {
- jacobi( 0 , 0 ) = 1;
- jacobi( 0 , 1 ) = 2;
- jacobi( 1 , 0 ) = 0;
- jacobi( 1 , 1 ) = 1;
- dfdt( 0 ) = 0.0;
- dfdt( 1 ) = 0.0;
-}
+ void operator()( const state_type &x , matrix_type &jacobi , const value_type &t , state_type &dfdt ) const
+ {
+ jacobi( 0 , 0 ) = 1;
+ jacobi( 0 , 1 ) = 2;
+ jacobi( 1 , 0 ) = 0;
+ jacobi( 1 , 1 ) = 1;
+ dfdt( 0 ) = 0.0;
+ dfdt( 1 ) = 0.0;
+ }
+};
 
 BOOST_AUTO_TEST_SUITE( rosenbrock4_test )
 
@@ -62,9 +75,7 @@
         state_type x( 2 ) , xerr( 2 );
         x(0) = 0.0; x(1) = 1.0;
 
-
-
- stepper.do_step( std::make_pair( sys , jacobi ) , x , 0.0 , 0.1 , xerr );
+ stepper.do_step( std::make_pair( sys() , jacobi() ) , x , 0.0 , 0.1 , xerr );
 
 // using std::abs;
 // value_type eps = 1E-12;
@@ -89,26 +100,26 @@
         x( 0 ) = 0.0 ; x(1) = 1.0;
 
         value_type t = 0.0 , dt = 0.01;
- stepper.try_step( std::make_pair( sys , jacobi ) , x , t , dt );
+ stepper.try_step( std::make_pair( sys() , jacobi() ) , x , t , dt );
 }
 
 BOOST_AUTO_TEST_CASE( test_rosenbrock4_dense_output )
 {
         typedef rosenbrock4_dense_output< rosenbrock4_controller< rosenbrock4< value_type > > > stepper_type;
- stepper_type stepper;
+ typedef rosenbrock4_controller< rosenbrock4< value_type > > controlled_stepper_type;
+ controlled_stepper_type c_stepper;
+ stepper_type stepper( c_stepper );
 
         typedef stepper_type::state_type state_type;
         typedef stepper_type::value_type stepper_value_type;
         typedef stepper_type::deriv_type deriv_type;
         typedef stepper_type::time_type time_type;
-
         state_type x( 2 );
         x( 0 ) = 0.0 ; x(1) = 1.0;
         stepper.initialize( x , 0.0 , 0.1 );
- std::pair< value_type , value_type > tr = stepper.do_step( std::make_pair( sys , jacobi ) );
+ std::pair< value_type , value_type > tr = stepper.do_step( std::make_pair( sys() , jacobi() ) );
         stepper.calc_state( 0.5 * ( tr.first + tr.second ) , x );
 }
 
 
-
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END()
\ No newline at end of file

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/stepper_concepts.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/stepper_concepts.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/stepper_concepts.cpp 2011-06-11 20:49:10 EDT (Sat, 11 Jun 2011)
@@ -13,6 +13,12 @@
  copy at http://www.boost.org/LICENSE_1_0.txt)
 */
 
+// disable checked iterator warning for msvc
+#include <boost/config.hpp>
+#ifdef BOOST_MSVC
+ #pragma warning(disable:4996)
+#endif
+
 #define BOOST_TEST_MODULE odeint_stepper_concepts
 
 #include <vector>

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/stepper_copying.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/stepper_copying.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/stepper_copying.cpp 2011-06-11 20:49:10 EDT (Sat, 11 Jun 2011)
@@ -5,6 +5,12 @@
  * Author: karsten
  */
 
+// disable checked iterator warning for msvc
+#include <boost/config.hpp>
+#ifdef BOOST_MSVC
+ #pragma warning(disable:4996)
+#endif
+
 
 #define BOOST_TEST_MODULE odeint_stepper_copying
 

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/stepper_with_ranges.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/stepper_with_ranges.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/stepper_with_ranges.cpp 2011-06-11 20:49:10 EDT (Sat, 11 Jun 2011)
@@ -5,14 +5,20 @@
  * Author: karsten
  */
 
+// disable checked iterator warning for msvc
+#include <boost/config.hpp>
+#ifdef BOOST_MSVC
+ #pragma warning(disable:4996)
+#endif
+
 #define BOOST_TEST_MODULE odeint_stepper_with_ranges
 
 #include <boost/test/unit_test.hpp>
 
 #include <vector>
-#include <tr1/array>
 #include <utility>
 
+#include <boost/array.hpp>
 #include <boost/range.hpp>
 #include <boost/ref.hpp>
 
@@ -25,7 +31,7 @@
 #include <boost/numeric/odeint/stepper/dense_output_controlled_explicit_fsal.hpp>
 
 typedef std::vector< double > state_type;
-typedef std::tr1::array< double , 3 > state_type2;
+typedef boost::array< double , 3 > state_type2;
 
 
 /*
@@ -114,9 +120,9 @@
 struct vector_fixture
 {
         const static size_t dim = 6;
- std::tr1::array< double , dim > in;
- std::tr1::array< double , dim > q;
- std::tr1::array< double , dim > p;
+ boost::array< double , dim > in;
+ boost::array< double , dim > q;
+ boost::array< double , dim > p;
         state_type err;
 
         vector_fixture( void )


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