Re[2]: StoppingTest does not work ?
- To: mathgroup at smc.vnet.net
- Subject: [mg9792] Re[2]: [mg9769] StoppingTest does not work ?
- From: Gilles BARBIER <Gilles.Barbier at der.edfgdf.fr>
- Date: Fri, 28 Nov 1997 05:35:07 -0500
- Sender: owner-wri-mathgroup at wolfram.com
In your case, Mathematica stops for x=.4 and y=1.5
(approximatel= y)
that is still not what I want.
=
Moreover :
sol=NDSolve[{y'[t]==1,y[0]==0},y[t],{t,0,2},StoppingTest->=
y[t]>1.4]
does not stop at all. =
=
It seems that StoppingTest works more or less depending of the =
equation to solve...
=
Gilles.
____________________________ S=E9parateur R=E9ponse
_____________________= ___________
Objet : RE: [mg9769] StoppingTest does not work ? Auteur :
jmthomas at cybercable.tm.fr =E0 Hub Date : 25/11/1997 14:47
Your StoppingTest function involves y[t] while you are solving for y.
=
Please note the function is slightly different from yours:
=
sol=NDSolve[{y'[t]==y[t],y[0]==1},y,{t,0,2},StoppingTest->y>1.4=
] =
f1=y/.sol[[1,1]]
Plot[f1[t],Evaluate at Flatten[{t,First at First@f1}]]
=
If you solve for y[t], then your test function is correct: =
Clear at f1
sol=NDSolve[{y'[t]==y[t],y[0]==1},y[t],{t,0,2},StoppingTest->y[=
t]>1.4] =
f1[t_]=y[t]/.sol[[1,1]]
Plot[f1[t],{t,0,0.5}]
=
----------------------------------------------- =
Jean-Marie THOMAS
Conseil et Audit en Ingenierie de Calcul =
jmthomas at cybercable.tm.fr
+33 (0)3 88 32 93 64
www.cybercable.tm.fr/~jmthomas
=======================
=
-----Message d'origine-----
De: Gilles BARBIER [SMTP:Gilles.Barbier at der.edfgdf.fr] =
A: mathgroup at smc.vnet.net
Objet: [mg9769] StoppingTest does not work ?
=
=
Anyone could tell me why :
=
NDSolve[{y'[t]==1,y[0]==0},{y},{t,0,2},StoppingTest->(y[t]>1=
)]
=
does not stop for t=1 (it does not stop at all, in fact). =
Of course, my problem is more complicated, but in all case =
stoppingTest seems to stop when it wants...
=
Thanks for quick help, Please !!!
=
Gilles.