Skip to content

Commit 8098e0a

Browse files
fix: respect use_homotopy_continuation in NonlinearProblem and default it to false
1 parent e5b5f61 commit 8098e0a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/systems/nonlinear/nonlinearsystem.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -496,13 +496,15 @@ end
496496

497497
function DiffEqBase.NonlinearProblem{iip}(sys::NonlinearSystem, u0map,
498498
parammap = DiffEqBase.NullParameters();
499-
check_length = true, use_homotopy_continuation = true, kwargs...) where {iip}
499+
check_length = true, use_homotopy_continuation = false, kwargs...) where {iip}
500500
if !iscomplete(sys)
501501
error("A completed `NonlinearSystem` is required. Call `complete` or `structural_simplify` on the system before creating a `NonlinearProblem`")
502502
end
503-
prob = safe_HomotopyContinuationProblem(sys, u0map, parammap; check_length, kwargs...)
504-
if prob isa HomotopyContinuationProblem
505-
return prob
503+
if use_homotopy_continuation
504+
prob = safe_HomotopyContinuationProblem(sys, u0map, parammap; check_length, kwargs...)
505+
if prob isa HomotopyContinuationProblem
506+
return prob
507+
end
506508
end
507509
f, u0, p = process_SciMLProblem(NonlinearFunction{iip}, sys, u0map, parammap;
508510
check_length, kwargs...)

0 commit comments

Comments
 (0)