Skip to content

Commit

Permalink
feat: run initialiation on solve!
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Dec 14, 2024
1 parent 31525cc commit 3511dc8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/NonlinearSolveBase/src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ function SciMLBase.__solve(
end

function CommonSolve.solve!(cache::AbstractNonlinearSolveCache)
if cache.retcode == ReturnCode.InitialFailure
return SciMLBase.build_solution(
cache.prob, cache.alg, get_u(cache), get_fu(cache);
cache.retcode, cache.stats, cache.trace
)
end

while not_terminated(cache)
CommonSolve.step!(cache)
end
Expand Down

0 comments on commit 3511dc8

Please sign in to comment.