2 boost/numeric/odeint/stepper/detail/pid_step_adjuster_coefficients.hpp
5 Coefficients for the PID stepsize controller.
8 Copyright 2017 Valentin Noah Hartmann
10 Distributed under the Boost Software License, Version 1.0.
11 (See accompanying file LICENSE_1_0.txt or
12 copy at http://www.boost.org/LICENSE_1_0.txt)
15 #ifndef BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_PID_STEP_ADJUSTER_COEFFICIENTS_HPP_INCLUDED
16 #define BOOST_NUMERIC_ODEINT_STEPPER_DETAIL_PID_STEP_ADJUSTER_COEFFICIENTS_HPP_INCLUDED
18 #include <boost/array.hpp>
38 class pid_step_adjuster_coefficients;
41 class pid_step_adjuster_coefficients<BASIC> : public boost::array<double, 5>
44 pid_step_adjuster_coefficients()
45 : boost::array<double, 5>()
56 class pid_step_adjuster_coefficients<H0211> : public boost::array<double, 5>
59 pid_step_adjuster_coefficients()
60 : boost::array<double, 5>()
62 (*this)[0] = 1.0 / 2.0;
63 (*this)[1] = 1.0 / 2.0;
65 (*this)[3] = 1.0 / 2.0;
71 class pid_step_adjuster_coefficients<H211b> : public boost::array<double, 5>
74 pid_step_adjuster_coefficients()
75 : boost::array<double, 5>()
77 (*this)[0] = 1.0 / 5.0;
78 (*this)[1] = 2.0 / 5.0;
80 (*this)[3] = 1.0 / 5.0;
86 class pid_step_adjuster_coefficients<H211PI> : public boost::array<double, 5>
89 pid_step_adjuster_coefficients()
90 : boost::array<double, 5>()
92 (*this)[0] = 1.0 / 6.0;
93 (*this)[1] = 2.0 / 6.0;
101 class pid_step_adjuster_coefficients<H0312> : public boost::array<double, 5>
104 pid_step_adjuster_coefficients()
105 : boost::array<double, 5>()
107 (*this)[0] = 1.0 / 4.0;
108 (*this)[1] = 2.0 / 2.0;
109 (*this)[2] = 1.0 / 4.0;
110 (*this)[3] = 3.0 / 4.0;
111 (*this)[4] = 1.0 / 4.0;
116 class pid_step_adjuster_coefficients<H312b> : public boost::array<double, 5>
119 pid_step_adjuster_coefficients()
120 : boost::array<double, 5>()
122 (*this)[0] = 1.0 / 6.0;
123 (*this)[1] = 2.0 / 6.0;
124 (*this)[2] = 1.0 / 6.0;
125 (*this)[3] = 3.0 / 6.0;
126 (*this)[4] = 1.0 / 6.0;
131 class pid_step_adjuster_coefficients<H312PID> : public boost::array<double, 5>
134 pid_step_adjuster_coefficients()
135 : boost::array<double, 5>()
137 (*this)[0] = 1.0 / 18.0;
138 (*this)[1] = 2.0 / 9.0;
139 (*this)[2] = 1.0 / 18.0;
146 class pid_step_adjuster_coefficients<H0321> : public boost::array<double, 5>
149 pid_step_adjuster_coefficients()
150 : boost::array<double, 5>()
152 (*this)[0] = 5.0 / 4.0;
153 (*this)[1] = 1.0 / 2.0;
154 (*this)[2] = -3.0 / 4.0;
155 (*this)[3] = -1.0 / 4.0;
156 (*this)[4] = -3.0 / 4.0;
161 class pid_step_adjuster_coefficients<H321> : public boost::array<double, 5>
164 pid_step_adjuster_coefficients()
165 : boost::array<double, 5>()
167 (*this)[0] = 1.0 / 3.0;
168 (*this)[1] = 1.0 / 18.0;
169 (*this)[2] = -5.0 / 18.0;
170 (*this)[3] = -5.0 / 16.0;
171 (*this)[4] = -1.0 / 6.0;