Skip to content

Commit 8561871

Browse files
committed
add test
1 parent 06de594 commit 8561871

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

test/extensions/bifurcationkit.jl

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,35 @@ let
133133
@test length(fold_points) == 2
134134
@test fold_points [-1.1851851706940317, -5.6734983580551894e-6] # test that they occur at the correct parameter values).
135135
end
136+
137+
let
138+
139+
@mtkmodel FOL begin
140+
@parameters begin
141+
τ # parameters
142+
end
143+
@variables begin
144+
x(t) # dependent variables
145+
RHS(t)
146+
end
147+
@equations begin
148+
RHS ~ τ + x^2 - 0.1
149+
D(x) ~ RHS
150+
end
151+
end
152+
153+
@mtkbuild fol = FOL()
154+
155+
par = [fol.τ => 0.0]
156+
u0 = [fol.x => -1.0]
157+
#prob = ODEProblem(fol, u0, (0.0, 1.), par)
158+
159+
bif_par = fol.τ
160+
bp = BifurcationProblem(fol, u0, par, bif_par)
161+
opts_br = ContinuationPar(p_min = -1.0,
162+
p_max = 1.0)
163+
bf = bifurcationdiagram(bp, PALC(), 2, opts_br).γ.specialpoint[1] 0.1
164+
165+
@test bf.γ.specialpoint[1].param0.1 atol=1e-4 rtol=1e-4
166+
167+
end

0 commit comments

Comments
 (0)