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