Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:fixedpoint doesn't exist #192

Closed
DanielVandH opened this issue Jun 21, 2023 · 1 comment · Fixed by #239
Closed

:fixedpoint doesn't exist #192

DanielVandH opened this issue Jun 21, 2023 · 1 comment · Fixed by #239

Comments

@DanielVandH
Copy link
Member

As claimed in the docs, a valid method for NLSolveJL is :fixedpoint (https://docs.sciml.ai/NonlinearSolve/stable/api/nlsolve/). This algorithm doesn't seem to exist:

using NonlinearSolve, SciMLNLSolve
f(u, p) = u .* u .- p 
u0 = [1.0, 1.0]
p = 2.0 
probN = NonlinearProblem(f, u0, p)
solver = solve(probN, NLSolveJL(method = :fixedpoint))
julia> solver = solve(probN, NLSolveJL(method = :fixedpoint))
ERROR: ArgumentError: Unknown method fixedpoint
Stacktrace:
  [1] nlsolve(df::NLSolversBase.OnceDifferentiable{Vector{Float64}, Matrix{Float64}, Vector{Float64}}, initial_x::Vector{Float64}; method::Symbol, xtol::Float64, ftol::Float64, iterations::Int64, store_trace::Bool, show_trace::Bool, extended_trace::Bool, linesearch::LineSearches.Static, linsolve::SciMLNLSolve.var"#3#5", factor::Float64, autoscale::Bool, m::Int64, beta::Float64, aa_start::Int64, droptol::Float64)
    @ NLsolve C:\Users\User\.julia\packages\NLsolve\gJL1I\src\nlsolve\nlsolve.jl:36
  [2] __solve(::NonlinearProblem{Vector{Float64}, false, Float64, NonlinearFunction{false, SciMLBase.FullSpecialize, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardNonlinearProblem}, ::NLSolveJL{LineSearches.Static, SciMLNLSolve.var"#3#5"}; abstol::Float64, maxiters::Int64, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ SciMLNLSolve C:\Users\User\.julia\packages\SciMLNLSolve\cJBSI\src\solve.jl:91
  [3] __solve
    @ C:\Users\User\.julia\packages\SciMLNLSolve\cJBSI\src\solve.jl:1 [inlined]
  [4] #solve_call#22
    @ C:\Users\User\.julia\packages\DiffEqBase\G15op\src\solve.jl:511 [inlined]
  [5] solve_call
    @ C:\Users\User\.julia\packages\DiffEqBase\G15op\src\solve.jl:481 [inlined]
  [6] #solve_up#30
    @ C:\Users\User\.julia\packages\DiffEqBase\G15op\src\solve.jl:945 [inlined]
  [8] #solve#29
    @ C:\Users\User\.julia\packages\DiffEqBase\G15op\src\solve.jl:939 [inlined]
  [9] solve(prob::NonlinearProblem{Vector{Float64}, false, Float64, NonlinearFunction{false, SciMLBase.FullSpecialize, typeof(f), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardNonlinearProblem}, args::NLSolveJL{LineSearches.Static, SciMLNLSolve.var"#3#5"})
    @ DiffEqBase C:\Users\User\.julia\packages\DiffEqBase\G15op\src\solve.jl:929
 [10] top-level scope
    @ Untitled-1:6

Based on the nlsolve.jl file at the start of the stacktrace, I'm guessing the available methods should be (:newton, :trust_region, :anderson, :broyden).

@ChrisRackauckas
Copy link
Member

It must've just been removed for only having :anderson, since :anderson with no history is a fixed point method. We should update the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants