Skip to content

Commit

Permalink
Test FoldLimitCycleProblem in test_bazykin_85.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Aug 8, 2018
1 parent 88675ff commit ea2e634
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/test_bazykin_85.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ using DiffEqBase: ODEProblem
using StaticArrays: SVector

using Bifurcations: Codim1, Codim2, resolved_points
using Bifurcations.Codim2LimitCycle: FoldLimitCycleProblem
using Bifurcations.BifurcationsBase: contkind, HopfCont
using Bifurcations.Codim2: NormalizingAS, BackReferencingAS
using Bifurcations.Examples: Bazykin85
Expand Down Expand Up @@ -109,6 +110,7 @@ KNOWN_POINTS = Dict(
@test_nothrow solve!(sn_solver2)
end

hopf_solver2 = nothing
@testset "switch to hopf" begin
@assert sn_solver1 !== nothing
# Find the right-most Bogdanov-Takens bifurcation:
Expand All @@ -129,6 +131,23 @@ KNOWN_POINTS = Dict(
@test_nothrow resolved_points(hopf_solver2, Codim2.PointTypes.bautin)
end

@testset "switch to fold-LC" begin
@assert hopf_solver2 !== nothing
bautin_point, = special_points(hopf_solver2, Codim2.PointTypes.bautin)
flc_prob = FoldLimitCycleProblem(
bautin_point,
hopf_solver2;
num_mesh = 20,
degree = 3,
)
flc_solver = init(
flc_prob;
start_from_nearest_root = true,
max_branches = 0,
)
solve!(flc_solver)
end

if haskey(KNOWN_POINTS, ode.p)
desired_points = KNOWN_POINTS[ode.p]
@testset "known points" begin
Expand Down

0 comments on commit ea2e634

Please sign in to comment.