I would like to use EventLocator
to stop NDSolve
with the Event
command
"Event" -> Abs[D[f[x,y,t],t]] < threshold
That is, I need to check the time derivative of function f[x,y,t]
over a spatial domain a >= 0 && a <= L, b >= 0 && b <= L
at each integration step. Beside, it is clear that at that moment the temporal boundary is t
.
When I run it, NDSolve
gives:
"The function value \ Abs[InterpolatingFunction[...]+<<1>><<<1>> is not True or False \ when the arguments are {3.187144811900335`*^-8,<<4>>}"
I am not familiar with Event
, but I understand that one should use a
and b
instead of x
and y
in the Abs[...]
, because x
and y
are NDSolve
variables and it is better to avoid inserting them in the numerical functions.
Actually, what I need is something like this:
"Event" -> Abs[D[f[a,b,t],t], a >= 0 && a <= L, b >= 0 && b <= L] < threshold
Obviously, it is not correct in the syntax of Abs
, how can I implement the 'Event' properly to this end. Thank you!