Simple question. At a certain timepoint (e.g. t = 100) I want to make a callback, changing a parameter or variable value.
The most intuitive way would be
function condition(u,t,integrator)
t == 100
end
however the solver seems to miss it (not strange if it just takes timesteps). One could ofcourse workaround that, e.g. add a extra variable to u with an initial value 1.
function condition(u,t,integrator)
t > 100 && u[end] == 1
end
Then you add a line to the integrator setting u[end] = 0.
This however feels unnecessarily complicated. I do not know, but is there a simpler way to do this. I cannot imagine that it is a very uncommon thing that I am trying to do.