Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

towards BifurcationKit @0.4 #3102

Merged
merged 11 commits into from
Oct 24, 2024
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ MTKLabelledArraysExt = "LabelledArrays"
[compat]
AbstractTrees = "0.3, 0.4"
ArrayInterface = "6, 7"
BifurcationKit = "0.3"
BifurcationKit = "0.4"
BlockArrays = "1.1"
ChainRulesCore = "1"
Combinatorics = "1"
Expand Down
4 changes: 2 additions & 2 deletions ext/MTKBifurcationKitExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function BifurcationKit.BifurcationProblem(nsys::NonlinearSystem,
# If the plot var is a normal state.
if any(isequal(plot_var, var) for var in unknowns(nsys))
plot_idx = findfirst(isequal(plot_var), unknowns(nsys))
record_from_solution = (x, p) -> x[plot_idx]
record_from_solution = (x, p; k...) -> x[plot_idx]

# If the plot var is an observed state.
elseif any(isequal(plot_var, eq.lhs) for eq in observed(nsys))
Expand All @@ -132,7 +132,7 @@ function BifurcationKit.BifurcationProblem(nsys::NonlinearSystem,
return BifurcationKit.BifurcationProblem(F,
u0_bif_vals,
p_vals,
(@lens _[bif_idx]),
(BifurcationKit.@optic _[bif_idx]),
args...;
record_from_solution = record_from_solution,
J = J,
Expand Down
4 changes: 2 additions & 2 deletions test/extensions/bifurcationkit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ let
bprob_BK = BifurcationProblem(f_BK,
[1.0, 1.0],
[-1.0, 1.0],
(@lens _[1]);
record_from_solution = (x, p) -> x[1])
(BifurcationKit.@optic _[1]);
record_from_solution = (x, p; k...) -> x[1])
bif_dia_BK = bifurcationdiagram(bprob_BK,
PALC(),
2,
Expand Down
Loading