1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
<html lang="en">
<head>
<title>Evolution - GNU Scientific Library -- Reference Manual</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="GNU Scientific Library -- Reference Manual">
<meta name="generator" content="makeinfo 4.8">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Ordinary-Differential-Equations.html" title="Ordinary Differential Equations">
<link rel="prev" href="Adaptive-Step_002dsize-Control.html" title="Adaptive Step-size Control">
<link rel="next" href="ODE-Example-programs.html" title="ODE Example programs">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 The GSL Team.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``GNU General Public License'' and ``Free Software
Needs Free Documentation'', the Front-Cover text being ``A GNU Manual'',
and with the Back-Cover Text being (a) (see below). A copy of the
license is included in the section entitled ``GNU Free Documentation
License''.
(a) The Back-Cover Text is: ``You have freedom to copy and modify this
GNU Manual, like GNU software.''-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="Evolution"></a>
Next: <a rel="next" accesskey="n" href="ODE-Example-programs.html">ODE Example programs</a>,
Previous: <a rel="previous" accesskey="p" href="Adaptive-Step_002dsize-Control.html">Adaptive Step-size Control</a>,
Up: <a rel="up" accesskey="u" href="Ordinary-Differential-Equations.html">Ordinary Differential Equations</a>
<hr>
</div>
<h3 class="section">25.4 Evolution</h3>
<p>The highest level of the system is the evolution function which combines
the results of a stepping function and control function to reliably
advance the solution forward over an interval (t_0, t_1). If the
control function signals that the step-size should be decreased the
evolution function backs out of the current step and tries the proposed
smaller step-size. This process is continued until an acceptable
step-size is found.
<div class="defun">
— Function: gsl_odeiv_evolve * <b>gsl_odeiv_evolve_alloc</b> (<var>size_t dim</var>)<var><a name="index-gsl_005fodeiv_005fevolve_005falloc-2072"></a></var><br>
<blockquote><p>This function returns a pointer to a newly allocated instance of an
evolution function for a system of <var>dim</var> dimensions.
</p></blockquote></div>
<div class="defun">
— Function: int <b>gsl_odeiv_evolve_apply</b> (<var>gsl_odeiv_evolve * e, gsl_odeiv_control * con, gsl_odeiv_step * step, const gsl_odeiv_system * dydt, double * t, double t1, double * h, double y</var>[])<var><a name="index-gsl_005fodeiv_005fevolve_005fapply-2073"></a></var><br>
<blockquote><p>This function advances the system (<var>e</var>, <var>dydt</var>) from time
<var>t</var> and position <var>y</var> using the stepping function <var>step</var>.
The new time and position are stored in <var>t</var> and <var>y</var> on output.
The initial step-size is taken as <var>h</var>, but this will be modified
using the control function <var>c</var> to achieve the appropriate error
bound if necessary. The routine may make several calls to <var>step</var> in
order to determine the optimum step-size. An estimate of
the local error for the step can be obtained from the components of the array <var>e</var><code>->yerr[]</code>.
If the step-size has been changed the value of <var>h</var> will be modified on output.
The maximum time <var>t1</var> is guaranteed not to be exceeded by the time-step. On the
final time-step the value of <var>t</var> will be set to <var>t1</var> exactly.
<p>If the user-supplied functions defined in the system <var>dydt</var> return a
status other than <code>GSL_SUCCESS</code> the step will be aborted. In this
case, <var>t</var> and <var>y</var> will be restored to their pre-step values
and the error code from the user-supplied function will be returned. To
distinguish between error codes from the user-supplied functions and
those from <code>gsl_odeiv_evolve_apply</code> itself, any user-defined return
values should be distinct from the standard GSL error codes.
</p></blockquote></div>
<div class="defun">
— Function: int <b>gsl_odeiv_evolve_reset</b> (<var>gsl_odeiv_evolve * e</var>)<var><a name="index-gsl_005fodeiv_005fevolve_005freset-2074"></a></var><br>
<blockquote><p>This function resets the evolution function <var>e</var>. It should be used
whenever the next use of <var>e</var> will not be a continuation of a
previous step.
</p></blockquote></div>
<div class="defun">
— Function: void <b>gsl_odeiv_evolve_free</b> (<var>gsl_odeiv_evolve * e</var>)<var><a name="index-gsl_005fodeiv_005fevolve_005ffree-2075"></a></var><br>
<blockquote><p>This function frees all the memory associated with the evolution function
<var>e</var>.
</p></blockquote></div>
<hr>The GNU Scientific Library - a free numerical library licensed under the GNU GPL<br>Back to the <a href="/software/gsl/">GNU Scientific Library Homepage</a></body></html>
|