Skip to content

Commit

Permalink
Skip some errors from find_simple_bifurcation!
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Jun 30, 2018
1 parent eec77ef commit be21854
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/continuations/branching.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,21 @@ end


function new_branches!(cache, opts, sbint::SimpleBifurcationInterval)
u0, tJ, L, Q = find_simple_bifurcation!(cache, opts, sbint)
# TODO: handle not-found case
u0, tJ, L, Q = try
find_simple_bifurcation!(cache, opts, sbint)
catch err
# Maybe there is the singularity (around which det(J; tJ)
# flips) within `sbint` and the root finder hits that?
if err isa LinAlg.SingularException
warn(err)
warn("""
Failed to find bifurcation point within:
$(sbint)
""")
return []
end
rethrow()
end

sbsol = solve_simple_bifurcation!(cache, opts, u0, tJ, L, Q)
@unpack tv1, tv2 = sbsol
Expand Down

0 comments on commit be21854

Please sign in to comment.