generation_dense_output_runge_kutta.hpp 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. [auto_generated]
  3. boost/numeric/odeint/stepper/generation/generation_dense_output_runge_kutta.hpp
  4. [begin_description]
  5. Specialization of the controller factory for the dense_output_runge_kutta class.
  6. [end_description]
  7. Copyright 2011-2012 Karsten Ahnert
  8. Copyright 2011-2012 Mario Mulansky
  9. Distributed under the Boost Software License, Version 1.0.
  10. (See accompanying file LICENSE_1_0.txt or
  11. copy at http://www.boost.org/LICENSE_1_0.txt)
  12. */
  13. #ifndef BOOST_NUMERIC_ODEINT_STEPPER_GENERATION_GENERATION_DENSE_OUTPUT_RUNGE_KUTTA_HPP_INCLUDED
  14. #define BOOST_NUMERIC_ODEINT_STEPPER_GENERATION_GENERATION_DENSE_OUTPUT_RUNGE_KUTTA_HPP_INCLUDED
  15. #include <boost/numeric/odeint/stepper/controlled_runge_kutta.hpp>
  16. #include <boost/numeric/odeint/stepper/dense_output_runge_kutta.hpp>
  17. #include <boost/numeric/odeint/stepper/generation/make_dense_output.hpp>
  18. namespace boost {
  19. namespace numeric {
  20. namespace odeint {
  21. // controller factory for controlled_runge_kutta
  22. template< class Stepper >
  23. struct dense_output_factory< Stepper , dense_output_runge_kutta< controlled_runge_kutta< Stepper > > >
  24. {
  25. typedef Stepper stepper_type;
  26. typedef controlled_runge_kutta< stepper_type > controller_type;
  27. typedef typename controller_type::error_checker_type error_checker_type;
  28. typedef typename controller_type::step_adjuster_type step_adjuster_type;
  29. typedef typename stepper_type::value_type value_type;
  30. typedef typename stepper_type::time_type time_type;
  31. typedef dense_output_runge_kutta< controller_type > dense_output_type;
  32. dense_output_type operator()( value_type abs_error , value_type rel_error , const stepper_type &stepper )
  33. {
  34. return dense_output_type( controller_type( error_checker_type( abs_error , rel_error ) ,
  35. step_adjuster_type() , stepper ) );
  36. }
  37. dense_output_type operator()( value_type abs_error , value_type rel_error ,
  38. time_type max_dt , const stepper_type &stepper )
  39. {
  40. return dense_output_type(
  41. controller_type( error_checker_type( abs_error , rel_error) ,
  42. step_adjuster_type( max_dt ) , stepper ) );
  43. }
  44. };
  45. } // odeint
  46. } // numeric
  47. } // boost
  48. #endif // BOOST_NUMERIC_ODEINT_STEPPER_GENERATION_GENERATION_DENSE_OUTPUT_RUNGE_KUTTA_HPP_INCLUDED