Re: LSODE status=-1 [message #82877 is a reply to message #82876] |
Mon, 21 January 2013 13:17   |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On Monday, January 21, 2013 2:48:08 PM UTC-5, hal...@yahoo.com wrote:
> On Monday, January 21, 2013 2:28:54 PM UTC-5, Craig Markwardt wrote:
>
>> If you call LSODE with the exact same inputs, I don't think it's a surprise that you get the exact same results.
>
>>
>
>>
>
>>
>
>> My suggestion: Instead of calling LSODE with the exact same inputs, move on to the next desired integration interval. A status value of -1 indicates "success with some difficulty" which means you should just carry onwards.
>
>>
>
>>
>
>>
>
>> Also, you might consider trying my DDEABM integrator:
>
>>
>
>> http://www.physics.wisc.edu/~craigm/idl/math.html#DDEABM
>
>>
>
>> I can't guarantee it will work any better, but it might.
>
>>
>
>>
>
>>
>
>> Craig
>
>
>
> Thanks for the reply. The thing is, I have found that the results are unreliable when status=-1. The wording of the IDL help page makes me think that the computation was interrupted at an incomplete stage and can be resumed somehow. The help page for LSODE says that if you set the input status to 2 then that means "This is not the first call. The calculation is to continue normally." I am setting the input status to 2 after it comes back as -1. If you set the status to 1 then it means "initializations will occur."
I don't think it means what you think it means. My understanding is that STATUS=-1 means the routine things it completed with a reliable answer, but it was expensive. You can proceed to the next interval if you wish. If your judgement tells you the result is unreliable, then you probably have to restart the integration or use a different algorithm.
> I downloaded DDEABM a few days ago, but I would like to try to get LSODE to work if possible. The reason for status=-1 might have to do with "stiffness" in the system of differential equations. DDEABM documentation says it isn't intended for stiff equations, but my work-around for that will just be to keep subdividing the interval automatically until there aren't any stiffness errors.
Fair enough. Incidentally, DDEABM performs automatic subdivision. According to the original documentation, it can handle mildly stiff equations.
Craig
|
|
|