This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]