something about ODE

Cheng Xing cx101@ohm.york.ac.uk
Mon May 31 12:01:00 GMT 2004


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



More information about the Gsl-discuss mailing list