[Top][All Lists]

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

Re: [Bug-gsl] Feature request for ODE integrators

From: Brian Gough
Subject: Re: [Bug-gsl] Feature request for ODE integrators
Date: Wed, 14 Jun 2006 17:52:42 +0100

Kostrun, Marijan writes:
 > The integrator works so that user supplies a double array which contains
 > the current result of integration.
 > However, when as the result of calculation in user supplied function NaN
 > occurs, some of the values in the double array become NaN's themselves,
 > the integrator reports an error code (or just keeps propagating NaN's
 > till the end of the integration time).
 > What I need is this: I want the integration to stop when NaN occurs, by
 > signaling appropriate error code (cannot continue or something similar),
 > and the current result of integration should contain the last valid
 > result of integration,
 > while the time pointer should contain respective time.


Thanks for your email.  It is possible to return a non-zero return
value from the user-supplied function to back out of the current step
(since gsl-1.6).  See the documentation for gsl_odeiv_step_apply for
details, and rhs_xsin and jac_xsin in odeinitval/test.c for examples
where a nan is generated and handled.

best regards,

Brian Gough
(GSL Maintainer)

Network Theory Ltd,
Commercial support for GSL --- http://www.network-theory.com/gsl/

reply via email to

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