Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / numeric / odeint / doc / html / boost / numeric / odeint / explicit_error_generic_rk.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Class template explicit_error_generic_rk</title>
5 <link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.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/explicit_error_generic_rk_hpp.html" title="Header &lt;boost/numeric/odeint/stepper/explicit_error_generic_rk.hpp&gt;">
9 <link rel="prev" href="../../../header/boost/numeric/odeint/stepper/explicit_error_generic_rk_hpp.html" title="Header &lt;boost/numeric/odeint/stepper/explicit_error_generic_rk.hpp&gt;">
10 <link rel="next" href="../../../header/boost/numeric/odeint/stepper/explicit_generic_rk_hpp.html" title="Header &lt;boost/numeric/odeint/stepper/explicit_generic_rk.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/explicit_error_generic_rk_hpp.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../header/boost/numeric/odeint/stepper/explicit_error_generic_rk_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/explicit_generic_rk_hpp.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="refentry">
26 <a name="boost.numeric.odeint.explicit_error_generic_rk"></a><div class="titlepage"></div>
27 <div class="refnamediv">
28 <h2><span class="refentrytitle">Class template explicit_error_generic_rk</span></h2>
29 <p>boost::numeric::odeint::explicit_error_generic_rk &#8212; A generic implementation of explicit Runge-Kutta algorithms with error estimation. This class is as a base class for all explicit Runge-Kutta steppers with error estimation. </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/explicit_error_generic_rk_hpp.html" title="Header &lt;boost/numeric/odeint/stepper/explicit_error_generic_rk.hpp&gt;">boost/numeric/odeint/stepper/explicit_error_generic_rk.hpp</a>&gt;
33
34 </span><span class="keyword">template</span><span class="special">&lt;</span><span class="identifier">size_t</span> StageCount<span class="special">,</span> <span class="identifier">size_t</span> Order<span class="special">,</span> <span class="identifier">size_t</span> StepperOrder<span class="special">,</span> 
35          <span class="identifier">size_t</span> ErrorOrder<span class="special">,</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> 
36          <span class="keyword">typename</span> Deriv <span class="special">=</span> <span class="identifier">State</span><span class="special">,</span> <span class="keyword">typename</span> Time <span class="special">=</span> <span class="identifier">Value</span><span class="special">,</span> 
37          <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> 
38          <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> 
39          <span class="keyword">typename</span> Resizer <span class="special">=</span> <span class="identifier">initially_resizer</span><span class="special">&gt;</span> 
40 <span class="keyword">class</span> <a class="link" href="explicit_error_generic_rk.html" title="Class template explicit_error_generic_rk">explicit_error_generic_rk</a> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">explicit_error_stepper_base</span> <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">explicit_stepper_base</span><span class="special">&lt;</span> <span class="special">...</span> <span class="special">&gt;</span>          <a name="boost.numeric.odeint.explicit_error_generic_rk.stepper_base_type"></a><span class="identifier">stepper_base_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">state_type</span>         <a name="boost.numeric.odeint.explicit_error_generic_rk.state_type"></a><span class="identifier">state_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">wrapped_state_type</span> <a name="boost.numeric.odeint.explicit_error_generic_rk.wrapped_state_type"></a><span class="identifier">wrapped_state_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">value_type</span>         <a name="boost.numeric.odeint.explicit_error_generic_rk.value_type"></a><span class="identifier">value_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">deriv_type</span>         <a name="boost.numeric.odeint.explicit_error_generic_rk.deriv_type"></a><span class="identifier">deriv_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">wrapped_deriv_type</span> <a name="boost.numeric.odeint.explicit_error_generic_rk.wrapped_deriv_type"></a><span class="identifier">wrapped_deriv_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">time_type</span>          <a name="boost.numeric.odeint.explicit_error_generic_rk.time_type"></a><span class="identifier">time_type</span><span class="special">;</span>         
50   <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.explicit_error_generic_rk.algebra_type"></a><span class="identifier">algebra_type</span><span class="special">;</span>      
51   <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.explicit_error_generic_rk.operations_type"></a><span class="identifier">operations_type</span><span class="special">;</span>   
52   <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.explicit_error_generic_rk.resizer_type"></a><span class="identifier">resizer_type</span><span class="special">;</span>      
53   <span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span>                           <a name="boost.numeric.odeint.explicit_error_generic_rk.rk_algorithm_type"></a><span class="identifier">rk_algorithm_type</span><span class="special">;</span> 
54   <span class="keyword">typedef</span> <span class="identifier">rk_algorithm_type</span><span class="special">::</span><span class="identifier">coef_a_type</span>        <a name="boost.numeric.odeint.explicit_error_generic_rk.coef_a_type"></a><span class="identifier">coef_a_type</span><span class="special">;</span>       
55   <span class="keyword">typedef</span> <span class="identifier">rk_algorithm_type</span><span class="special">::</span><span class="identifier">coef_b_type</span>        <a name="boost.numeric.odeint.explicit_error_generic_rk.coef_b_type"></a><span class="identifier">coef_b_type</span><span class="special">;</span>       
56   <span class="keyword">typedef</span> <span class="identifier">rk_algorithm_type</span><span class="special">::</span><span class="identifier">coef_c_type</span>        <a name="boost.numeric.odeint.explicit_error_generic_rk.coef_c_type"></a><span class="identifier">coef_c_type</span><span class="special">;</span>       
57
58   <span class="comment">// <a class="link" href="explicit_error_generic_rk.html#boost.numeric.odeint.explicit_error_generic_rkconstruct-copy-destruct">construct/copy/destruct</a></span>
59   <a class="link" href="explicit_error_generic_rk.html#idm45853739344160-bb"><span class="identifier">explicit_error_generic_rk</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">coef_a_type</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">coef_b_type</span> <span class="special">&amp;</span><span class="special">,</span> 
60                             <span class="keyword">const</span> <span class="identifier">coef_b_type</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">coef_c_type</span> <span class="special">&amp;</span><span class="special">,</span> 
61                             <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>
62
63   <span class="comment">// <a class="link" href="explicit_error_generic_rk.html#idm45853739378240-bb">public member functions</a></span>
64   <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> 
65            <span class="keyword">typename</span> StateOut<span class="special">,</span> <span class="keyword">typename</span> Err<span class="special">&gt;</span> 
66     <span class="keyword">void</span> <a class="link" href="explicit_error_generic_rk.html#idm45853739377680-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> 
67                       <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>
68   <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> 
69            <span class="keyword">typename</span> StateOut<span class="special">&gt;</span> 
70     <span class="keyword">void</span> <a class="link" href="explicit_error_generic_rk.html#idm45853739361744-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> 
71                       <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>
72   <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="explicit_error_generic_rk.html#idm45853739347936-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>
73
74   <span class="comment">// <a class="link" href="explicit_error_generic_rk.html#idm45853739337024-bb">private member functions</a></span>
75   <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> StateIn<span class="special">&gt;</span> <span class="keyword">bool</span> <a class="link" href="explicit_error_generic_rk.html#idm45853739336448-bb"><span class="identifier">resize_impl</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>
76
77   <span class="comment">// public data members</span>
78   <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">size_t</span> <span class="identifier">stage_count</span><span class="special">;</span>
79 <span class="special">}</span><span class="special">;</span></pre></div>
80 <div class="refsect1">
81 <a name="idm45221359586928"></a><h2>Description</h2>
82 <p>This class implements the explicit Runge-Kutta algorithms with error estimation in a generic way. The Butcher tableau is passed to the stepper which constructs the stepper scheme with the help of a template-metaprogramming algorithm. ToDo : Add example!</p>
83 <p>This class derives explicit_error_stepper_base which provides the stepper interface.</p>
84 <p>
85 </p>
86 <div class="refsect2">
87 <a name="idm45221359585376"></a><h3>Template Parameters</h3>
88 <div class="orderedlist"><ol class="orderedlist" type="1">
89 <li class="listitem">
90 <pre class="literallayout"><span class="identifier">size_t</span> StageCount</pre>
91 <p>The number of stages of the Runge-Kutta algorithm. </p>
92 </li>
93 <li class="listitem">
94 <pre class="literallayout"><span class="identifier">size_t</span> Order</pre>
95 <p>The order of a stepper if the stepper is used without error estimation. </p>
96 </li>
97 <li class="listitem">
98 <pre class="literallayout"><span class="identifier">size_t</span> StepperOrder</pre>
99 <p>The order of a step if the stepper is used with error estimation. Usually Order and StepperOrder have the same value. </p>
100 </li>
101 <li class="listitem">
102 <pre class="literallayout"><span class="identifier">size_t</span> ErrorOrder</pre>
103 <p>The order of the error step if the stepper is used with error estimation. </p>
104 </li>
105 <li class="listitem">
106 <pre class="literallayout"><span class="keyword">typename</span> State</pre>
107 <p>The type representing the state of the ODE. </p>
108 </li>
109 <li class="listitem">
110 <pre class="literallayout"><span class="keyword">typename</span> Value <span class="special">=</span> <span class="keyword">double</span></pre>
111 <p>The floating point type which is used in the computations. </p>
112 </li>
113 <li class="listitem"><pre class="literallayout"><span class="keyword">typename</span> Deriv <span class="special">=</span> <span class="identifier">State</span></pre></li>
114 <li class="listitem">
115 <pre class="literallayout"><span class="keyword">typename</span> Time <span class="special">=</span> <span class="identifier">Value</span></pre>
116 <p>The type representing the independent variable - the time - of the ODE. </p>
117 </li>
118 <li class="listitem">
119 <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>
120 <p>The algebra type. </p>
121 </li>
122 <li class="listitem">
123 <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>
124 <p>The operations type. </p>
125 </li>
126 <li class="listitem">
127 <pre class="literallayout"><span class="keyword">typename</span> Resizer <span class="special">=</span> <span class="identifier">initially_resizer</span></pre>
128 <p>The resizer policy type. </p>
129 </li>
130 </ol></div>
131 </div>
132 <div class="refsect2">
133 <a name="idm45221359546928"></a><h3>
134 <a name="boost.numeric.odeint.explicit_error_generic_rkconstruct-copy-destruct"></a><code class="computeroutput">explicit_error_generic_rk</code> 
135         public
136        construct/copy/destruct</h3>
137 <div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
138 <pre class="literallayout"><a name="idm45853739344160-bb"></a><span class="identifier">explicit_error_generic_rk</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">coef_a_type</span> <span class="special">&amp;</span> a<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">coef_b_type</span> <span class="special">&amp;</span> b<span class="special">,</span> 
139                           <span class="keyword">const</span> <span class="identifier">coef_b_type</span> <span class="special">&amp;</span> b2<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">coef_c_type</span> <span class="special">&amp;</span> c<span class="special">,</span> 
140                           <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 explicit_error_generik_rk class with the given parameters a, b, b2 and c. See examples section for details on the coefficients. <p>
141 </p>
142 <div class="variablelist"><table border="0" class="variablelist compact">
143 <colgroup>
144 <col align="left" valign="top">
145 <col>
146 </colgroup>
147 <tbody><tr>
148 <td><p><span class="term">Parameters:</span></p></td>
149 <td><div class="variablelist"><table border="0" class="variablelist compact">
150 <colgroup>
151 <col align="left" valign="top">
152 <col>
153 </colgroup>
154 <tbody>
155 <tr>
156 <td><p><span class="term"><code class="computeroutput">a</code></span></p></td>
157 <td><p>Triangular matrix of parameters b in the Butcher tableau. </p></td>
158 </tr>
159 <tr>
160 <td><p><span class="term"><code class="computeroutput">algebra</code></span></p></td>
161 <td><p>A copy of algebra is made and stored inside explicit_stepper_base. </p></td>
162 </tr>
163 <tr>
164 <td><p><span class="term"><code class="computeroutput">b</code></span></p></td>
165 <td><p>Last row of the butcher tableau. </p></td>
166 </tr>
167 <tr>
168 <td><p><span class="term"><code class="computeroutput">b2</code></span></p></td>
169 <td><p>Parameters for lower-order evaluation to estimate the error. </p></td>
170 </tr>
171 <tr>
172 <td><p><span class="term"><code class="computeroutput">c</code></span></p></td>
173 <td><p>Parameters to calculate the time points in the Butcher tableau. </p></td>
174 </tr>
175 </tbody>
176 </table></div></td>
177 </tr></tbody>
178 </table></div>
179 </li></ol></div>
180 </div>
181 <div class="refsect2">
182 <a name="idm45221359517040"></a><h3>
183 <a name="idm45853739378240-bb"></a><code class="computeroutput">explicit_error_generic_rk</code> public member functions</h3>
184 <div class="orderedlist"><ol class="orderedlist" type="1">
185 <li class="listitem">
186 <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> 
187          <span class="keyword">typename</span> StateOut<span class="special">,</span> <span class="keyword">typename</span> Err<span class="special">&gt;</span> 
188   <span class="keyword">void</span> <a name="idm45853739377680-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> 
189                     <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>This method performs one step. The derivative <code class="computeroutput">dxdt</code> of <code class="computeroutput">in</code> at the time <code class="computeroutput">t</code> is passed to the method. The result is updated out-of-place, hence the input is in <code class="computeroutput">in</code> and the output in <code class="computeroutput">out</code>. Futhermore, an estimation of the error is stored in <code class="computeroutput">xerr</code>. <code class="computeroutput">do_step_impl</code> is used by explicit_error_stepper_base. <p>
190 </p>
191 <div class="variablelist"><table border="0" class="variablelist compact">
192 <colgroup>
193 <col align="left" valign="top">
194 <col>
195 </colgroup>
196 <tbody><tr>
197 <td><p><span class="term">Parameters:</span></p></td>
198 <td><div class="variablelist"><table border="0" class="variablelist compact">
199 <colgroup>
200 <col align="left" valign="top">
201 <col>
202 </colgroup>
203 <tbody>
204 <tr>
205 <td><p><span class="term"><code class="computeroutput">dt</code></span></p></td>
206 <td><p>The step size. </p></td>
207 </tr>
208 <tr>
209 <td><p><span class="term"><code class="computeroutput">dxdt</code></span></p></td>
210 <td><p>The derivative of x at t. </p></td>
211 </tr>
212 <tr>
213 <td><p><span class="term"><code class="computeroutput">in</code></span></p></td>
214 <td><p>The state of the ODE which should be solved. in is not modified in this method </p></td>
215 </tr>
216 <tr>
217 <td><p><span class="term"><code class="computeroutput">out</code></span></p></td>
218 <td><p>The result of the step is written in out. </p></td>
219 </tr>
220 <tr>
221 <td><p><span class="term"><code class="computeroutput">system</code></span></p></td>
222 <td><p>The system function to solve, hence the r.h.s. of the ODE. It must fulfill the Simple System concept. </p></td>
223 </tr>
224 <tr>
225 <td><p><span class="term"><code class="computeroutput">t</code></span></p></td>
226 <td><p>The value of the time, at which the step should be performed. </p></td>
227 </tr>
228 <tr>
229 <td><p><span class="term"><code class="computeroutput">xerr</code></span></p></td>
230 <td><p>The result of the error estimation is written in xerr. </p></td>
231 </tr>
232 </tbody>
233 </table></div></td>
234 </tr></tbody>
235 </table></div>
236 </li>
237 <li class="listitem">
238 <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> 
239          <span class="keyword">typename</span> StateOut<span class="special">&gt;</span> 
240   <span class="keyword">void</span> <a name="idm45853739361744-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> 
241                     <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>This method performs one step. The derivative <code class="computeroutput">dxdt</code> of <code class="computeroutput">in</code> at the time <code class="computeroutput">t</code> is passed to the method. The result is updated out-of-place, hence the input is in <code class="computeroutput">in</code> and the output in <code class="computeroutput">out</code>. Access to this step functionality is provided by explicit_stepper_base and <code class="computeroutput">do_step_impl</code> should not be called directly. <p>
242 </p>
243 <div class="variablelist"><table border="0" class="variablelist compact">
244 <colgroup>
245 <col align="left" valign="top">
246 <col>
247 </colgroup>
248 <tbody><tr>
249 <td><p><span class="term">Parameters:</span></p></td>
250 <td><div class="variablelist"><table border="0" class="variablelist compact">
251 <colgroup>
252 <col align="left" valign="top">
253 <col>
254 </colgroup>
255 <tbody>
256 <tr>
257 <td><p><span class="term"><code class="computeroutput">dt</code></span></p></td>
258 <td><p>The step size. </p></td>
259 </tr>
260 <tr>
261 <td><p><span class="term"><code class="computeroutput">dxdt</code></span></p></td>
262 <td><p>The derivative of x at t. </p></td>
263 </tr>
264 <tr>
265 <td><p><span class="term"><code class="computeroutput">in</code></span></p></td>
266 <td><p>The state of the ODE which should be solved. in is not modified in this method </p></td>
267 </tr>
268 <tr>
269 <td><p><span class="term"><code class="computeroutput">out</code></span></p></td>
270 <td><p>The result of the step is written in out. </p></td>
271 </tr>
272 <tr>
273 <td><p><span class="term"><code class="computeroutput">system</code></span></p></td>
274 <td><p>The system function to solve, hence the r.h.s. of the ODE. It must fulfill the Simple System concept. </p></td>
275 </tr>
276 <tr>
277 <td><p><span class="term"><code class="computeroutput">t</code></span></p></td>
278 <td><p>The value of the time, at which the step should be performed. </p></td>
279 </tr>
280 </tbody>
281 </table></div></td>
282 </tr></tbody>
283 </table></div>
284 </li>
285 <li class="listitem">
286 <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="idm45853739347936-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>
287 </p>
288 <div class="variablelist"><table border="0" class="variablelist compact">
289 <colgroup>
290 <col align="left" valign="top">
291 <col>
292 </colgroup>
293 <tbody><tr>
294 <td><p><span class="term">Parameters:</span></p></td>
295 <td><div class="variablelist"><table border="0" class="variablelist compact">
296 <colgroup>
297 <col align="left" valign="top">
298 <col>
299 </colgroup>
300 <tbody><tr>
301 <td><p><span class="term"><code class="computeroutput">x</code></span></p></td>
302 <td><p>A state from which the size of the temporaries to be resized is deduced. </p></td>
303 </tr></tbody>
304 </table></div></td>
305 </tr></tbody>
306 </table></div>
307 </li>
308 </ol></div>
309 </div>
310 <div class="refsect2">
311 <a name="idm45221359425264"></a><h3>
312 <a name="idm45853739337024-bb"></a><code class="computeroutput">explicit_error_generic_rk</code> private member functions</h3>
313 <div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><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">bool</span> <a name="idm45853739336448-bb"></a><span class="identifier">resize_impl</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></li></ol></div>
314 </div>
315 </div>
316 </div>
317 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
318 <td align="left"></td>
319 <td align="right"><div class="copyright-footer">Copyright &#169; 2009-2015 Karsten Ahnert and Mario Mulansky<p>
320         Distributed under the Boost Software License, Version 1.0. (See accompanying
321         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>)
322       </p>
323 </div></td>
324 </tr></table>
325 <hr>
326 <div class="spirit-nav">
327 <a accesskey="p" href="../../../header/boost/numeric/odeint/stepper/explicit_error_generic_rk_hpp.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../header/boost/numeric/odeint/stepper/explicit_error_generic_rk_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/explicit_generic_rk_hpp.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
328 </div>
329 </body>
330 </html>