Skip to content

Commit 78b4518

Browse files
fixup! feat: implement initialization for SimpleNonlinearSolve
1 parent 6f85e87 commit 78b4518

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/SimpleNonlinearSolve/src/SimpleNonlinearSolve.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ function CommonSolve.solve(
6262
cache = SciMLBase.__init(prob, alg, args...; kwargs...)
6363
prob = cache.prob
6464
if cache.retcode == ReturnCode.InitialFailure
65-
return SciMLBase.build_solution(prob, alg, prob.u0, NonlinearSolveBase.Utils.evaluate_f(prob, prob.u0); cache.retcode)
65+
return SciMLBase.build_solution(prob, alg, prob.u0,
66+
NonlinearSolveBase.Utils.evaluate_f(prob, prob.u0); cache.retcode)
6667
end
6768
prob = convert(ImmutableNonlinearProblem, prob)
6869
return solve(prob, alg, args...; kwargs...)
@@ -105,7 +106,8 @@ function CommonSolve.solve(
105106
cache = SciMLBase.__init(prob, alg, args...; kwargs...)
106107
prob = cache.prob
107108
if cache.retcode == ReturnCode.InitialFailure
108-
return SciMLBase.build_solution(prob, alg, prob.u0, NonlinearSolveBase.Utils.evaluate_f(prob, prob.u0); cache.retcode)
109+
return SciMLBase.build_solution(prob, alg, prob.u0,
110+
NonlinearSolveBase.Utils.evaluate_f(prob, prob.u0); cache.retcode)
109111
end
110112
if sensealg === nothing && haskey(prob.kwargs, :sensealg)
111113
sensealg = prob.kwargs[:sensealg]

0 commit comments

Comments
 (0)