Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: StoppingTest option for NDSolve

  • To: mathgroup at smc.vnet.net
  • Subject: [mg35057] Re: StoppingTest option for NDSolve
  • From: Peter Pein <petsie at arcor.de>
  • Date: Thu, 20 Jun 2002 23:55:05 -0400 (EDT)
  • Organization: Arcor
  • References: <aepkmo$s04$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Randall Beer wrote:
> Does anyone know how to use the StoppingTest option for NDSolve?  This 
> option doesn't seem to be documented, but shows up in Options[NDSolve].
> 
> I need to terminate a numerical integration when given state variables 
> go out of a specified region, and I was hoping that I could do this by 
> defining a stopping test.
> 
> Thanks,
> Randy
> 

Hi Randy,
Try ??StoppingTest in Mathematica-Frontend
Here is a toy-example
In[2]:=
sol = NDSolve[{y[0] == 1, y'[x] == y[x]}, y[x], {x, 0, 2},
     StoppingTest -> y[x] >= 2.718]
Out[2]=
{{y[x] -> InterpolatingFunction[{{0., 1.0988}}, "<>"][x]}}

Iteration stopped before x==2. I guess the StepSize is too large to stop at 
Log[2.718] (0.999896).

       Peter



  • Prev by Date: RE: Table as Graphics Object?
  • Next by Date: Colors
  • Previous by thread: RE: StoppingTest option for NDSolve
  • Next by thread: machine-size real number