odeint_error.hpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. [auto_generated]
  3. boost/numeric/odeint/util/odeint_error.hpp
  4. [begin_description]
  5. Runtime Exceptions thrown by odeint
  6. [end_description]
  7. Copyright 2015 Mario Mulansky
  8. Distributed under the Boost Software License, Version 1.0.
  9. (See accompanying file LICENSE_1_0.txt or
  10. copy at http://www.boost.org/LICENSE_1_0.txt)
  11. */
  12. #ifndef BOOST_NUMERIC_ODEINT_UTIL_ODEINT_ERROR_HPP_INCLUDED
  13. #define BOOST_NUMERIC_ODEINT_UTIL_ODEINT_ERROR_HPP_INCLUDED
  14. #include <stdexcept>
  15. #include <string>
  16. namespace boost {
  17. namespace numeric {
  18. namespace odeint {
  19. /**
  20. * \brief Runtime error thrown by odeint
  21. */
  22. class odeint_error : public std::runtime_error
  23. {
  24. public:
  25. odeint_error(const std::string &s)
  26. : std::runtime_error(s)
  27. { }
  28. };
  29. /**
  30. * \brief Runtime error thrown from integrate routines
  31. *
  32. * This Error occures when too many iterations are performed in between two
  33. * observer calls in the integrate routines.
  34. */
  35. class no_progress_error : public odeint_error
  36. {
  37. public:
  38. no_progress_error(const std::string &s)
  39. : odeint_error(s)
  40. { }
  41. };
  42. /**
  43. * \brief Runtime error thrown during stepsize adjustment
  44. *
  45. * This Error occures when too many iterations are performed without finding
  46. * an appropriate new step size. This usually indicates non-continuous points
  47. * in the ODE.
  48. */
  49. class step_adjustment_error : public odeint_error
  50. {
  51. public:
  52. step_adjustment_error(const std::string &s)
  53. : odeint_error(s)
  54. { }
  55. };
  56. }
  57. }
  58. }
  59. #endif // BOOST_NUMERIC_ODEINT_UTIL_ODEINT_ERROR_HPP_INCLUDED