implicit_system.html 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  4. <title>Implicit System</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="../concepts.html" title="Concepts">
  9. <link rel="prev" href="simple_symplectic_system.html" title="Simple Symplectic System">
  10. <link rel="next" href="stepper.html" title="Stepper">
  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="simple_symplectic_system.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.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="stepper.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
  24. </div>
  25. <div class="section">
  26. <div class="titlepage"><div><div><h3 class="title">
  27. <a name="boost_numeric_odeint.concepts.implicit_system"></a><a class="link" href="implicit_system.html" title="Implicit System">Implicit
  28. System</a>
  29. </h3></div></div></div>
  30. <h5>
  31. <a name="boost_numeric_odeint.concepts.implicit_system.h0"></a>
  32. <span class="phrase"><a name="boost_numeric_odeint.concepts.implicit_system.description"></a></span><a class="link" href="implicit_system.html#boost_numeric_odeint.concepts.implicit_system.description">Description</a>
  33. </h5>
  34. <p>
  35. This concept describes how to define a ODE that can be solved by an implicit
  36. routine. Implicit routines need not only the function <span class="emphasis"><em>f(x,t)</em></span>
  37. but also the Jacobian <span class="emphasis"><em>df/dx = A(x,t)</em></span>. <span class="emphasis"><em>A</em></span>
  38. is a matrix and implicit routines need to solve the linear problem <span class="emphasis"><em>Ax
  39. = b</em></span>. In odeint this is implemented with use of <a href="http://www.boost.org/doc/libs/release/libs/numeric/ublas/index.html" target="_top">Boost.uBLAS</a>,
  40. therefore, the <span class="emphasis"><em>state_type</em></span> implicit routines is <span class="emphasis"><em>ublas::vector</em></span>
  41. and the matrix is defined as <span class="emphasis"><em>ublas::matrix</em></span>.
  42. </p>
  43. <h5>
  44. <a name="boost_numeric_odeint.concepts.implicit_system.h1"></a>
  45. <span class="phrase"><a name="boost_numeric_odeint.concepts.implicit_system.notation"></a></span><a class="link" href="implicit_system.html#boost_numeric_odeint.concepts.implicit_system.notation">Notation</a>
  46. </h5>
  47. <div class="variablelist">
  48. <p class="title"><b></b></p>
  49. <dl class="variablelist">
  50. <dt><span class="term"><code class="computeroutput"><span class="identifier">System</span></code></span></dt>
  51. <dd><p>
  52. A type that is a model of <code class="computeroutput"><span class="identifier">Implicit</span>
  53. <span class="identifier">System</span></code>
  54. </p></dd>
  55. <dt><span class="term"><code class="computeroutput"><span class="identifier">Time</span></code></span></dt>
  56. <dd><p>
  57. A type representing the time of the ODE
  58. </p></dd>
  59. <dt><span class="term"><code class="computeroutput"><span class="identifier">sys</span></code></span></dt>
  60. <dd><p>
  61. An object of type <code class="computeroutput"><span class="identifier">System</span></code>
  62. </p></dd>
  63. <dt><span class="term"><code class="computeroutput"><span class="identifier">x</span></code></span></dt>
  64. <dd><p>
  65. Object of type ublas::vector
  66. </p></dd>
  67. <dt><span class="term"><code class="computeroutput"><span class="identifier">dxdt</span></code></span></dt>
  68. <dd><p>
  69. Object of type ublas::vector
  70. </p></dd>
  71. <dt><span class="term"><code class="computeroutput"><span class="identifier">jacobi</span></code></span></dt>
  72. <dd><p>
  73. Object of type ublas::matrix
  74. </p></dd>
  75. <dt><span class="term"><code class="computeroutput"><span class="identifier">t</span></code></span></dt>
  76. <dd><p>
  77. Object of type <code class="computeroutput"><span class="identifier">Time</span></code>
  78. </p></dd>
  79. </dl>
  80. </div>
  81. <h5>
  82. <a name="boost_numeric_odeint.concepts.implicit_system.h2"></a>
  83. <span class="phrase"><a name="boost_numeric_odeint.concepts.implicit_system.valid_expressions"></a></span><a class="link" href="implicit_system.html#boost_numeric_odeint.concepts.implicit_system.valid_expressions">Valid
  84. Expressions</a>
  85. </h5>
  86. <div class="informaltable"><table class="table">
  87. <colgroup>
  88. <col>
  89. <col>
  90. <col>
  91. <col>
  92. </colgroup>
  93. <thead><tr>
  94. <th>
  95. <p>
  96. Name
  97. </p>
  98. </th>
  99. <th>
  100. <p>
  101. Expression
  102. </p>
  103. </th>
  104. <th>
  105. <p>
  106. Type
  107. </p>
  108. </th>
  109. <th>
  110. <p>
  111. Semantics
  112. </p>
  113. </th>
  114. </tr></thead>
  115. <tbody>
  116. <tr>
  117. <td>
  118. <p>
  119. Calculate <span class="emphasis"><em>dx/dt := f(x,t)</em></span>
  120. </p>
  121. </td>
  122. <td>
  123. <p>
  124. <code class="computeroutput"><span class="identifier">sys</span><span class="special">.</span><span class="identifier">first</span><span class="special">(</span>
  125. <span class="identifier">x</span> <span class="special">,</span>
  126. <span class="identifier">dxdt</span> <span class="special">,</span>
  127. <span class="identifier">t</span> <span class="special">)</span></code>
  128. </p>
  129. </td>
  130. <td>
  131. <p>
  132. <code class="computeroutput"><span class="keyword">void</span></code>
  133. </p>
  134. </td>
  135. <td>
  136. <p>
  137. Calculates <code class="computeroutput"><span class="identifier">f</span><span class="special">(</span><span class="identifier">x</span><span class="special">,</span><span class="identifier">t</span><span class="special">)</span></code>,
  138. the result is stored into dxdt
  139. </p>
  140. </td>
  141. </tr>
  142. <tr>
  143. <td>
  144. <p>
  145. Calculate <span class="emphasis"><em>A := df/dx (x,t)</em></span>
  146. </p>
  147. </td>
  148. <td>
  149. <p>
  150. <code class="computeroutput"><span class="identifier">sys</span><span class="special">.</span><span class="identifier">second</span><span class="special">(</span>
  151. <span class="identifier">x</span> <span class="special">,</span>
  152. <span class="identifier">jacobi</span> <span class="special">,</span>
  153. <span class="identifier">t</span> <span class="special">)</span></code>
  154. </p>
  155. </td>
  156. <td>
  157. <p>
  158. <code class="computeroutput"><span class="keyword">void</span></code>
  159. </p>
  160. </td>
  161. <td>
  162. <p>
  163. Calculates the Jacobian of <span class="emphasis"><em>f</em></span> at <span class="emphasis"><em>x</em></span>,<span class="emphasis"><em>t</em></span>,
  164. the result is stored into <code class="computeroutput"><span class="identifier">jacobi</span></code>
  165. </p>
  166. </td>
  167. </tr>
  168. </tbody>
  169. </table></div>
  170. </div>
  171. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  172. <td align="left"></td>
  173. <td align="right"><div class="copyright-footer">Copyright &#169; 2009-2015 Karsten Ahnert and Mario Mulansky<p>
  174. Distributed under the Boost Software License, Version 1.0. (See accompanying
  175. 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>)
  176. </p>
  177. </div></td>
  178. </tr></table>
  179. <hr>
  180. <div class="spirit-nav">
  181. <a accesskey="p" href="simple_symplectic_system.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.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="stepper.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
  182. </div>
  183. </body>
  184. </html>