Skip to content

Commit

Permalink
More tests in test_hopf_to_lc.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Jul 7, 2018
1 parent d944d6f commit 7b55951
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/test_hopf_to_lc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module TestHopfToLC
include("preamble_plots.jl")

using Bifurcations
using Bifurcations: Codim1, special_points, LimitCycleProblem
using Bifurcations: Codim1, special_points, LimitCycleProblem, limitcycles
using Bifurcations.Examples: PredatorPrey

solver0 = init(PredatorPrey.prob)
Expand All @@ -23,6 +23,12 @@ solver1 = init(
)
solve!(solver1)

periods = [lc.period for lc in limitcycles(solver1)]
@test length(periods) > 0
@test all(!isnan, periods)
@test maximum(periods) >= period_max # it is stopped due to out-of-domain
@test minimum(periods) > 0

plt_multi_panel = plot(
plot(solver1, (:x=>:parameter, :y=>1, :color=>:period)),
plot(solver1, (:x=>:parameter, :y=>:period, :color=>:period)),
Expand Down

0 comments on commit 7b55951

Please sign in to comment.