UNPKG

cacatoo

Version:

Building, exploring, and sharing spatially structured models

584 lines (154 loc) 7.13 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: ODE</title> <link rel="icon" type="image/png" href="images/favicon.png" /> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <script src="scripts/jquery.js"></script> <script> $(function(){ $("#Navigator").load("navigator.html"); }); </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Class: ODE</h1> <section> <header> <h2><span class="attribs"><span class="type-signature"></span></span>ODE<span class="signature">(eq, state_vector, pars, diff_rates, ode_name)</span><span class="type-signature"></span></h2> <div class="class-description">The ODE class is used to call the odex.js library and numerically solve ODEs</div> </header> <article> <div class="container-overview"> <h2>Constructor</h2> <h4 class="name" id="ODE"><span class="type-signature"></span>new ODE<span class="signature">(eq, state_vector, pars, diff_rates, ode_name)</span><span class="type-signature"></span></h4> <div class="description"> The constructor function for a @ODE object. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>eq</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">Function that describes the ODE (see examples starting with ode)</td> </tr> <tr> <td class="name"><code>state_vector</code></td> <td class="type"> <span class="param-type">Array</span> </td> <td class="description last">Initial state vector</td> </tr> <tr> <td class="name"><code>pars</code></td> <td class="type"> <span class="param-type">Array</span> </td> <td class="description last">Array of parameters for the ODEs</td> </tr> <tr> <td class="name"><code>diff_rates</code></td> <td class="type"> <span class="param-type">Array</span> </td> <td class="description last">Array of rates at which each state diffuses to neighbouring grid point (Has to be less than 0.25!)</td> </tr> <tr> <td class="name"><code>ode_name</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">Name of this ODE</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="cacatoo.js.html">cacatoo.js</a>, <a href="cacatoo.js.html#line124">line 124</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="print_state"><span class="type-signature"></span>print_state<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> Prints the current state to the console </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="cacatoo.js.html">cacatoo.js</a>, <a href="cacatoo.js.html#line162">line 162</a> </li></ul></dd> </dl> <h4 class="name" id="solveTimestep"><span class="type-signature"></span>solveTimestep<span class="signature">(delta_t, opt_pos)</span><span class="type-signature"></span></h4> <div class="description"> Numerically solve the ODE </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>delta_t</code></td> <td class="type"> <span class="param-type">float</span> </td> <td class="default"> 0.1 </td> <td class="description last">Step size</td> </tr> <tr> <td class="name"><code>opt_pos</code></td> <td class="type"> <span class="param-type">bool</span> </td> <td class="default"> </td> <td class="description last">When enabled, negative values are set to 0 automatically</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="cacatoo.js.html">cacatoo.js</a>, <a href="cacatoo.js.html#line148">line 148</a> </li></ul></dd> </dl> </article> </section> </div> <div id="Navigator"></div> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Wed Jul 28 2021 15:33:33 GMT+0200 (Central European Summer Time) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>