Closed TorkelE closed 5 months ago
Yes, that would be very nice if you could do that! Note that BK@0.3.0 has a new syntax:
bprob = BifurcationProblem(F, oprob.u0, oprob.p, (@lens _[bif_idx]);
record_from_solution = (x, p) -> x[plot_idx], J = J)
Also, no need to load Setfield
, it is re-exported from BifurcationKit
Sounds good, I presume this is the syntax on master? I will make a PR as soon as it is finished.
it is tagged, so v> 0.3
Yeah, should have double checked that properly. Congratulations on the 0.3 release, looking forward to try around with it. Once this new interface is ready I will rewrite the tutorial over at Catalyst.
Also, given that BifurcationKit already has SciMLBase (which contains the ModelingToolkit types) in its dependencies, creating an extension for the new dispatches would be redundant. I will just add it to the base package.
excellent!
should we close this? It seems it is solved on MTK side, right?
Yes, let's do
Currently, when I want to e.g. compute a bifurcation diagram for a ModelingToolkit-type structure (as e.g. generated by Catalyst) I have to manually extract the
f
andjac
functions, e.g:It seems like it would be easier to simply create a dispatch for
BifurcationProblem
which automatically finds theF
andJ
functions? If this sounds useful, I am happy to make a PR to BifurcationKit creating an extension (loaded if e.g. ModelingToolkit is loaded) that adds this dispatch.Possibly, it could also take the bifurcation parameter (and maybe under some circumstances, the plotting variable), and automate the
bif_idx
andplot_idx
computations as well.