Handling mandatory callbacks for specific methods
For some methods such as TVF and OpenBC an update each full time step is necessary. That makes the update callback in #440 mandatory for a simulation.
We can't just check , e.g. in the Semidiscretization, whether the update callback is in the callbackset or not since the callbackset is directly passed to solve.
@efaulhaber @svchb any thoughts on that?
I can't think of anything. @sloede ?
A possible workaround might be TrixiParticlesCallbackSet(semi, callbacks...)
I have no better idea...
Solved in #442, right?
The methods requiring callbacks have a flag callback_used, which is updated in the initialization of the callback. If not, an error will be thrown.
yes, exactly.
However, the problem is - as discussed in #442 - :
one can run one proper simulation with a system and then reuse this system for simulations without
UpdateCallback.
Our solution for this now is to reset the flag callback_used to false in semidiscretize and in restart_with!. This still doesn't prevent users from solving the same ODEProblem again without the callback, but this really is an edge case.