@@ -23,32 +23,38 @@ Fetch required packages.
2323using NonlinearSolve, LinearSolve, StaticArrays, Sundials, SpeedMapping,
2424 BenchmarkTools, LinearAlgebra, DiffEqDevTools, PolyesterForwardDiff, CairoMakie
2525import MINPACK, NLsolve
26- RUS = RadiusUpdateSchemes;
26+ import LineSearches
27+
28+ const RUS = RadiusUpdateSchemes;
2729```
2830
2931Declare the benchmarked solvers (and their names and plotting options).
3032
3133```julia
3234DEFAULT_FORWARD_AD = AutoForwardDiff(; chunksize = 12)
3335
36+ HagerZhang() = LineSearchesJL(; method = LineSearches.HagerZhang())
37+ MoreThuente() = LineSearchesJL(; method = LineSearches.MoreThuente())
38+
39+ # XXX: Add PETSc
3440solvers_all = [
3541 (; pkg = :nonlinearsolve, name = "Default PolyAlgorithm", solver = Dict(:alg => FastShortcutNonlinearPolyalg(; autodiff = DEFAULT_FORWARD_AD))),
36- (; pkg = :nonlinearsolve, name = "Newton Raphson", solver = Dict(:alg => NewtonRaphson(; linsolve = nothing, autodiff = DEFAULT_FORWARD_AD))),
37- (; pkg = :nonlinearsolve, name = "Newton Raphson (HagerZhang LineSearch)", solver = Dict(:alg => NewtonRaphson(; linsolve = nothing, linesearch = HagerZhang()))),
38- (; pkg = :nonlinearsolve, name = "Newton Raphson (MoreThuente LineSearch)", solver = Dict(:alg => NewtonRaphson(; linsolve = nothing, linesearch = MoreThuente()))),
39- (; pkg = :nonlinearsolve, name = "Newton Raphson (BackTracking LineSearch)", solver = Dict(:alg => NewtonRaphson(; linsolve = nothing, linesearch = BackTracking()))),
42+ (; pkg = :nonlinearsolve, name = "Newton Raphson", solver = Dict(:alg => NewtonRaphson(; autodiff = DEFAULT_FORWARD_AD))),
43+ (; pkg = :nonlinearsolve, name = "Newton Raphson (HagerZhang LineSearch)", solver = Dict(:alg => NewtonRaphson(; linesearch = HagerZhang()))),
44+ (; pkg = :nonlinearsolve, name = "Newton Raphson (MoreThuente LineSearch)", solver = Dict(:alg => NewtonRaphson(; linesearch = MoreThuente()))),
45+ (; pkg = :nonlinearsolve, name = "Newton Raphson (BackTracking LineSearch)", solver = Dict(:alg => NewtonRaphson(; linesearch = BackTracking()))),
4046 (; pkg = :nonlinearsolve, name = "Newton Krylov with GMRES", solver = Dict(:alg => NewtonRaphson(; linsolve = KrylovJL_GMRES()))),
4147 (; pkg = :nonlinearsolve, name = "DFSane", solver = Dict(:alg => DFSane())),
4248 (; pkg = :nonlinearsolve, name = "Trust Region", solver = Dict(:alg => TrustRegion())),
43- (; pkg = :nonlinearsolve, name = "Trust Region (NLsolve Update)", solver = Dict(:alg => TrustRegion(; linsolve = nothing, autodiff = DEFAULT_FORWARD_AD, radius_update_scheme = RUS.NLsolve))),
44- (; pkg = :nonlinearsolve, name = "Trust Region (Nocedal Wright)", solver = Dict(:alg => TrustRegion(; linsolve = nothing, autodiff = DEFAULT_FORWARD_AD, radius_update_scheme = RUS.NocedalWright))),
45- (; pkg = :nonlinearsolve, name = "Trust Region (Hei)", solver = Dict(:alg => TrustRegion(; linsolve = nothing, autodiff = DEFAULT_FORWARD_AD, radius_update_scheme = RUS.Hei))),
46- (; pkg = :nonlinearsolve, name = "Trust Region (Yuan)", solver = Dict(:alg => TrustRegion(; linsolve = nothing, autodiff = DEFAULT_FORWARD_AD, radius_update_scheme = RUS.Yuan))),
47- (; pkg = :nonlinearsolve, name = "Trust Region (Bastin)", solver = Dict(:alg => TrustRegion(; linsolve = nothing, autodiff = DEFAULT_FORWARD_AD, radius_update_scheme = RUS.Bastin))),
48- (; pkg = :nonlinearsolve, name = "Trust Region (Fan)", solver = Dict(:alg => TrustRegion(; linsolve = nothing, autodiff = DEFAULT_FORWARD_AD, radius_update_scheme = RUS.Fan))),
49- (; pkg = :nonlinearsolve, name = "Levenberg-Marquardt", solver = Dict(:alg => LevenbergMarquardt(; linsolve = nothing, autodiff = DEFAULT_FORWARD_AD))),
49+ (; pkg = :nonlinearsolve, name = "Trust Region (NLsolve Update)", solver = Dict(:alg => TrustRegion(; autodiff = DEFAULT_FORWARD_AD, radius_update_scheme = RUS.NLsolve))),
50+ (; pkg = :nonlinearsolve, name = "Trust Region (Nocedal Wright)", solver = Dict(:alg => TrustRegion(; autodiff = DEFAULT_FORWARD_AD, radius_update_scheme = RUS.NocedalWright))),
51+ (; pkg = :nonlinearsolve, name = "Trust Region (Hei)", solver = Dict(:alg => TrustRegion(; autodiff = DEFAULT_FORWARD_AD, radius_update_scheme = RUS.Hei))),
52+ (; pkg = :nonlinearsolve, name = "Trust Region (Yuan)", solver = Dict(:alg => TrustRegion(; autodiff = DEFAULT_FORWARD_AD, radius_update_scheme = RUS.Yuan))),
53+ (; pkg = :nonlinearsolve, name = "Trust Region (Bastin)", solver = Dict(:alg => TrustRegion(; autodiff = DEFAULT_FORWARD_AD, radius_update_scheme = RUS.Bastin))),
54+ (; pkg = :nonlinearsolve, name = "Trust Region (Fan)", solver = Dict(:alg => TrustRegion(; autodiff = DEFAULT_FORWARD_AD, radius_update_scheme = RUS.Fan))),
55+ (; pkg = :nonlinearsolve, name = "Levenberg-Marquardt", solver = Dict(:alg => LevenbergMarquardt(; autodiff = DEFAULT_FORWARD_AD))),
5056 (; pkg = :nonlinearsolve, name = "Levenberg-Marquardt with Cholesky", solver = Dict(:alg => LevenbergMarquardt(; autodiff = DEFAULT_FORWARD_AD, linsolve = CholeskyFactorization()))),
51- (; pkg = :nonlinearsolve, name = "Levenberg-Marquardt (No Geodesic Accln.)", solver = Dict(:alg => LevenbergMarquardt(; linsolve = nothing, disable_geodesic = Val(true), autodiff = DEFAULT_FORWARD_AD))),
57+ (; pkg = :nonlinearsolve, name = "Levenberg-Marquardt (No Geodesic Accln.)", solver = Dict(:alg => LevenbergMarquardt(; disable_geodesic = Val(true), autodiff = DEFAULT_FORWARD_AD))),
5258 (; pkg = :nonlinearsolve, name = "Levenberg-Marquardt (No Geodesic Accln.) with Cholesky", solver = Dict(:alg => LevenbergMarquardt(; disable_geodesic = Val(true), autodiff = DEFAULT_FORWARD_AD, linsolve = CholeskyFactorization()))),
5359 (; pkg = :wrapper, name = "Modified Powell [MINPACK]", solver = Dict(:alg => CMINPACK(; method = :hybr))),
5460 (; pkg = :wrapper, name = "Levenberg-Marquardt [MINPACK]", solver = Dict(:alg => CMINPACK(; method = :lm))),
0 commit comments