Skip to content

Commit

Permalink
fix: respect use_homotopy_continuation in NonlinearProblem and de…
Browse files Browse the repository at this point in the history
…fault it to `false`
  • Loading branch information
AayushSabharwal committed Dec 11, 2024
1 parent e5b5f61 commit 8098e0a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/systems/nonlinear/nonlinearsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -496,13 +496,15 @@ end

function DiffEqBase.NonlinearProblem{iip}(sys::NonlinearSystem, u0map,
parammap = DiffEqBase.NullParameters();
check_length = true, use_homotopy_continuation = true, kwargs...) where {iip}
check_length = true, use_homotopy_continuation = false, kwargs...) where {iip}
if !iscomplete(sys)
error("A completed `NonlinearSystem` is required. Call `complete` or `structural_simplify` on the system before creating a `NonlinearProblem`")
end
prob = safe_HomotopyContinuationProblem(sys, u0map, parammap; check_length, kwargs...)
if prob isa HomotopyContinuationProblem
return prob
if use_homotopy_continuation
prob = safe_HomotopyContinuationProblem(sys, u0map, parammap; check_length, kwargs...)
if prob isa HomotopyContinuationProblem
return prob
end
end
f, u0, p = process_SciMLProblem(NonlinearFunction{iip}, sys, u0map, parammap;
check_length, kwargs...)
Expand Down

0 comments on commit 8098e0a

Please sign in to comment.