This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
something about ODE
- From: Cheng Xing <cx101 at ohm dot york dot ac dot uk>
- To: gsl-discuss at sources dot redhat dot com
- Date: Mon, 31 May 2004 13:02:35 +0100
- Subject: something about ODE
Hey guys,
I am facing a problem when solving ODE set, so asking your opinions.
I tried to change all negative y[i] in my equations to 1.0e-13 during
the calculation by adding the following sentance to detece negetive y[i]
in the function func()
if (y[i]<0.0) return 1000;
and following in the function main() to change them to 1.0e-13
if (statue != GSL_SUCCESS) y[i] = 1.0e-13;
However, it doesn't work. Negative values can be detected but were never
changed. Can anybody help?
Cheers
Cheng