Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'abort from NDSolve if stiff solution?' topicStudent Support Forum > General > Archives > "abort from NDSolve if stiff solution?"

Next Comment >Help | Reply To Topic
Author Comment/Response
Charlie Brummitt
06/30/06 8:47pm

I'm currently doing an extensive search of PDE's to find ones that are chaotic. Right now, whenever I solve a PDE that is stiff or has a singularity, Mathematica prints a bunch of errors, such as (among many others):

NDSolve::ndsz: At t == 7.436024806304402`, step size is effectively zero; singularity or stiff system suspected.

Mathematica then continues to try to solve this equation, and it takes forever and only produces even more error messages. How can I have Mathematica abort if the equation appears to be stiff or have a singularity?

I've tried the Catch/Throw and Check functions, but I cannot get them to do what I want. I put Check[] around the statement in which I solve the differential equation, but Check still evaluates the expression even when it picks up errors! Is there anyway to get Check to NOT evaluate if any error messages are produced?

The Catch/Throw functions seem promising, but I don't know how I would "catch" the system being stiff. Is there someway to get into the guts of NDSolve to abort if the system is stiff?

Thanks in advance for any help you may be able to provide!

URL: ,

Subject (listing for 'abort from NDSolve if stiff solution?')
Author Date Posted
abort from NDSolve if stiff solution? Charlie Brum... 06/30/06 8:47pm
Re: abort from NDSolve if stiff solution? yehuda ben-s... 07/01/06 10:40pm
Next Comment >Help | Reply To Topic