Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:42:55

0001 /*
0002  [auto_generated]
0003  boost/numeric/odeint/stepper/generation/generation_controlled_runge_kutta.hpp
0004 
0005  [begin_description]
0006  Specialization of the controller factory for the controlled_runge_kutta class.
0007  [end_description]
0008 
0009  Copyright 2011-2012 Karsten Ahnert
0010  Copyright 2011-2012 Mario Mulansky
0011 
0012  Distributed under the Boost Software License, Version 1.0.
0013  (See accompanying file LICENSE_1_0.txt or
0014  copy at http://www.boost.org/LICENSE_1_0.txt)
0015  */
0016 
0017 
0018 #ifndef BOOST_NUMERIC_ODEINT_STEPPER_GENERATION_GENERATION_CONTROLLED_RUNGE_KUTTA_HPP_INCLUDED
0019 #define BOOST_NUMERIC_ODEINT_STEPPER_GENERATION_GENERATION_CONTROLLED_RUNGE_KUTTA_HPP_INCLUDED
0020 
0021 #include <boost/numeric/odeint/stepper/controlled_runge_kutta.hpp>
0022 #include <boost/numeric/odeint/stepper/generation/make_controlled.hpp>
0023 
0024 
0025 namespace boost {
0026 namespace numeric {
0027 namespace odeint {
0028 
0029 
0030 // controller factory for controlled_runge_kutta
0031 template< class Stepper >
0032 struct controller_factory< Stepper , controlled_runge_kutta< Stepper > >
0033 {
0034     typedef Stepper stepper_type;
0035     typedef controlled_runge_kutta< stepper_type > controller_type;
0036     typedef typename controller_type::error_checker_type error_checker_type;
0037     typedef typename controller_type::step_adjuster_type step_adjuster_type;
0038     typedef typename stepper_type::value_type value_type;
0039     typedef typename stepper_type::value_type time_type;
0040 
0041     controller_type operator()( value_type abs_error , value_type rel_error , const stepper_type &stepper )
0042     {
0043         return controller_type( error_checker_type( abs_error , rel_error ) ,
0044                                 step_adjuster_type() , stepper );
0045     }
0046 
0047     controller_type operator()( value_type abs_error , value_type rel_error ,
0048                                 time_type max_dt, const stepper_type &stepper )
0049     {
0050         return controller_type( error_checker_type( abs_error , rel_error ) ,
0051                                 step_adjuster_type(max_dt) , stepper );
0052     }
0053 };
0054 
0055 
0056 } // odeint
0057 } // numeric
0058 } // boost
0059 
0060 
0061 #endif // BOOST_NUMERIC_ODEINT_STEPPER_GENERATION_GENERATION_CONTROLLED_RUNGE_KUTTA_HPP_INCLUDED