Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/MTKBifurcationKitExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ struct ObservableRecordFromSolution{S, T}
end
end
# Functor function that computes the value.
function (orfs::ObservableRecordFromSolution)(x, p)
function (orfs::ObservableRecordFromSolution)(x, p; k...)
# Updates the state values (in subs_vals).
for state_idx in 1:(orfs.state_end_idxs)
orfs.subs_vals[state_idx] = orfs.subs_vals[state_idx][1] => x[state_idx]
Expand Down
8 changes: 8 additions & 0 deletions test/extensions/bifurcationkit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,12 @@ let
bf = bifurcationdiagram(bp, PALC(), 2, opts_br)

@test bf.γ.specialpoint[1].param≈0.1 atol=1e-4 rtol=1e-4

# Test with plot variable as observable
pvar = ModelingToolkit.get_var_to_name(fol)[:RHS]
bp = BifurcationProblem(fol, u0, par, bif_par; plot_var = pvar)
opts_br = ContinuationPar(p_min = -1.0,
p_max = 1.0)
bf = bifurcationdiagram(bp, PALC(), 2, opts_br)
@test bf.γ.specialpoint[1].param≈0.1 atol=1e-4 rtol=1e-4
end
Loading