File indexing completed on 2025-01-18 09:42:55
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
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
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 }
0057 }
0058 }
0059
0060
0061 #endif