18 #include "boost_odeint_integrator.h"
21 #include <boost/numeric/odeint/stepper/runge_kutta_dopri5.hpp>
22 #include <boost/numeric/odeint/stepper/dense_output_runge_kutta.hpp>
25 #include <boost/numeric/odeint/stepper/bulirsch_stoer_dense_out.hpp>
28 #include <boost/numeric/odeint/stepper/euler.hpp>
31 #include <boost/numeric/odeint/stepper/rosenbrock4_dense_output.hpp>
35 namespace BoostOdeintHelper {
44 typedef boost::numeric::odeint::runge_kutta_dopri5<fmatvec::Vec> RKDOPRI5Stepper;
45 typedef boost::numeric::odeint::controlled_runge_kutta<RKDOPRI5Stepper> ControlledRK;
46 typedef boost::numeric::odeint::dense_output_runge_kutta<ControlledRK> DOSRK;
52 typedef typename ControlledRK::stepper_category UnderlayingStepperCategory;
53 #if BOOST_VERSION >= 106000
54 RKDOPRI5(
double aTol,
double rTol,
double dtMax) :
55 DOSRK(ControlledRK(ControlledRK::error_checker_type(aTol, rTol), ControlledRK::step_adjuster_type(dtMax), RKDOPRI5Stepper())) {}
56 #else // boost odeint < 1.60 does not support dtMax
58 DOSRK(ControlledRK(ControlledRK::error_checker_type(aTol, rTol), RKDOPRI5Stepper())) {}
67 typedef boost::numeric::odeint::bulirsch_stoer_dense_out<fmatvec::Vec> DOSBS;
73 typedef boost::numeric::odeint::controlled_stepper_tag UnderlayingStepperCategory;
74 #if BOOST_VERSION >= 106000
75 BulirschStoer(
double aTol,
double rTol,
double dtMax) : DOSBS(aTol, rTol, 1.0, 1.0, dtMax) {}
77 BulirschStoer(
double aTol,
double rTol) : DOSBS(aTol, rTol) {}
85 typedef boost::numeric::odeint::euler<fmatvec::Vec> EulerStepper;
86 typedef boost::numeric::odeint::dense_output_runge_kutta<EulerStepper> DOSEuler;
92 typedef typename EulerStepper::stepper_category UnderlayingStepperCategory;
93 #if BOOST_VERSION >= 106000
94 Euler(
double aTol,
double rTol,
double dtMax) : DOSEuler() {}
95 #else // boost odeint < 1.60 does not support dtMax
96 Euler(
double aTol,
double rTol) : DOSEuler() {}
105 typedef boost::numeric::odeint::rosenbrock4<double> RB4;
106 typedef boost::numeric::odeint::rosenbrock4_controller<RB4> ControlledRB4;
107 typedef boost::numeric::odeint::rosenbrock4_dense_output<ControlledRB4> DOSRB4;
113 typedef typename ControlledRB4::stepper_category UnderlayingStepperCategory;
114 #if BOOST_VERSION >= 106000
115 Rosenbrock4(
double aTol,
double rTol,
double dtMax) : DOSRB4(ControlledRB4(aTol, rTol, dtMax)) {}
117 Rosenbrock4(
double aTol,
double rTol) : DOSRB4(ControlledRB4(aTol, rTol)) {}
Definition: boost_odeint_integrator_predef.h:89
Definition: boost_odeint_integrator_predef.h:110
Definition: boost_odeint_integrator.h:68
Definition: boost_odeint_integrator_predef.h:49
Definition: boost_odeint_integrator.h:66
Definition: boost_odeint_integrator.h:103
Definition: boost_odeint_integrator_predef.h:70