help-octave
[Top][All Lists]

## dassl

 From: John W. Eaton Subject: dassl Date: Fri, 19 Jun 1998 00:08:11 -0500 (CDT)

```On 18-Jun-1998, address@hidden <address@hidden> wrote:

| this is some question relating dassl. I've formulated a simple
| differential-algebraic problem. At a singularity, dassl crashes
| and leaves octave completely. So I end up with the following
| question:
|
| How can such a crashing be avoided? (Perhaps there is a bugfix

I posted a patch a few weeks ago that fixes this bug.  It's available
from http://www.che.wisc.edu/octave/mailing-lists/bug-octave/1998/243.

| Anyway, I tried to set the following hint from the handbook into operation:
|
| "The fifth argument {to dassl} is optional, and may be used to
| specify a set of times that the DAE solver should not integrate
| past. It is useful for avoiding difficulties with singularities and
| points where there is a discontinuity in the derivative."
|
| But I failed because I didn't find any example of how to specify
| a set of times that the DAE solver should not integrate past.

With the patch, your example doesn't crash Octave, but it still
fails.  However, I don't think the bug is in Octave.  With different
initial derivaties, it seems to work fine.  For example, both of the
following calls to dassl succeed (though the second is probably
better, since it forces dassl to restart at t == 8).

function res = f(x,xdot,t)
res(1) = xdot(1)-x(2);
res(2) = 16 - x(1) - sign(x(2)) * x(2) * x(2);
end

p = dassl ("f", [0;4], [0;0], t=linspace (0, 100)');
p = dassl ("f", [0;4], [0;0], t=linspace (0, 100)', 8);

jwe

```