SetDTime in TimeLoopAdaptive
Hi,
Has anyone tried to use SetDTime
inside TimeLoopAdaptive
? I'm trying to reduce the time step depending on some event.
Some reasoning why we want to do this.
I know that it feels a bit counter-intuitive to want to change the time step in an adaptive time stepping somewhat manual and there are for sure more sophisticated solutions. However, we have a sudden change in our model for which we can easily check if it happens but do not know when it happens. Hence, we'd like to use possibly large time steps before triggering the event and then help the solver by reducing the time steps once the event happened. It would be a very nice first test avoiding to have to code our own time-stepping (also feasible ofc).I'd like to try something like this:
TimeLoopAdaptive[...]
{
IterativeLoopN[...]
{
GenerateJac sys ; SolveJac sys ;
}
}
{
Test[EventHappened[]?] {
SetDTime[Some Value];
}
}