MathGroup Archive 2007

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

Search the Archive

Re: NDSolve EventLocator Method question about the Event option


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/


  • Prev by Date: Re: How to find the index of a maximal element in a list?
  • Next by Date: RE: Re: 2D interpolation
  • Previous by thread: NDSolve EventLocator Method question about the Event option
  • Next by thread: Efficient Computation involving a Hypergeometric function...