comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » how to stop integration in IMSL_ODE ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
how to stop integration in IMSL_ODE ? [message #73493] Thu, 11 November 2010 07:05
christophe petit is currently offline  christophe petit
Messages: 1
Registered: November 2010
Junior Member
Good morning,

i have a problem using the IMSL_ODE routine. I would like this routine
to stop to integrate when the solution y(t) becomes negative. For the
moment, i can't make it to stop and after reaching the last positve
solution step, i have got the following error :

"IMSL Error: IMSL_ODE: Fatal error: MATH_REPEATED_ERR_TEST_FAILURE:
After
some initial success, the integration was halted by repeated error
test
failures."

I tried to use a catch block in this way :

...
CATCH, Error_status
if Error_status ne 0 then begin
CATCH, /CANCEL
PRINT, 'Error message: ', !ERROR_STATE.MSG
print, 'the integration is stopped '
plot, t, result(0,*)
return
ENDIF

result=IMSL_ODE(t,init,'f',hinit=1d-15,max_steps=n_max,toler ance=1d-15,/
double,method=1)

....

But at the execution, it says that it doesn't know "result" variable
when i call "plot, t, result(0,*)" in the catch block (to plot the
y(t) solution)

It seems that the "result" variable values are destroyed if the
IMSL_ODE routine encounters an error.

How can i make the routine to stop the integration and in the same
time, save the "result" values which have been processed before the
error ?

Thanks in advance.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Virtual Machine run-time error 5
Next Topic: Am I using FSC_colorbar correctly?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:47:59 PDT 2025

Total time taken to generate the page: 0.00380 seconds