From 79464420733b7f8911b9bb6849b0596f5a2b9b67 Mon Sep 17 00:00:00 2001 From: CompatHelper Julia Date: Fri, 12 Dec 2025 17:07:22 +0000 Subject: [PATCH 1/2] CompatHelper: bump compat for SpeedMapping in [extras] to 0.4, (keep existing compat) --- Project.toml | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/Project.toml b/Project.toml index 95ca7785b..4d7af7fe6 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.3, 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" From cca0b4c8941cc2db276926fbd3ba6220ca2407b9 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas Date: Sun, 14 Dec 2025 09:15:59 -0500 Subject: [PATCH 2/2] Fix SpeedMapping 0.4 compatibility (drop 0.3 support) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SpeedMapping 0.4 introduced breaking API changes: - `converged::Bool` -> `status::Symbol` in return type - `tol` -> `abstol` - `Lp` -> `pnorm` - `store_info` -> `store_trace` - `σ_min` -> `initial_learning_rate` - `orders::Vector{Int}` -> `orders::Tuple` This commit updates the extension to use the 0.4 API exclusively and changes the compat entry from "0.3, 0.4" to "0.4". 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- Project.toml | 2 +- ext/NonlinearSolveSpeedMappingExt.jl | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index 4d7af7fe6..5444d032f 100644 --- a/Project.toml +++ b/Project.toml @@ -123,7 +123,7 @@ SimpleNonlinearSolve = "2.11" SparseArrays = "1.10" SparseConnectivityTracer = "1" SparseMatrixColorings = "0.4.5" -SpeedMapping = "0.3, 0.4" +SpeedMapping = "0.4" StableRNGs = "1" StaticArrays = "1.9" StaticArraysCore = "1.4" 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