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

Home » Public Forums » archive » Re: LSODE status=-1
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: LSODE status=-1 [message #82874] Mon, 21 January 2013 16:35 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Monday, January 21, 2013 4:42:39 PM UTC-5, hal...@yahoo.com wrote:
> On Monday, January 21, 2013 4:17:00 PM UTC-5, Craig Markwardt wrote:
>
>> 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
>
>
>
> DDEABM will still work for stiff equations, but the problem is that it is inefficient, right?

I'm not sure. I think for for truly stiff equations DDEABM will not function properly.

> The notes in DDEABM refer to "DDEBDF in DEPAC" for stiff equations. There is no IDL code for DDEBDF, right?

Right, and right.

LSODE, the original ODEPACK FORTRAN subroutine, has a flag which allows the user to tell it which method to use (stiff or not stiff). LSODE, the IDL routine, does not have this. I'm not sure what this means.

It could mean that LSODE, the IDL routine, has some kind of automatic detection code that the FORTRAN subtroutine does not, which picks which method to use based on the user's derivative function. Or, it could mean that the IDL developers made a choice for you ahead of time (stiff only; or non-stiff only).

If you read carefully archived discussions of the IDL routine, you will see that there are several complaints about this routine being an unexplained black box.

Craig
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Imposing inverse fft to be real
Next Topic: Re: Imposing inverse fft to be real

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

Current Time: Wed Oct 08 17:38:32 PDT 2025

Total time taken to generate the page: 0.00469 seconds