You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems as if setting maxter to 1 acutally results in zero iterations occuring. And I am left to wonder if maxter=2 then means 2 iterations, or actually 1 iteration...
This is the same for my actual application, which makes me more certain that the issue is not specific to this problem. The other example is:
Some investigations into number of function calls:
julia> using NonlinearSolve, LinearAlgebra
julia> function f(u,p)
p[2] += 1 # This counts function calls
u .* u .- p[1]
end
f (generic function with 1 method)
julia> u0 = [1.0, 1.0];
julia> p = [2.0, 0];
julia> probN = NonlinearProblem{false}(f, u0, p);
julia> p[2]
0.0
julia> bla0 = solve(probN, NewtonRaphson(), maxiters = 0).u;
julia> p[2]
1.0
julia> bla1 = solve(probN, NewtonRaphson(), maxiters = 1).u;
julia> p[2]
2.0
julia> bla2 = solve(probN, NewtonRaphson(), maxiters = 2).u;
julia> p[2]
5.0
I do not get why the calls that do nothing end up calling the function. Nor do I get why computing bla2 has 3 function calls - does it not only need 2 to compute a gradient? My intuition is that those numbers should all be 1 lower. But then again, I do not have good understanding of the details of the algorithms. So this is mostly to inform whoever might take a look at this.
Check out the following example:
It seems as if setting maxter to 1 acutally results in zero iterations occuring. And I am left to wonder if maxter=2 then means 2 iterations, or actually 1 iteration...
This is the same for my actual application, which makes me more certain that the issue is not specific to this problem. The other example is:
The text was updated successfully, but these errors were encountered: