We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5ed597 commit df1fd74Copy full SHA for df1fd74
src/solve.jl
@@ -2,14 +2,8 @@ function SciMLBase.solve(prob::NonlinearProblem,
2
alg::AbstractNonlinearSolveAlgorithm, args...;
3
kwargs...)
4
solver = init(prob, alg, args...; kwargs...)
5
- sol = solve!(solver)
+ sol, resid = solve!(solver)
6
if typeof(sol) <: NewtonSolution
7
- resid = zero(prob.u0)
8
- if isinplace(prob)
9
- prob.f(resid,sol.u,prob.p)
10
- else
11
- resid = prob.f(sol.u,prob.p)
12
- end
13
return SciMLBase.build_solution(prob, alg, sol.u, resid;retcode=:Success)
14
end
15
@@ -76,7 +70,7 @@ function SciMLBase.solve!(solver::AbstractImmutableNonlinearSolver)
76
70
@set! solver.retcode = MAXITERS_EXCEED
77
71
78
72
sol = get_solution(solver)
79
- return sol
73
+ return sol, solver.fu
80
74
81
75
82
"""
0 commit comments