3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Function template integrate</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 1. Boost.Numeric.Odeint">
8 <link rel="up" href="../../../header/boost/numeric/odeint/integrate/integrate_hpp.html" title="Header <boost/numeric/odeint/integrate/integrate.hpp>">
9 <link rel="prev" href="../../../header/boost/numeric/odeint/integrate/integrate_hpp.html" title="Header <boost/numeric/odeint/integrate/integrate.hpp>">
10 <link rel="next" href="integrat_idm45806991406512.html" title="Function template integrate">
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>
22 <div class="spirit-nav">
23 <a accesskey="p" href="../../../header/boost/numeric/odeint/integrate/integrate_hpp.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../header/boost/numeric/odeint/integrate/integrate_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="integrat_idm45806991406512.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
25 <div class="refentry">
26 <a name="boost.numeric.odeint.integrat_idm45806991427504"></a><div class="titlepage"></div>
27 <div class="refnamediv">
28 <h2><span class="refentrytitle">Function template integrate</span></h2>
29 <p>boost::numeric::odeint::integrate — Integrates the ODE. </p>
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: <<a class="link" href="../../../header/boost/numeric/odeint/integrate/integrate_hpp.html" title="Header <boost/numeric/odeint/integrate/integrate.hpp>">boost/numeric/odeint/integrate/integrate.hpp</a>>
35 <span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> System<span class="special">,</span> <span class="keyword">typename</span> State<span class="special">,</span> <span class="keyword">typename</span> Time<span class="special">,</span> <span class="keyword">typename</span> Observer<span class="special">></span>
36 <span class="identifier">boost</span><span class="special">::</span><span class="identifier">enable_if</span><span class="special"><</span> <span class="keyword">typename</span> <span class="identifier">has_value_type</span><span class="special"><</span> <span class="identifier">State</span> <span class="special">></span><span class="special">::</span><span class="identifier">type</span><span class="special">,</span> <span class="identifier">size_t</span> <span class="special">></span><span class="special">::</span><span class="identifier">type</span>
37 <span class="identifier">integrate</span><span class="special">(</span><span class="identifier">System</span> system<span class="special">,</span> <span class="identifier">State</span> <span class="special">&</span> start_state<span class="special">,</span> <span class="identifier">Time</span> start_time<span class="special">,</span>
38 <span class="identifier">Time</span> end_time<span class="special">,</span> <span class="identifier">Time</span> dt<span class="special">,</span> <span class="identifier">Observer</span> observer<span class="special">)</span><span class="special">;</span></pre></div>
39 <div class="refsect1">
40 <a name="idm46278829434464"></a><h2>Description</h2>
41 <p>Integrates the ODE given by system from start_time to end_time starting with start_state as initial condition and dt as initial time step. This function uses a dense output dopri5 stepper and performs an adaptive integration with step size control, thus dt changes during the integration. This method uses standard error bounds of 1E-6. After each step, the observer is called.</p>
42 <div class="note"><table border="0" summary="Note">
44 <td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../../../doc/src/images/note.png"></td>
45 <th align="left">Note</th>
47 <tr><td align="left" valign="top"><p>A second version of this function template exists which explicitly expects the value type as template parameter, i.e. integrate< double >( sys , x , t0 , t1 , dt , obs );</p></td></tr>
53 <div class="variablelist"><table border="0" class="variablelist compact">
55 <col align="left" valign="top">
60 <td><p><span class="term">Parameters:</span></p></td>
61 <td><div class="variablelist"><table border="0" class="variablelist compact">
63 <col align="left" valign="top">
68 <td><p><span class="term"><code class="computeroutput">dt</code></span></p></td>
69 <td><p>Initial step size, will be adjusted during the integration. </p></td>
72 <td><p><span class="term"><code class="computeroutput">end_time</code></span></p></td>
73 <td><p>End time of the integration. </p></td>
76 <td><p><span class="term"><code class="computeroutput">observer</code></span></p></td>
77 <td><p>Observer that will be called after each time step. </p></td>
80 <td><p><span class="term"><code class="computeroutput">start_state</code></span></p></td>
81 <td><p>The initial state. </p></td>
84 <td><p><span class="term"><code class="computeroutput">start_time</code></span></p></td>
85 <td><p>Start time of the integration. </p></td>
88 <td><p><span class="term"><code class="computeroutput">system</code></span></p></td>
89 <td><p>The system function to solve, hence the r.h.s. of the ordinary differential equation. </p></td>
95 <td><p><span class="term">Returns:</span></p></td>
96 <td><p>The number of steps performed. </p></td>
102 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
103 <td align="left"></td>
104 <td align="right"><div class="copyright-footer">Copyright © 2009-2015 Karsten Ahnert and Mario Mulansky<p>
105 Distributed under the Boost Software License, Version 1.0. (See accompanying
106 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>)
111 <div class="spirit-nav">
112 <a accesskey="p" href="../../../header/boost/numeric/odeint/integrate/integrate_hpp.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../header/boost/numeric/odeint/integrate/integrate_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="integrat_idm45806991406512.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>