generation_rosenbrock4.hpp 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. [auto_generated]
  3. boost/numeric/odeint/stepper/generation/generation_rosenbrock4.hpp
  4. [begin_description]
  5. Enable the factory functions for the controller and the dense output of the Rosenbrock4 method.
  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_ROSENBROCK4_HPP_INCLUDED
  14. #define BOOST_NUMERIC_ODEINT_STEPPER_GENERATION_GENERATION_ROSENBROCK4_HPP_INCLUDED
  15. #include <boost/numeric/odeint/stepper/rosenbrock4.hpp>
  16. #include <boost/numeric/odeint/stepper/rosenbrock4_controller.hpp>
  17. #include <boost/numeric/odeint/stepper/rosenbrock4_dense_output.hpp>
  18. namespace boost {
  19. namespace numeric {
  20. namespace odeint {
  21. template< class Value , class Coefficients , class Resize >
  22. struct get_controller< rosenbrock4< Value , Coefficients , Resize > >
  23. {
  24. typedef rosenbrock4< Value , Coefficients , Resize > stepper_type;
  25. typedef rosenbrock4_controller< stepper_type > type;
  26. };
  27. template< class Value , class Coefficients , class Resize >
  28. struct get_dense_output< rosenbrock4< Value , Coefficients , Resize > >
  29. {
  30. typedef rosenbrock4< Value , Coefficients , Resize > stepper_type;
  31. typedef rosenbrock4_controller< stepper_type > controller_type;
  32. typedef rosenbrock4_dense_output< controller_type > type;
  33. };
  34. // controller factory for controlled_runge_kutta
  35. template< class Stepper >
  36. struct dense_output_factory< Stepper , rosenbrock4_dense_output< rosenbrock4_controller< Stepper > > >
  37. {
  38. typedef Stepper stepper_type;
  39. typedef rosenbrock4_controller< stepper_type > controller_type;
  40. typedef typename stepper_type::value_type value_type;
  41. typedef typename stepper_type::time_type time_type;
  42. typedef rosenbrock4_dense_output< controller_type > dense_output_type;
  43. dense_output_type operator()( value_type abs_error , value_type rel_error , const stepper_type &stepper )
  44. {
  45. return dense_output_type( controller_type( abs_error , rel_error , stepper ) );
  46. }
  47. dense_output_type operator()( value_type abs_error , value_type rel_error ,
  48. time_type max_dt, const stepper_type &stepper )
  49. {
  50. return dense_output_type( controller_type( abs_error , rel_error , max_dt , stepper ) );
  51. }
  52. };
  53. } // odeint
  54. } // numeric
  55. } // boost
  56. #endif // BOOST_NUMERIC_ODEINT_STEPPER_GENERATION_GENERATION_ROSENBROCK4_HPP_INCLUDED