MathGroup Archive 2001

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

Search the Archive

Re: NDSolve does not let me to stop

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30078] Re: NDSolve does not let me to stop
  • From: "Orestis Vantzos" <atelesforos at hotmail.com>
  • Date: Fri, 27 Jul 2001 03:52:16 -0400 (EDT)
  • Organization: National Technical University of Athens, Greece
  • References: <9joa08$18d$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

What you need is NDSolve's Option "StoppingTest"...
StoppingTest:>(Sqrt[x[t1]^2 + y[t1]^2] > 2) is a sample use of it.
I strongly recommend using this version:
StoppingTest:>(stopT=t; Sqrt[x[t1]^2 + y[t1]^2] > 2)
which at the end of the computation holds in stopT the time that you
interupted the computation (and is probably not tmax)
Orestis




"Borut L" <borut at email.si> wrote in message
news:9joa08$18d$1 at smc.vnet.net...
> Hi,
>
> You say Mathematica can do wonders, but I just can't figure this one out.
>
> I'm solving ODE for r[t] = {x[t],y[t]}. Is there a way to stop NDSolve
from
> going on, when {x[t],y[t]} fullfills a particular constrain (e.g.
> Sqrt[x[t1]^2 + y[t1]^2] > 2) and get Interpolating Function object from 0
to
> t1?
>
> If ain't possible this way, how would you solve the problem (with
> Mathematica build-in solvers)? It's essentially a very simple
> 'one-step-at-a-time' problem (e.g. Rungee Kutta), where you can check on
> variables of integration after any time.
>
> It seems to me, you can check on variables in NDSolve[eqs, {t,tmin,tmax}]
> only at tmin and tmax.
>
> Well?
>
>
> Thanks for your time,
>
> Borut Levart
>
>
>




  • Prev by Date: Re: Memory Leak
  • Next by Date: Re: Memory Leak -- From Jon@mtheory
  • Previous by thread: Re: NDSolve does not let me to stop
  • Next by thread: Reading arrays in mathlink