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.
Hello, 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/ _______________________________________________ Bug-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-gsl
