Skip to content

Commit

Permalink
Merge pull request #3102 from rveltz/master
Browse files Browse the repository at this point in the history
towards BifurcationKit @0.4
  • Loading branch information
ChrisRackauckas authored Oct 24, 2024
2 parents 9b439b7 + 877cf03 commit be393fd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,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

0 comments on commit be393fd

Please sign in to comment.