Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58654 - sandbox/odeint/boost/numeric/odeint
From: karsten.ahnert_at_[hidden]
Date: 2010-01-03 04:16:32


Author: karsten
Date: 2010-01-03 04:16:31 EST (Sun, 03 Jan 2010)
New Revision: 58654
URL: http://svn.boost.org/trac/boost/changeset/58654

Log:
changing the usage of std::tr1::array
Removed:
   sandbox/odeint/boost/numeric/odeint/resizer.hpp
Text files modified:
   sandbox/odeint/boost/numeric/odeint/hamiltonian_stepper_rk.hpp | 10 +++++-----
   sandbox/odeint/boost/numeric/odeint/stepper_half_step.hpp | 5 -----
   2 files changed, 5 insertions(+), 10 deletions(-)

Modified: sandbox/odeint/boost/numeric/odeint/hamiltonian_stepper_rk.hpp
==============================================================================
--- sandbox/odeint/boost/numeric/odeint/hamiltonian_stepper_rk.hpp (original)
+++ sandbox/odeint/boost/numeric/odeint/hamiltonian_stepper_rk.hpp 2010-01-03 04:16:31 EST (Sun, 03 Jan 2010)
@@ -14,7 +14,6 @@
 #define BOOST_NUMERIC_ODEINT_HAMILTONIAN_STEPPER_RK_HPP_INCLUDED
 
 #include <stdexcept>
-#include <tr1/array>
 
 #include <boost/numeric/odeint/detail/iterator_algebra.hpp>
 #include <boost/numeric/odeint/container_traits.hpp>
@@ -70,22 +69,23 @@
                       time_type dt )
         {
             const size_t order = 6;
- const std::tr1::array< time_type , order > rk_a = {{
+
+ const time_type rk_a[order] = {
                     static_cast<time_type>( 0.40518861839525227722 ) ,
                     static_cast<time_type>( -0.28714404081652408900 ) ,
                     static_cast<time_type>( 0.3819554224212718118 ) ,
                     static_cast<time_type>( 0.3819554224212718118 ) ,
                     static_cast<time_type>( -0.28714404081652408900 ) ,
                      static_cast<time_type>( 0.40518861839525227722 )
- }};
- const std::tr1::array< time_type , order > rk_b = {{
+ };
+ const time_type rk_b[order] = {
                     static_cast<time_type>( -3.0/73.0 ) ,
                     static_cast<time_type>( 17.0/59.0 ) ,
                     static_cast<time_type>( 0.50592059438123984212 ) ,
                     static_cast<time_type>( 17.0/59.0 ) ,
                     static_cast<time_type>( -3.0/73.0 ) ,
                     static_cast<time_type>( 0.0 )
- }};
+ };
 
 
 

Deleted: sandbox/odeint/boost/numeric/odeint/resizer.hpp
==============================================================================
--- sandbox/odeint/boost/numeric/odeint/resizer.hpp 2010-01-03 04:16:31 EST (Sun, 03 Jan 2010)
+++ (empty file)
@@ -1,89 +0,0 @@
-
-/* Boost odeint/resizer.hpp header file
-
- Copyright 2009 Karsten Ahnert
- Copyright 2009 Mario Mulansky
-
- This file includes resizer functionality for containers
-
- 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_NUMERIC_ODEINT_RESIZER_HPP
-#define BOOST_NUMERIC_ODEINT_RESIZER_HPP
-
-#include <tr1/array>
-
-namespace boost {
-namespace numeric {
-namespace odeint {
-
- template< class Container >
- class resizer
- {
- public:
-
- typedef Container container_type;
-
-
- private:
- // we need a resizable container here (obviously...)
- BOOST_CLASS_REQUIRE( container_type , boost::numeric::odeint, Resizer );
-
-
- public:
-
- void resize( const container_type &x , container_type &dxdt ) const
- {
- dxdt.resize( x.size() );
- }
-
- bool same_size( const container_type &x1 , const container_type &x2 ) const
- {
- return (x1.size() == x2.size());
- }
-
- void adjust_size( const container_type &x1 , container_type &x2 ) const
- {
- if( !same_size( x1 , x2 ) ) resize( x1 , x2 );
- }
- };
-
-
-
- /* Template Specialization for fixed size array - no resizing can happen */
- template< class T , size_t N >
- class resizer< std::tr1::array< T , N > >
- {
- public:
-
- typedef std::tr1::array< T , N > container_type;
-
-
- public:
-
- void resize( const container_type &x , container_type &dxdt ) const
- {
- throw; // should never be called
- }
-
- const bool same_size( const container_type &x1 , const container_type &x2 ) const
- {
- return true; // if this was false, the code wouldn't compile
- }
-
- void adjust_size( const container_type &x1 , container_type &x2 ) const
- {
- if( !same_size( x1 , x2 ) ) throw;
- }
- };
-
-
-} // namespace odeint
-} // namespace numeric
-} // namespace boost
-
-
-#endif // BOOST_NUMERIC_ODEINT_RESIZER_HPP

Modified: sandbox/odeint/boost/numeric/odeint/stepper_half_step.hpp
==============================================================================
--- sandbox/odeint/boost/numeric/odeint/stepper_half_step.hpp (original)
+++ sandbox/odeint/boost/numeric/odeint/stepper_half_step.hpp 2010-01-03 04:16:31 EST (Sun, 03 Jan 2010)
@@ -16,12 +16,7 @@
 #ifndef BOOST_NUMERIC_ODEINT_STEPPER_HALF_STEP_HPP
 #define BOOST_NUMERIC_ODEINT_STEPPER_HALF_STEP_HPP
 
-#include <boost/concept_check.hpp>
-
 #include <boost/numeric/odeint/detail/iterator_algebra.hpp>
-#include <boost/numeric/odeint/concepts/state_concept.hpp>
-#include <boost/numeric/odeint/resizer.hpp>
-
 
 
 namespace boost {


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