-
-
Notifications
You must be signed in to change notification settings - Fork 234
Description
When using a ContiniousCallback or a DiscreteCallback you provide a condition function
function condition(u,t,integrator)
endHere, if you wish to interface the state or the time, it is recommended to use the u vector or the t variable. However, u is a normal vector and cannot be interfaced with MTK variables. Hence, this doesn't work. Instead one have to use the integrator, which poses two problems:
- According to the doc, interfacing using
integratoris worse for performance. - It is also kind of awkward to have a function include an argument (
u) that is not used.
From an interface point of view, if possible, it seems that the best solution is to make these callbacks work well with only the integrator as an argument to condition.
More generally, it seems that we have all this internal DiffEq code that depend on indexing, which doesn't mesh with the MTK approach or not using indexes. I guess it would be a homogeneous project, but is there any plan to make MTK interfacing universal through the system, instead of relying on converting MTK converting its symbolic to value maps to value arrays of the right order everywhere?