diff --git a/Project.toml b/Project.toml index 95ca7785b..5444d032f 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "NonlinearSolve" uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" -authors = ["SciML"] version = "4.13.0" +authors = ["SciML"] [deps] ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" @@ -43,13 +43,23 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" SpeedMapping = "f1835b91-879b-4a3f-a438-e4baacf14412" Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4" -[sources] -BracketingNonlinearSolve = {path = "lib/BracketingNonlinearSolve"} -NonlinearSolveBase = {path = "lib/NonlinearSolveBase"} -NonlinearSolveFirstOrder = {path = "lib/NonlinearSolveFirstOrder"} -NonlinearSolveQuasiNewton = {path = "lib/NonlinearSolveQuasiNewton"} -NonlinearSolveSpectralMethods = {path = "lib/NonlinearSolveSpectralMethods"} -SimpleNonlinearSolve = {path = "lib/SimpleNonlinearSolve"} +[sources.BracketingNonlinearSolve] +path = "lib/BracketingNonlinearSolve" + +[sources.NonlinearSolveBase] +path = "lib/NonlinearSolveBase" + +[sources.NonlinearSolveFirstOrder] +path = "lib/NonlinearSolveFirstOrder" + +[sources.NonlinearSolveQuasiNewton] +path = "lib/NonlinearSolveQuasiNewton" + +[sources.NonlinearSolveSpectralMethods] +path = "lib/NonlinearSolveSpectralMethods" + +[sources.SimpleNonlinearSolve] +path = "lib/SimpleNonlinearSolve" [extensions] NonlinearSolveFastLevenbergMarquardtExt = "FastLevenbergMarquardt" @@ -106,14 +116,14 @@ Random = "1.10" ReTestItems = "1.24" Reexport = "1.2.2" ReverseDiff = "1.15" -SciMLLogging = "1.3" SIAMFANLEquations = "1.0.1" SciMLBase = "2.127" +SciMLLogging = "1.3" SimpleNonlinearSolve = "2.11" SparseArrays = "1.10" SparseConnectivityTracer = "1" SparseMatrixColorings = "0.4.5" -SpeedMapping = "0.3" +SpeedMapping = "0.4" StableRNGs = "1" StaticArrays = "1.9" StaticArraysCore = "1.4" @@ -146,9 +156,9 @@ PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" ReTestItems = "817f1d60-ba6b-4fd5-9520-3cf149f6a823" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" -SciMLLogging = "a6db7da4-7206-11f0-1eab-35f2a5dbe1d1" SIAMFANLEquations = "084e46ad-d928-497d-ad5e-07fa361a48c4" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +SciMLLogging = "a6db7da4-7206-11f0-1eab-35f2a5dbe1d1" SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5" SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35" SpeedMapping = "f1835b91-879b-4a3f-a438-e4baacf14412" diff --git a/ext/NonlinearSolveSpeedMappingExt.jl b/ext/NonlinearSolveSpeedMappingExt.jl index e6b8498e0..d7773befe 100644 --- a/ext/NonlinearSolveSpeedMappingExt.jl +++ b/ext/NonlinearSolveSpeedMappingExt.jl @@ -29,8 +29,10 @@ function SciMLBase.__solve( time_limit = ifelse(maxtime === nothing, 1000, maxtime) sol = speedmapping( - u; m!, tol, Lp = Inf, maps_limit = maxiters, alg.orders, - alg.check_obj, store_info = store_trace isa Val{true}, alg.σ_min, alg.stabilize, + u; m!, abstol = tol, pnorm = Inf, maps_limit = maxiters, + orders = Tuple(alg.orders), + initial_learning_rate = alg.σ_min == 0.0 ? 1.0 : alg.σ_min, + store_trace = store_trace isa Val{true}, time_limit ) res = prob.u0 isa Number ? first(sol.minimizer) : sol.minimizer @@ -39,7 +41,7 @@ function SciMLBase.__solve( return SciMLBase.build_solution( prob, alg, res, resid; original = sol, stats = SciMLBase.NLStats(sol.maps, 0, 0, 0, sol.maps), - retcode = ifelse(sol.converged, ReturnCode.Success, ReturnCode.Failure) + retcode = ifelse(sol.status == :first_order, ReturnCode.Success, ReturnCode.Failure) ) end