[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with ODE solver

From: John W. Eaton
Subject: Re: Help with ODE solver
Date: Thu, 12 Sep 2002 01:41:47 -0500

On 12-Sep-2002, Michael Hanke <address@hidden> wrote:

| If I understand you correctly, the first property will defin itely not work. 
| There are two reasons for that:
| 1. The identity t==t_i will almost never be fulfilled because the integration 
| routine adapts the values where f is called according to your problem and 
| accuracy requirements. Even if it would take t_i theoretically, equality is 
| very unlikely to be fulfilled because of possible rounding errors. In short: 
| Never check floating point numbers for equatlity!
| 2. Changing state variables leads to a discontinuity in the right hand side 
| of your problem. This will lead to a breakdown of the control structures. 
| Most common, you will obtain stepsize underflow near t_i. You must give the 
| code a chance to reinitialize. This is only possible with the second approach.

Lsode allows you to specify points that the solver should not
integrate past, and Octave's interface to lsode allows you to specify
a vector of such points (the optional tcrit input).  The values in
tcrit do not have to coincide with the values in the vector of
requested output times.  So you should be able to set tcrit to the
vector of times at which your parameters change and let Octave and
lsode handle the rest of the details for you.


Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]