3 boost/numeric/odeint/stepper/generation/generation_controlled_runge_kutta.hpp
6 Specialization of the controller factory for the controlled_runge_kutta class.
9 Copyright 2011-2012 Karsten Ahnert
10 Copyright 2011-2012 Mario Mulansky
12 Distributed under the Boost Software License, Version 1.0.
13 (See accompanying file LICENSE_1_0.txt or
14 copy at http://www.boost.org/LICENSE_1_0.txt)
18 #ifndef BOOST_NUMERIC_ODEINT_STEPPER_GENERATION_GENERATION_CONTROLLED_RUNGE_KUTTA_HPP_INCLUDED
19 #define BOOST_NUMERIC_ODEINT_STEPPER_GENERATION_GENERATION_CONTROLLED_RUNGE_KUTTA_HPP_INCLUDED
21 #include <boost/numeric/odeint/stepper/controlled_runge_kutta.hpp>
22 #include <boost/numeric/odeint/stepper/generation/make_controlled.hpp>
30 // controller factory for controlled_runge_kutta
31 template< class Stepper >
32 struct controller_factory< Stepper , controlled_runge_kutta< Stepper > >
34 typedef Stepper stepper_type;
35 typedef controlled_runge_kutta< stepper_type > controller_type;
36 typedef typename controller_type::error_checker_type error_checker_type;
37 typedef typename controller_type::step_adjuster_type step_adjuster_type;
38 typedef typename stepper_type::value_type value_type;
39 typedef typename stepper_type::value_type time_type;
41 controller_type operator()( value_type abs_error , value_type rel_error , const stepper_type &stepper )
43 return controller_type( error_checker_type( abs_error , rel_error ) ,
44 step_adjuster_type() , stepper );
47 controller_type operator()( value_type abs_error , value_type rel_error ,
48 time_type max_dt, const stepper_type &stepper )
50 return controller_type( error_checker_type( abs_error , rel_error ) ,
51 step_adjuster_type(max_dt) , stepper );
61 #endif // BOOST_NUMERIC_ODEINT_STEPPER_GENERATION_GENERATION_CONTROLLED_RUNGE_KUTTA_HPP_INCLUDED
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams