Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66183 - in sandbox/odeint/branches/karsten: . boost/numeric boost/numeric/odeint/stepper libs/numeric/odeint/test libs/numeric/odeint/test/gsl
From: karsten.ahnert_at_[hidden]
Date: 2010-10-25 13:45:51


Author: karsten
Date: 2010-10-25 13:45:49 EDT (Mon, 25 Oct 2010)
New Revision: 66183
URL: http://svn.boost.org/trac/boost/changeset/66183

Log:
* test frame for gsl vectors created
* initialize dense output Dormand Prince 5
Added:
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_dopri5.hpp (contents, props changed)
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/gsl/check_gsl.cpp (contents, props changed)
      - copied, changed from r66179, /sandbox/odeint/branches/karsten/libs/numeric/odeint/test/gsl/check_stepper_concepts.cpp
Removed:
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/gsl/check_stepper_concepts.cpp
Text files modified:
   sandbox/odeint/branches/karsten/Jamroot | 4 +-
   sandbox/odeint/branches/karsten/boost/numeric/odeint.hpp | 1
   sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_error_stepper.hpp | 58 +++++++++++++++++++++++++--------------
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/check_stepper_concepts.cpp | 6 ++--
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/gsl/Jamfile | 29 +++++++++++++++++++
   sandbox/odeint/branches/karsten/libs/numeric/odeint/test/gsl/check_gsl.cpp | 29 +++++++++++++++++++
   6 files changed, 99 insertions(+), 28 deletions(-)

Modified: sandbox/odeint/branches/karsten/Jamroot
==============================================================================
--- sandbox/odeint/branches/karsten/Jamroot (original)
+++ sandbox/odeint/branches/karsten/Jamroot 2010-10-25 13:45:49 EDT (Mon, 25 Oct 2010)
@@ -16,8 +16,8 @@
 
 # additional tests with external libraries :
 build-project libs/numeric/odeint/test/gmp ;
-build-project libs/numeric/odeint/test/mkl ;
-#build-project libs/numeric/odeint/test/gsl ;
+# build-project libs/numeric/odeint/test/mkl ;
+build-project libs/numeric/odeint/test/gsl ;
 
 # docs:
 # build-project libs/numeric/odeint/doc ;

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint.hpp 2010-10-25 13:45:49 EDT (Mon, 25 Oct 2010)
@@ -26,5 +26,6 @@
 #include <boost/numeric/odeint/stepper/controlled_error_stepper.hpp>
 
 #include <boost/numeric/odeint/stepper/dense_output_explicit_euler.hpp>
+#include <boost/numeric/odeint/stepper/dense_output_dopri5.hpp>
 
 #endif // BOOST_NUMERIC_ODEINT_HPP

Modified: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_error_stepper.hpp
==============================================================================
--- sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_error_stepper.hpp (original)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/controlled_error_stepper.hpp 2010-10-25 13:45:49 EDT (Mon, 25 Oct 2010)
@@ -33,7 +33,7 @@
 } controlled_step_result;
 
 
-/* error stepper categroy dispatcher */
+/* error stepper category dispatcher */
 template<
     class ErrorStepper ,
     class ErrorChecker = error_checker_standard< typename ErrorStepper::state_type ,
@@ -57,19 +57,17 @@
 {
 public:
 
- typedef ErrorStepper error_stepper_type;
- typedef typename error_stepper_type::state_type state_type;
- typedef typename error_stepper_type::time_type time_type;
- typedef typename error_stepper_type::order_type order_type;
-
- // ToDo : check if the next line can be avoided
- typedef typename error_stepper_type::adjust_size_policy adjust_size_policy;
-
+ typedef ErrorStepper stepper_type;
+ typedef typename stepper_type::state_type state_type;
+ typedef typename stepper_type::time_type time_type;
+ typedef typename stepper_type::order_type order_type;
+ typedef typename stepper_type::adjust_size_policy adjust_size_policy;
         typedef ErrorChecker error_checker_type;
 
+
         // ToDo : check if stepper could be constructed by the controlled stepper
         controlled_error_stepper(
- error_stepper_type &stepper ,
+ stepper_type &stepper ,
                         const error_checker_type &error_checker = error_checker_type()
                         )
         : m_stepper( stepper ) , m_error_checker( error_checker ) ,
@@ -148,10 +146,20 @@
         m_stepper.adjust_size( x );
         }
 
+ stepper_type& stepper( void )
+ {
+ return m_stepper;
+ }
+
+ const stepper_type& stepper( void ) const
+ {
+ return m_stepper;
+ }
+
 
 private:
 
- error_stepper_type &m_stepper;
+ stepper_type &m_stepper;
         error_checker_type m_error_checker;
 
         size_adjuster< state_type , 1 > m_dxdt_size_adjuster;
@@ -183,19 +191,16 @@
 {
 public:
 
- typedef ErrorStepper error_stepper_type;
- typedef typename error_stepper_type::state_type state_type;
- typedef typename error_stepper_type::time_type time_type;
- typedef typename error_stepper_type::order_type order_type;
-
- // ToDo : check if the next line can be avoided
- typedef typename error_stepper_type::adjust_size_policy adjust_size_policy;
-
+ typedef ErrorStepper stepper_type;
+ typedef typename stepper_type::state_type state_type;
+ typedef typename stepper_type::time_type time_type;
+ typedef typename stepper_type::order_type order_type;
+ typedef typename stepper_type::adjust_size_policy adjust_size_policy;
     typedef ErrorChecker error_checker_type;
 
     // ToDo : check if stepper could be constructed by the controlled stepper
     controlled_error_stepper(
- error_stepper_type &stepper ,
+ stepper_type &stepper ,
             const error_checker_type &error_checker = error_checker_type()
             )
     : m_stepper( stepper ) , m_error_checker( error_checker ) ,
@@ -283,10 +288,21 @@
             m_first_call = true;
     }
 
+ stepper_type& stepper( void )
+ {
+ return m_stepper;
+ }
+
+ const stepper_type& stepper( void ) const
+ {
+ return m_stepper;
+ }
+
+
 
 private:
 
- error_stepper_type &m_stepper;
+ stepper_type &m_stepper;
     error_checker_type m_error_checker;
 
     size_adjuster< state_type , 1 > m_dxdt_size_adjuster;

Added: sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_dopri5.hpp
==============================================================================
--- (empty file)
+++ sandbox/odeint/branches/karsten/boost/numeric/odeint/stepper/dense_output_dopri5.hpp 2010-10-25 13:45:49 EDT (Mon, 25 Oct 2010)
@@ -0,0 +1,35 @@
+/*
+ boost header: boost/numeric/odeint/dense_output_dopri5.hpp
+
+ Copyright 2009 Karsten Ahnert
+ Copyright 2009 Mario Mulansky
+
+ 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)
+*/
+
+#ifndef BOOST_BOOST_NUMERIC_ODEINT_DENSE_OUTPUT_DOPRI5_HPP_INCLUDED
+#define BOOST_BOOST_NUMERIC_ODEINT_DENSE_OUTPUT_DOPRI5_HPP_INCLUDED
+
+#include <boost/numeric/odeint/stepper/dense_output_dopri5.hpp>
+
+namespace boost {
+namespace numeric {
+namespace odeint {
+
+
+template< class ControlledStepper >
+class dense_output_dopri5
+{
+private:
+
+ typedef ControlledStepper stepper_type;
+
+};
+
+} // namespace odeint
+} // namespace numeric
+} // namespace boost
+
+#endif //BOOST_BOOST_NUMERIC_ODEINT_DENSE_OUTPUT_DOPRI5_HPP_INCLUDED

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 2010-10-25 13:45:49 EDT (Mon, 25 Oct 2010)
@@ -302,7 +302,7 @@
         void operator()( void )
         {
                 vector_type x( 1 , 2.0 );
- typename ControlledStepper::error_stepper_type error_stepper;
+ typename ControlledStepper::stepper_type error_stepper;
                 error_checker_standard< typename ControlledStepper::state_type , typename ControlledStepper::time_type > error_checker;
                 ControlledStepper controlled_stepper( error_stepper , error_checker );
                 check_controlled_stepper_concept( controlled_stepper , constant_system_vector , x );
@@ -317,7 +317,7 @@
         {
                 vector_space_type x;
                 x.m_x = 2.0;
- typename ControlledStepper::error_stepper_type error_stepper;
+ typename ControlledStepper::stepper_type error_stepper;
                 error_checker_standard< typename ControlledStepper::state_type , typename ControlledStepper::time_type , vector_space_algebra > error_checker;
                 ControlledStepper controlled_stepper( error_stepper , error_checker );
                 check_controlled_stepper_concept( controlled_stepper , constant_system_vector_space , x );
@@ -332,7 +332,7 @@
         {
                 array_type x;
                 x[0] = 2.0;
- typename ControlledStepper::error_stepper_type error_stepper;
+ typename ControlledStepper::stepper_type error_stepper;
                 error_checker_standard< typename ControlledStepper::state_type , typename ControlledStepper::time_type > error_checker;
                 ControlledStepper controlled_stepper( error_stepper , error_checker );
                 check_controlled_stepper_concept( controlled_stepper , constant_system_array , x );

Modified: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/gsl/Jamfile
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/gsl/Jamfile (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/gsl/Jamfile 2010-10-25 13:45:49 EDT (Mon, 25 Oct 2010)
@@ -1 +1,28 @@
-Jamfile
+# (C) Copyright 2010 : Karsten Ahnert, Mario Mulansky
+# 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)
+
+# bring in rules for testing
+
+import testing ;
+
+project
+ : requirements
+ <library>/boost/test//boost_unit_test_framework
+ <include>../../../../..
+ <include>$BOOST_ROOT
+ ;
+
+
+lib libgsl : : <name>gsl <link>shared ;
+lib libgslcblas : : <name>gslcblas <link>shared ;
+
+test-suite "mkl"
+ :
+ [ run check_gsl.cpp libgsl libgslcblas
+ :
+ :
+ : <link>shared:<define>BOOST_TEST_DYN_LINK=1
+ ]
+ ;
+

Copied: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/gsl/check_gsl.cpp (from r66179, /sandbox/odeint/branches/karsten/libs/numeric/odeint/test/gsl/check_stepper_concepts.cpp)
==============================================================================
--- /sandbox/odeint/branches/karsten/libs/numeric/odeint/test/gsl/check_stepper_concepts.cpp (original)
+++ sandbox/odeint/branches/karsten/libs/numeric/odeint/test/gsl/check_gsl.cpp 2010-10-25 13:45:49 EDT (Mon, 25 Oct 2010)
@@ -1 +1,28 @@
-check_stepper_concepts.cpp
+/* Boost check_gmp.cpp test file
+
+ Copyright 2009 Karsten Ahnert
+ Copyright 2009 Mario Mulansky
+
+ This file tests the odeint library with the gmp arbitrary precision types
+
+ 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)
+*/
+
+#define BOOST_TEST_MODULE test_gsl
+
+#include <gsl/gsl_vector.h>
+
+#include <boost/test/unit_test.hpp>
+
+#include <boost/numeric/odeint.hpp>
+
+using namespace boost::unit_test;
+using namespace boost::numeric::odeint;
+
+
+
+BOOST_AUTO_TEST_CASE( test_gsl )
+{
+}

Deleted: sandbox/odeint/branches/karsten/libs/numeric/odeint/test/gsl/check_stepper_concepts.cpp
==============================================================================
--- sandbox/odeint/branches/karsten/libs/numeric/odeint/test/gsl/check_stepper_concepts.cpp 2010-10-25 13:45:49 EDT (Mon, 25 Oct 2010)
+++ (empty file)
@@ -1 +0,0 @@
-check_stepper_concepts.cpp


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