Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / numeric / odeint / doc / html / boost / numeric / odeint / runge_kutta_fehlberg78.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Class template runge_kutta_fehlberg78</title>
5 <link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
8 <link rel="up" href="../../../header/boost/numeric/odeint/stepper/runge_kutta_fehlberg78_hpp.html" title="Header &lt;boost/numeric/odeint/stepper/runge_kutta_fehlberg78.hpp&gt;">
9 <link rel="prev" href="../../../header/boost/numeric/odeint/stepper/runge_kutta_fehlberg78_hpp.html" title="Header &lt;boost/numeric/odeint/stepper/runge_kutta_fehlberg78.hpp&gt;">
10 <link rel="next" href="../../../header/boost/numeric/odeint/stepper/stepper_categories_hpp.html" title="Header &lt;boost/numeric/odeint/stepper/stepper_categories.hpp&gt;">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../logo.jpg"></td>
15 <td align="center"><a href="../../../../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="../../../header/boost/numeric/odeint/stepper/runge_kutta_fehlberg78_hpp.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../header/boost/numeric/odeint/stepper/runge_kutta_fehlberg78_hpp.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../header/boost/numeric/odeint/stepper/stepper_categories_hpp.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="refentry">
26 <a name="boost.numeric.odeint.runge_kutta_fehlberg78"></a><div class="titlepage"></div>
27 <div class="refnamediv">
28 <h2><span class="refentrytitle">Class template runge_kutta_fehlberg78</span></h2>
29 <p>boost::numeric::odeint::runge_kutta_fehlberg78 &#8212; The Runge-Kutta Fehlberg 78 method. </p>
30 </div>
31 <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
32 <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../../header/boost/numeric/odeint/stepper/runge_kutta_fehlberg78_hpp.html" title="Header &lt;boost/numeric/odeint/stepper/runge_kutta_fehlberg78.hpp&gt;">boost/numeric/odeint/stepper/runge_kutta_fehlberg78.hpp</a>&gt;
33
34 </span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> State<span class="special">,</span> <span class="keyword">typename</span> Value <span class="special">=</span> <span class="keyword">double</span><span class="special">,</span> <span class="keyword">typename</span> Deriv <span class="special">=</span> <span class="identifier">State</span><span class="special">,</span> 
35          <span class="keyword">typename</span> Time <span class="special">=</span> <span class="identifier">Value</span><span class="special">,</span> 
36          <span class="keyword">typename</span> Algebra <span class="special">=</span> <span class="keyword">typename</span> <span class="identifier">algebra_dispatcher</span><span class="special">&lt;</span> <span class="identifier">State</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">algebra_type</span><span class="special">,</span> 
37          <span class="keyword">typename</span> Operations <span class="special">=</span> <span class="keyword">typename</span> <span class="identifier">operations_dispatcher</span><span class="special">&lt;</span> <span class="identifier">State</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">operations_type</span><span class="special">,</span> 
38          <span class="keyword">typename</span> Resizer <span class="special">=</span> <span class="identifier">initially_resizer</span><span class="special">&gt;</span> 
39 <span class="keyword">class</span> <a class="link" href="runge_kutta_fehlberg78.html" title="Class template runge_kutta_fehlberg78">runge_kutta_fehlberg78</a> <span class="special">:</span> <span class="keyword">public</span> boost::numeric::odeint::explicit_error_generic_rk&lt; StageCount, Order, StepperOrder, ErrorOrder, State, Value, Deriv, Time, Algebra, Operations, Resizer &gt;
40 <span class="special">{</span>
41 <span class="keyword">public</span><span class="special">:</span>
42   <span class="comment">// types</span>
43   <span class="keyword">typedef</span> <span class="identifier">stepper_base_type</span><span class="special">::</span><span class="identifier">state_type</span>      <a name="boost.numeric.odeint.runge_kutta_fehlberg78.state_type"></a><span class="identifier">state_type</span><span class="special">;</span>     
44   <span class="keyword">typedef</span> <span class="identifier">stepper_base_type</span><span class="special">::</span><span class="identifier">value_type</span>      <a name="boost.numeric.odeint.runge_kutta_fehlberg78.value_type"></a><span class="identifier">value_type</span><span class="special">;</span>     
45   <span class="keyword">typedef</span> <span class="identifier">stepper_base_type</span><span class="special">::</span><span class="identifier">deriv_type</span>      <a name="boost.numeric.odeint.runge_kutta_fehlberg78.deriv_type"></a><span class="identifier">deriv_type</span><span class="special">;</span>     
46   <span class="keyword">typedef</span> <span class="identifier">stepper_base_type</span><span class="special">::</span><span class="identifier">time_type</span>       <a name="boost.numeric.odeint.runge_kutta_fehlberg78.time_type"></a><span class="identifier">time_type</span><span class="special">;</span>      
47   <span class="keyword">typedef</span> <span class="identifier">stepper_base_type</span><span class="special">::</span><span class="identifier">algebra_type</span>    <a name="boost.numeric.odeint.runge_kutta_fehlberg78.algebra_type"></a><span class="identifier">algebra_type</span><span class="special">;</span>   
48   <span class="keyword">typedef</span> <span class="identifier">stepper_base_type</span><span class="special">::</span><span class="identifier">operations_type</span> <a name="boost.numeric.odeint.runge_kutta_fehlberg78.operations_type"></a><span class="identifier">operations_type</span><span class="special">;</span>
49   <span class="keyword">typedef</span> <span class="identifier">stepper_base_type</span><span class="special">::</span><span class="identifier">resizer_type</span>    <a name="boost.numeric.odeint.runge_kutta_fehlberg78.resizer_type"></a><span class="identifier">resizer_type</span><span class="special">;</span>   
50
51   <span class="comment">// <a class="link" href="runge_kutta_fehlberg78.html#boost.numeric.odeint.runge_kutta_fehlberg78construct-copy-destruct">construct/copy/destruct</a></span>
52   <a class="link" href="runge_kutta_fehlberg78.html#idp32918720-bb"><span class="identifier">runge_kutta_fehlberg78</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">algebra_type</span> <span class="special">&amp;</span> <span class="special">=</span> <span class="identifier">algebra_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
53
54   <span class="comment">// <a class="link" href="runge_kutta_fehlberg78.html#idp32898128-bb">public member functions</a></span>
55   <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> System<span class="special">,</span> <span class="keyword">typename</span> StateIn<span class="special">,</span> <span class="keyword">typename</span> DerivIn<span class="special">,</span> 
56            <span class="keyword">typename</span> StateOut<span class="special">,</span> <span class="keyword">typename</span> Err<span class="special">&gt;</span> 
57     <span class="keyword">void</span> <a class="link" href="runge_kutta_fehlberg78.html#idp32898688-bb"><span class="identifier">do_step_impl</span></a><span class="special">(</span><span class="identifier">System</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">StateIn</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">DerivIn</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">time_type</span><span class="special">,</span> 
58                       <span class="identifier">StateOut</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">time_type</span><span class="special">,</span> <span class="identifier">Err</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
59   <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> System<span class="special">,</span> <span class="keyword">typename</span> StateIn<span class="special">,</span> <span class="keyword">typename</span> DerivIn<span class="special">,</span> 
60            <span class="keyword">typename</span> StateOut<span class="special">&gt;</span> 
61     <span class="keyword">void</span> <a class="link" href="runge_kutta_fehlberg78.html#idp32907440-bb"><span class="identifier">do_step_impl</span></a><span class="special">(</span><span class="identifier">System</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">StateIn</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">DerivIn</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">time_type</span><span class="special">,</span> 
62                       <span class="identifier">StateOut</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">time_type</span><span class="special">)</span><span class="special">;</span>
63   <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> StateIn<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="runge_kutta_fehlberg78.html#idp32914944-bb"><span class="identifier">adjust_size</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">StateIn</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
64 <span class="special">}</span><span class="special">;</span></pre></div>
65 <div class="refsect1">
66 <a name="idp115111824"></a><h2>Description</h2>
67 <p>The Runge-Kutta Fehlberg 78 method is a standard method for high-precision applications. The method is explicit and fulfills the Error Stepper concept. Step size control is provided but continuous output is not available for this method.</p>
68 <p>This class derives from explicit_error_stepper_base and inherits its interface via CRTP (current recurring template pattern). Furthermore, it derivs from <a class="link" href="explicit_error_generic_rk.html" title="Class template explicit_error_generic_rk">explicit_error_generic_rk</a> which is a generic Runge-Kutta algorithm with error estimation. For more details see explicit_error_stepper_base and <a class="link" href="explicit_error_generic_rk.html" title="Class template explicit_error_generic_rk">explicit_error_generic_rk</a>.</p>
69 <p>
70 </p>
71 <div class="refsect2">
72 <a name="idp115115392"></a><h3>Template Parameters</h3>
73 <div class="orderedlist"><ol class="orderedlist" type="1">
74 <li class="listitem">
75 <pre class="literallayout"><span class="keyword">typename</span> State</pre>
76 <p>The state type. </p>
77 </li>
78 <li class="listitem">
79 <pre class="literallayout"><span class="keyword">typename</span> Value <span class="special">=</span> <span class="keyword">double</span></pre>
80 <p>The value type. </p>
81 </li>
82 <li class="listitem">
83 <pre class="literallayout"><span class="keyword">typename</span> Deriv <span class="special">=</span> <span class="identifier">State</span></pre>
84 <p>The type representing the time derivative of the state. </p>
85 </li>
86 <li class="listitem">
87 <pre class="literallayout"><span class="keyword">typename</span> Time <span class="special">=</span> <span class="identifier">Value</span></pre>
88 <p>The time representing the independent variable - the time. </p>
89 </li>
90 <li class="listitem">
91 <pre class="literallayout"><span class="keyword">typename</span> Algebra <span class="special">=</span> <span class="keyword">typename</span> <span class="identifier">algebra_dispatcher</span><span class="special">&lt;</span> <span class="identifier">State</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">algebra_type</span></pre>
92 <p>The algebra type. </p>
93 </li>
94 <li class="listitem">
95 <pre class="literallayout"><span class="keyword">typename</span> Operations <span class="special">=</span> <span class="keyword">typename</span> <span class="identifier">operations_dispatcher</span><span class="special">&lt;</span> <span class="identifier">State</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">operations_type</span></pre>
96 <p>The operations type. </p>
97 </li>
98 <li class="listitem">
99 <pre class="literallayout"><span class="keyword">typename</span> Resizer <span class="special">=</span> <span class="identifier">initially_resizer</span></pre>
100 <p>The resizer policy type. </p>
101 </li>
102 </ol></div>
103 </div>
104 <div class="refsect2">
105 <a name="idp115145680"></a><h3>
106 <a name="boost.numeric.odeint.runge_kutta_fehlberg78construct-copy-destruct"></a><code class="computeroutput">runge_kutta_fehlberg78</code> 
107         public
108        construct/copy/destruct</h3>
109 <div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
110 <pre class="literallayout"><a name="idp32918720-bb"></a><span class="identifier">runge_kutta_fehlberg78</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">algebra_type</span> <span class="special">&amp;</span> algebra <span class="special">=</span> <span class="identifier">algebra_type</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre>Constructs the runge_kutta_cash_fehlberg78 class. This constructor can be used as a default constructor if the algebra has a default constructor. <p>
111 </p>
112 <div class="variablelist"><table border="0" class="variablelist compact">
113 <colgroup>
114 <col align="left" valign="top">
115 <col>
116 </colgroup>
117 <tbody><tr>
118 <td><p><span class="term">Parameters:</span></p></td>
119 <td><div class="variablelist"><table border="0" class="variablelist compact">
120 <colgroup>
121 <col align="left" valign="top">
122 <col>
123 </colgroup>
124 <tbody><tr>
125 <td><p><span class="term"><code class="computeroutput">algebra</code></span></p></td>
126 <td><p>A copy of algebra is made and stored inside explicit_stepper_base. </p></td>
127 </tr></tbody>
128 </table></div></td>
129 </tr></tbody>
130 </table></div>
131 </li></ol></div>
132 </div>
133 <div class="refsect2">
134 <a name="idp115159504"></a><h3>
135 <a name="idp32898128-bb"></a><code class="computeroutput">runge_kutta_fehlberg78</code> public member functions</h3>
136 <div class="orderedlist"><ol class="orderedlist" type="1">
137 <li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> System<span class="special">,</span> <span class="keyword">typename</span> StateIn<span class="special">,</span> <span class="keyword">typename</span> DerivIn<span class="special">,</span> 
138          <span class="keyword">typename</span> StateOut<span class="special">,</span> <span class="keyword">typename</span> Err<span class="special">&gt;</span> 
139   <span class="keyword">void</span> <a name="idp32898688-bb"></a><span class="identifier">do_step_impl</span><span class="special">(</span><span class="identifier">System</span> system<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">StateIn</span> <span class="special">&amp;</span> in<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">DerivIn</span> <span class="special">&amp;</span> dxdt<span class="special">,</span> 
140                     <span class="identifier">time_type</span> t<span class="special">,</span> <span class="identifier">StateOut</span> <span class="special">&amp;</span> out<span class="special">,</span> <span class="identifier">time_type</span> dt<span class="special">,</span> <span class="identifier">Err</span> <span class="special">&amp;</span> xerr<span class="special">)</span><span class="special">;</span></pre></li>
141 <li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> System<span class="special">,</span> <span class="keyword">typename</span> StateIn<span class="special">,</span> <span class="keyword">typename</span> DerivIn<span class="special">,</span> 
142          <span class="keyword">typename</span> StateOut<span class="special">&gt;</span> 
143   <span class="keyword">void</span> <a name="idp32907440-bb"></a><span class="identifier">do_step_impl</span><span class="special">(</span><span class="identifier">System</span> system<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">StateIn</span> <span class="special">&amp;</span> in<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">DerivIn</span> <span class="special">&amp;</span> dxdt<span class="special">,</span> 
144                     <span class="identifier">time_type</span> t<span class="special">,</span> <span class="identifier">StateOut</span> <span class="special">&amp;</span> out<span class="special">,</span> <span class="identifier">time_type</span> dt<span class="special">)</span><span class="special">;</span></pre></li>
145 <li class="listitem">
146 <pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> StateIn<span class="special">&gt;</span> <span class="keyword">void</span> <a name="idp32914944-bb"></a><span class="identifier">adjust_size</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">StateIn</span> <span class="special">&amp;</span> x<span class="special">)</span><span class="special">;</span></pre>Adjust the size of all temporaries in the stepper manually. <p>
147 </p>
148 <div class="variablelist"><table border="0" class="variablelist compact">
149 <colgroup>
150 <col align="left" valign="top">
151 <col>
152 </colgroup>
153 <tbody><tr>
154 <td><p><span class="term">Parameters:</span></p></td>
155 <td><div class="variablelist"><table border="0" class="variablelist compact">
156 <colgroup>
157 <col align="left" valign="top">
158 <col>
159 </colgroup>
160 <tbody><tr>
161 <td><p><span class="term"><code class="computeroutput">x</code></span></p></td>
162 <td><p>A state from which the size of the temporaries to be resized is deduced. </p></td>
163 </tr></tbody>
164 </table></div></td>
165 </tr></tbody>
166 </table></div>
167 </li>
168 </ol></div>
169 </div>
170 </div>
171 </div>
172 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
173 <td align="left"></td>
174 <td align="right"><div class="copyright-footer">Copyright &#169; 2009-2012 Karsten
175       Ahnert and Mario Mulansky<p>
176         Distributed under the Boost Software License, Version 1.0. (See accompanying
177         file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
178       </p>
179 </div></td>
180 </tr></table>
181 <hr>
182 <div class="spirit-nav">
183 <a accesskey="p" href="../../../header/boost/numeric/odeint/stepper/runge_kutta_fehlberg78_hpp.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../header/boost/numeric/odeint/stepper/runge_kutta_fehlberg78_hpp.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../../../header/boost/numeric/odeint/stepper/stepper_categories_hpp.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
184 </div>
185 </body>
186 </html>