Skip to content
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
1 change: 1 addition & 0 deletions test/extensions/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1"
SciMLStructures = "53ae85a6-f571-4167-b2af-e1d143709226"
SetField = "efcf1570-3423-57d1-acb7-fd33fddbac46"
SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
4 changes: 2 additions & 2 deletions test/extensions/bifurcationkit.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using BifurcationKit, ModelingToolkit, Test
using BifurcationKit, ModelingToolkit, SetField, Test
using ModelingToolkit: t_nounits as t, D_nounits as D
# Simple pitchfork diagram, compares solution to native BifurcationKit, checks they are identical.
# Checks using `jac=false` option.
Expand Down Expand Up @@ -36,7 +36,7 @@ let
bprob_BK = BifurcationProblem(f_BK,
[1.0, 1.0],
[-1.0, 1.0],
(@lens _[1]);
(SetField.@lens _[1]);
record_from_solution = (x, p) -> x[1])
bif_dia_BK = bifurcationdiagram(bprob_BK,
PALC(),
Expand Down
Loading