Re: NDSolve EventLocator Method question about the Event option
- To: mathgroup at smc.vnet.net
- Subject: [mg72960] Re: [mg72570] NDSolve EventLocator Method question about the Event option
- From: "Chris Chiasson" <chris at chiasson.name>
- Date: Fri, 26 Jan 2007 07:26:39 -0500 (EST)
- References: <200701100726.CAA10455@smc.vnet.net>
Tom Zeller from WRI sent along this nice tip: Use EventLocationMethod"->"LinearInterpolation" For some reason, in the case on which I am working, this causes the "subtraction Event" to not be skipped over. BTW, I think the event I was looking for happened at a discontinuity. On 1/10/07, Chris Chiasson <chris at chiasson.name> wrote: > I have a complicated NDSolve command, which I can produce for you if > you want, that does not seem to "hit" the event I am looking for when > I use subtraction, but hits the event just fine when I use Less. > > Here are the two options: > > doesn't work very well (produces NDSolve::evnf): > > "Event"->Abs@y@x-height[i[x]]/2 > > works: > > "Event"->Abs@y@x<height[i[x]]/2 > > height[i[x]] is always a positive number, as is Abs@y@x > > Does anyone have any ideas about why this might happen? > > P.S. Here is the full (working) Method option: > > Method->{"EventLocator","Event"->Abs@y@x<height[i[x]]/2,"EventAction":>Throw[Null,"StopIntegration"]} > > -- > http://chris.chiasson.name/ > > -- http://chris.chiasson.name/
- References:
- NDSolve EventLocator Method question about the Event option
- From: "Chris Chiasson" <chris@chiasson.name>
- NDSolve EventLocator Method question about the Event option