From 9f578c827185eac84042f58246d9e40f1ca90d5b Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Fri, 27 Oct 2023 12:23:30 -0400 Subject: [PATCH 01/28] Proper handling of complex numbers and failures --- src/broyden.jl | 4 ++-- src/default.jl | 10 +++++----- src/klement.jl | 4 ++-- src/lbroyden.jl | 4 ++-- src/raphson.jl | 7 ++----- src/trustRegion.jl | 35 ++++++++++++++++++++--------------- src/utils.jl | 14 +++++++++++++- 7 files changed, 46 insertions(+), 32 deletions(-) diff --git a/src/broyden.jl b/src/broyden.jl index 5fcbd3d51..ce0d10930 100644 --- a/src/broyden.jl +++ b/src/broyden.jl @@ -111,7 +111,7 @@ function perform_step!(cache::GeneralBroydenCache{true}) if all(cache.reset_check, du) || all(cache.reset_check, dfu) if cache.resets ≥ cache.max_resets - cache.retcode = ReturnCode.Unstable + cache.retcode = ReturnCode.ConvergenceFailure cache.force_stop = true return nothing end @@ -153,7 +153,7 @@ function perform_step!(cache::GeneralBroydenCache{false}) cache.dfu = cache.fu2 .- cache.fu if all(cache.reset_check, cache.du) || all(cache.reset_check, cache.dfu) if cache.resets ≥ cache.max_resets - cache.retcode = ReturnCode.Unstable + cache.retcode = ReturnCode.ConvergenceFailure cache.force_stop = true return nothing end diff --git a/src/default.jl b/src/default.jl index 3b4f8ef23..a163903bb 100644 --- a/src/default.jl +++ b/src/default.jl @@ -128,8 +128,8 @@ function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, @unpack adkwargs, linsolve, precs = alg algs = ( - # Klement(), - # Broyden(), + GeneralKlement(; linsolve, precs), + GeneralBroyden(), NewtonRaphson(; linsolve, precs, adkwargs...), NewtonRaphson(; linsolve, precs, linesearch = BackTracking(), adkwargs...), TrustRegion(; linsolve, precs, adkwargs...), @@ -159,7 +159,7 @@ end ] else [ - :(GeneralKlement()), + :(GeneralKlement(; linsolve, precs)), :(GeneralBroyden()), :(NewtonRaphson(; linsolve, precs, adkwargs...)), :(NewtonRaphson(; linsolve, precs, linesearch = BackTracking(), adkwargs...)), @@ -191,7 +191,7 @@ end push!(calls, quote resids = tuple($(Tuple(resids)...)) - minfu, idx = findmin(DEFAULT_NORM, resids) + minfu, idx = __findmin(DEFAULT_NORM, resids) end) for i in 1:length(algs) @@ -249,7 +249,7 @@ end retcode = ReturnCode.MaxIters fus = tuple($(Tuple(resids)...)) - minfu, idx = findmin(cache.caches[1].internalnorm, fus) + minfu, idx = __findmin(cache.caches[1].internalnorm, fus) stats = cache.caches[idx].stats u = cache.caches[idx].u diff --git a/src/klement.jl b/src/klement.jl index e60aeee9b..435bdf52c 100644 --- a/src/klement.jl +++ b/src/klement.jl @@ -118,7 +118,7 @@ function perform_step!(cache::GeneralKlementCache{true}) if singular if cache.resets == alg.max_resets cache.force_stop = true - cache.retcode = ReturnCode.Unstable + cache.retcode = ReturnCode.ConvergenceFailure return nothing end fact_done = false @@ -176,7 +176,7 @@ function perform_step!(cache::GeneralKlementCache{false}) if singular if cache.resets == alg.max_resets cache.force_stop = true - cache.retcode = ReturnCode.Unstable + cache.retcode = ReturnCode.ConvergenceFailure return nothing end fact_done = false diff --git a/src/lbroyden.jl b/src/lbroyden.jl index db4353b41..eecc4b712 100644 --- a/src/lbroyden.jl +++ b/src/lbroyden.jl @@ -128,7 +128,7 @@ function perform_step!(cache::LimitedMemoryBroydenCache{true}) if cache.iterations_since_reset > size(cache.U, 1) && (all(cache.reset_check, du) || all(cache.reset_check, cache.dfu)) if cache.resets ≥ cache.max_resets - cache.retcode = ReturnCode.Unstable + cache.retcode = ReturnCode.ConvergenceFailure cache.force_stop = true return nothing end @@ -188,7 +188,7 @@ function perform_step!(cache::LimitedMemoryBroydenCache{false}) if cache.iterations_since_reset > size(cache.U, 1) && (all(cache.reset_check, cache.du) || all(cache.reset_check, cache.dfu)) if cache.resets ≥ cache.max_resets - cache.retcode = ReturnCode.Unstable + cache.retcode = ReturnCode.ConvergenceFailure cache.force_stop = true return nothing end diff --git a/src/raphson.jl b/src/raphson.jl index 6e2a502bb..4c5dcfb99 100644 --- a/src/raphson.jl +++ b/src/raphson.jl @@ -80,8 +80,7 @@ end function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::NewtonRaphson, args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, - termination_condition = nothing, - internalnorm = DEFAULT_NORM, + termination_condition = nothing, internalnorm = DEFAULT_NORM, linsolve_kwargs = (;), kwargs...) where {uType, iip} alg = get_concrete_algorithm(alg_, prob) @unpack f, u0, p = prob @@ -91,9 +90,7 @@ function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::NewtonRaphso linsolve_kwargs) abstol, reltol, termination_condition = _init_termination_elements(abstol, - reltol, - termination_condition, - eltype(u)) + reltol, termination_condition, eltype(u)) mode = DiffEqBase.get_termination_mode(termination_condition) diff --git a/src/trustRegion.jl b/src/trustRegion.jl index cf9f41af0..4339b4739 100644 --- a/src/trustRegion.jl +++ b/src/trustRegion.jl @@ -141,11 +141,6 @@ for large-scale and numerically-difficult nonlinear systems. `expand_threshold < r` (with `r` defined in `shrink_threshold`). Defaults to `2.0`. - `max_shrink_times`: the maximum number of times to shrink the trust region radius in a row, `max_shrink_times` is exceeded, the algorithm returns. Defaults to `32`. - -!!! warning - - `linsolve` and `precs` are used exclusively for the inplace version of the algorithm. - Support for the OOP version is planned! """ @concrete struct TrustRegion{CJ, AD, MTR} <: AbstractNewtonAlgorithm{CJ, AD} @@ -250,7 +245,7 @@ function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::TrustRegion, linsolve_kwargs) u_tmp = zero(u) u_cauchy = zero(u) - u_gauss_newton = zero(u) + u_gauss_newton = _mutable_zero(u) loss_new = loss H = zero(J' * J) @@ -338,10 +333,8 @@ function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::TrustRegion, initial_trust_radius = convert(trustType, 1.0) end - abstol, reltol, termination_condition = _init_termination_elements(abstol, - reltol, - termination_condition, - eltype(u)) + abstol, reltol, termination_condition = _init_termination_elements(abstol, reltol, + termination_condition, eltype(u)) mode = DiffEqBase.get_termination_mode(termination_condition) @@ -368,8 +361,7 @@ function perform_step!(cache::TrustRegionCache{true}) # do not use A = cache.H, b = _vec(cache.g) since it is equivalent # to A = cache.J, b = _vec(fu) as long as the Jacobian is non-singular linres = dolinsolve(alg.precs, linsolve, A = J, b = _vec(fu), - linu = _vec(u_gauss_newton), - p = p, reltol = cache.abstol) + linu = _vec(u_gauss_newton), p = p, reltol = cache.abstol) cache.linsolve = linres.cache @. cache.u_gauss_newton = -1 * u_gauss_newton end @@ -395,7 +387,12 @@ function perform_step!(cache::TrustRegionCache{false}) cache.H = J' * J cache.g = _restructure(fu, J' * _vec(fu)) cache.stats.njacs += 1 - cache.u_gauss_newton = -1 .* _restructure(cache.g, cache.H \ _vec(cache.g)) + + # do not use A = cache.H, b = _vec(cache.g) since it is equivalent + # to A = cache.J, b = _vec(fu) as long as the Jacobian is non-singular + linres = dolinsolve(cache.alg.precs, cache.linsolve, A = cache.J, b = -_vec(fu), + linu = _vec(cache.u_gauss_newton), p = p, reltol = cache.abstol) + cache.linsolve = linres.cache end # Compute the Newton step. @@ -718,8 +715,16 @@ function jvp!(cache::TrustRegionCache{true}) end function not_terminated(cache::TrustRegionCache) - return !cache.force_stop && cache.stats.nsteps < cache.maxiters && - cache.shrink_counter < cache.alg.max_shrink_times + non_shrink_terminated = cache.force_stop || cache.stats.nsteps ≥ cache.maxiters + # Terminated due to convergence or maxiters + non_shrink_terminated && return false + # Terminated due to too many shrink + shrink_terminated = cache.shrink_counter ≥ cache.alg.max_shrink_times + if shrink_terminated + cache.retcode = ReturnCode.ConvergenceFailure + return false + end + return true end get_fu(cache::TrustRegionCache) = cache.fu diff --git a/src/utils.jl b/src/utils.jl index 87a80e4ed..8da6bc748 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -13,6 +13,14 @@ end @inline DEFAULT_NORM(u::AbstractArray) = sqrt(real(sum(UNITLESS_ABS2, u)) / length(u)) @inline DEFAULT_NORM(u) = norm(u) +# Ignores NaN +function __findmin(f, x) + return findmin(x) do xᵢ + fx = f(xᵢ) + return isnan(fx) ? Inf : fx + end +end + """ default_adargs_to_adtype(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(), diff_type = Val{:forward}) @@ -210,9 +218,13 @@ function __get_concrete_algorithm(alg, prob) return set_ad(alg, ad) end +__cvt_real(::Type{T}, ::Nothing) where {T} = nothing +__cvt_real(::Type{T}, x) where {T} = real(T(x)) + function _get_tolerance(η, tc_η, ::Type{T}) where {T} fallback_η = real(oneunit(T)) * (eps(real(one(T))))^(4 // 5) - return T(ifelse(η !== nothing, η, ifelse(tc_η !== nothing, tc_η, fallback_η))) + return ifelse(η !== nothing, __cvt_real(T, η), + ifelse(tc_η !== nothing, __cvt_real(T, tc_η), fallback_η)) end function _init_termination_elements(abstol, reltol, termination_condition, From 0140e1af35f858576981174b5c848cfb3612c133 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Fri, 27 Oct 2023 12:32:51 -0400 Subject: [PATCH 02/28] Fix TR scalars --- src/default.jl | 3 +-- src/trustRegion.jl | 15 ++++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/default.jl b/src/default.jl index a163903bb..1c992a527 100644 --- a/src/default.jl +++ b/src/default.jl @@ -127,8 +127,7 @@ function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::FastShortcutNonlinearPolyalg, args...; kwargs...) where {uType, iip} @unpack adkwargs, linsolve, precs = alg - algs = ( - GeneralKlement(; linsolve, precs), + algs = (GeneralKlement(; linsolve, precs), GeneralBroyden(), NewtonRaphson(; linsolve, precs, adkwargs...), NewtonRaphson(; linsolve, precs, linesearch = BackTracking(), adkwargs...), diff --git a/src/trustRegion.jl b/src/trustRegion.jl index 4339b4739..09f02b13a 100644 --- a/src/trustRegion.jl +++ b/src/trustRegion.jl @@ -388,11 +388,16 @@ function perform_step!(cache::TrustRegionCache{false}) cache.g = _restructure(fu, J' * _vec(fu)) cache.stats.njacs += 1 - # do not use A = cache.H, b = _vec(cache.g) since it is equivalent - # to A = cache.J, b = _vec(fu) as long as the Jacobian is non-singular - linres = dolinsolve(cache.alg.precs, cache.linsolve, A = cache.J, b = -_vec(fu), - linu = _vec(cache.u_gauss_newton), p = p, reltol = cache.abstol) - cache.linsolve = linres.cache + if cache.linsolve === nothing + # Scalar + cache.u_gauss_newton = -cache.H \ cache.g + else + # do not use A = cache.H, b = _vec(cache.g) since it is equivalent + # to A = cache.J, b = _vec(fu) as long as the Jacobian is non-singular + linres = dolinsolve(cache.alg.precs, cache.linsolve, A = cache.J, b = -_vec(fu), + linu = _vec(cache.u_gauss_newton), p = p, reltol = cache.abstol) + cache.linsolve = linres.cache + end end # Compute the Newton step. From 5060219ee848f4e58bd5a11653a86c907dc2900e Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Fri, 27 Oct 2023 15:35:25 -0400 Subject: [PATCH 03/28] Add tests --- test/infeasible.jl | 70 ++++++++++++++++++++++++++++++++++++++++++++++ test/runtests.jl | 1 + 2 files changed, 71 insertions(+) create mode 100644 test/infeasible.jl diff --git a/test/infeasible.jl b/test/infeasible.jl new file mode 100644 index 000000000..001ce1f6e --- /dev/null +++ b/test/infeasible.jl @@ -0,0 +1,70 @@ +using LinearAlgebra, NonlinearSolve, StaticArrays, Test + +# this is infeasible +function f1!(out, u, p) + μ = 3.986004415e14 + x = 7000.0e3 + y = -6.970561549987071e-9 + z = -3.784706123246018e-9 + v_x = 8.550491684548064e-12 + u[1] + v_y = 6631.60076191005 + u[2] + v_z = 3600.665431405663 + u[3] + r = @SVector [x, y, z] + v = @SVector [v_x, v_y, v_z] + h = cross(r, v) + ev = cross(v, h) / μ - r / norm(r) + i = acos(h[3] / norm(h)) + e = norm(ev) + a = 1 / (2 / norm(r) - (norm(v)^2 / μ)) + out .= [a - 42.0e6, e - 1e-5, i - 1e-5] + return nothing +end + +# this is unfeasible +function f1(u, p) + μ = 3.986004415e14 + x = 7000.0e3 + y = -6.970561549987071e-9 + z = -3.784706123246018e-9 + v_x = 8.550491684548064e-12 + u[1] + v_y = 6631.60076191005 + u[2] + v_z = 3600.665431405663 + u[3] + r = @SVector [x, y, z] + v = @SVector [v_x, v_y, v_z] + h = cross(r, v) + ev = cross(v, h) / μ - r / norm(r) + i = acos(h[3] / norm(h)) + e = norm(ev) + a = 1 / (2 / norm(r) - (norm(v)^2 / μ)) + return [a - 42.0e6, e - 1e-5, i - 1e-5] +end + +@testset "[IIP] Infeasible" begin + u0 = [0.0, 0.0, 0.0] + prob = NonlinearProblem(f1!, u0) + sol = solve(prob) + + @test all(!isnan, sol.u) + @test !SciMLBase.successful_retcode(sol.retcode) +end + +@testset "[OOP] Infeasible" begin + u0 = [0.0, 0.0, 0.0] + prob = NonlinearProblem(f1, u0) + sol = solve(prob) + + @test all(!isnan, sol.u) + @test !SciMLBase.successful_retcode(sol.retcode) + + try + u0 = @SVector [0.0, 0.0, 0.0] + prob = NonlinearProblem(f1, u0) + sol = solve(prob) + + @test all(!isnan, sol.u) + @test !SciMLBase.successful_retcode(sol.retcode) + catch err + # Static Arrays has different default linearsolve which throws an error + @test err isa SingularException + end +end diff --git a/test/runtests.jl b/test/runtests.jl index d4f817d0a..a5365cf38 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -18,6 +18,7 @@ end @time @safetestset "Polyalgs" include("polyalgs.jl") @time @safetestset "Matrix Resizing" include("matrix_resizing.jl") @time @safetestset "Nonlinear Least Squares" include("nonlinear_least_squares.jl") + @time @safetestset "Infeasible Problems" include("infeasible.jl") end if GROUP == "All" || GROUP == "23TestProblems" From 19c79c9c4429f939a700201f0623f24d78e95fae Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Fri, 27 Oct 2023 16:30:49 -0400 Subject: [PATCH 04/28] Use a default NonlinearSolve Tag --- src/utils.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils.jl b/src/utils.jl index 8da6bc748..9349c2505 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -206,6 +206,8 @@ function get_concrete_algorithm(alg, prob) return __get_concrete_algorithm(alg, prob) end +struct NonlinearSolveTag end + function __get_concrete_algorithm(alg, prob) @unpack sparsity, jac_prototype = prob.f use_sparse_ad = sparsity !== nothing || jac_prototype !== nothing @@ -213,7 +215,8 @@ function __get_concrete_algorithm(alg, prob) # Use Finite Differencing use_sparse_ad ? AutoSparseFiniteDiff() : AutoFiniteDiff() else - use_sparse_ad ? AutoSparseForwardDiff() : AutoForwardDiff{nothing, Nothing}(nothing) + tag = NonlinearSolveTag() + use_sparse_ad ? AutoSparseForwardDiff(; tag) : AutoForwardDiff(; tag) end return set_ad(alg, ad) end From c137cb7740fbd20d3deb29185c25cb3977bd6b57 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Fri, 27 Oct 2023 23:36:37 -0400 Subject: [PATCH 05/28] Dont Allocate --- src/trustRegion.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/trustRegion.jl b/src/trustRegion.jl index 09f02b13a..a8db99440 100644 --- a/src/trustRegion.jl +++ b/src/trustRegion.jl @@ -394,9 +394,10 @@ function perform_step!(cache::TrustRegionCache{false}) else # do not use A = cache.H, b = _vec(cache.g) since it is equivalent # to A = cache.J, b = _vec(fu) as long as the Jacobian is non-singular - linres = dolinsolve(cache.alg.precs, cache.linsolve, A = cache.J, b = -_vec(fu), + linres = dolinsolve(cache.alg.precs, cache.linsolve, A = cache.J, b = _vec(fu), linu = _vec(cache.u_gauss_newton), p = p, reltol = cache.abstol) cache.linsolve = linres.cache + @. cache.u_gauss_newton *= -1 end end From c7ca39a7d8c22c53694c783e6306781ac067e7c9 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Sat, 28 Oct 2023 11:35:01 -0400 Subject: [PATCH 06/28] Specialize on functions --- src/linesearch.jl | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/linesearch.jl b/src/linesearch.jl index 1f63d695c..10751a021 100644 --- a/src/linesearch.jl +++ b/src/linesearch.jl @@ -31,7 +31,9 @@ end end # LineSearches.jl doesn't have a supertype so default to that -init_linesearch_cache(_, ls, f, u, p, fu, iip) = LineSearchesJLCache(ls, f, u, p, fu, iip) +function init_linesearch_cache(_, ls, f::F, u, p, fu, iip) where {F <: Function} + return LineSearchesJLCache(ls, f, u, p, fu, iip) +end # Wrapper over LineSearches.jl algorithms @concrete mutable struct LineSearchesJLCache @@ -43,7 +45,8 @@ init_linesearch_cache(_, ls, f, u, p, fu, iip) = LineSearchesJLCache(ls, f, u, p ls end -function LineSearchesJLCache(ls::LineSearch, f, u::Number, p, _, ::Val{false}) +function LineSearchesJLCache(ls::LineSearch, f::F, u::Number, p, _, + ::Val{false}) where {F <: Function} eval_f(u, du, α) = eval_f(u - α * du) eval_f(u) = f(u, p) @@ -84,7 +87,8 @@ function LineSearchesJLCache(ls::LineSearch, f, u::Number, p, _, ::Val{false}) return LineSearchesJLCache(eval_f, ϕ, dϕ, ϕdϕ, convert(eltype(u), ls.α), ls) end -function LineSearchesJLCache(ls::LineSearch, f, u, p, fu1, IIP::Val{iip}) where {iip} +function LineSearchesJLCache(ls::LineSearch, f::F, u, p, fu1, + IIP::Val{iip}) where {iip, F <: Function} fu = iip ? deepcopy(fu1) : nothing u_ = _mutable_zero(u) @@ -200,8 +204,8 @@ end α end -function init_linesearch_cache(alg::LiFukushimaLineSearch, ls::LineSearch, f, _u, p, _fu, - ::Val{iip}) where {iip} +function init_linesearch_cache(alg::LiFukushimaLineSearch, ls::LineSearch, f::F, _u, p, _fu, + ::Val{iip}) where {iip, F <: Function} fu = iip ? deepcopy(_fu) : nothing u = iip ? deepcopy(_u) : nothing return LiFukushimaLineSearchCache{iip}(f, p, u, fu, alg, ls.α) From 3bf5853e75b4ef6ed34136d804e7ac005272e6b8 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Sat, 28 Oct 2023 12:28:16 -0400 Subject: [PATCH 07/28] Fix line search direction for some algorithms --- src/broyden.jl | 23 +++++++++++------------ src/dfsane.jl | 4 ++-- src/gaussnewton.jl | 16 ++++------------ src/klement.jl | 24 ++++++++++++------------ src/lbroyden.jl | 23 ++++++++++------------- src/levenberg.jl | 17 +++++------------ src/linesearch.jl | 16 ++++++++-------- src/pseudotransient.jl | 7 +------ src/raphson.jl | 5 +---- 9 files changed, 54 insertions(+), 81 deletions(-) diff --git a/src/broyden.jl b/src/broyden.jl index ce0d10930..a5b5e7f3d 100644 --- a/src/broyden.jl +++ b/src/broyden.jl @@ -61,8 +61,8 @@ get_fu(cache::GeneralBroydenCache) = cache.fu function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::GeneralBroyden, args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, - termination_condition = nothing, internalnorm = DEFAULT_NORM, - kwargs...) where {uType, iip} + termination_condition = nothing, internalnorm::F = DEFAULT_NORM, + kwargs...) where {uType, iip, F} @unpack f, u0, p = prob u = alias_u0 ? u0 : deepcopy(u0) fu = evaluate_f(prob, u) @@ -71,10 +71,8 @@ function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::GeneralBroyde alg.reset_tolerance reset_check = x -> abs(x) ≤ reset_tolerance - abstol, reltol, termination_condition = _init_termination_elements(abstol, - reltol, - termination_condition, - eltype(u)) + abstol, reltol, termination_condition = _init_termination_elements(abstol, reltol, + termination_condition, eltype(u)) mode = DiffEqBase.get_termination_mode(termination_condition) @@ -83,8 +81,7 @@ function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::GeneralBroyde return GeneralBroydenCache{iip}(f, alg, u, zero(u), _mutable_zero(u), fu, zero(fu), zero(fu), p, J⁻¹, zero(_reshape(fu, 1, :)), _mutable_zero(u), false, 0, alg.max_resets, maxiters, internalnorm, ReturnCode.Default, abstol, reltol, - reset_tolerance, - reset_check, prob, NLStats(1, 0, 0, 0, 0), + reset_tolerance, reset_check, prob, NLStats(1, 0, 0, 0, 0), init_linesearch_cache(alg.linesearch, f, u, p, fu, Val(iip)), termination_condition, storage) end @@ -95,9 +92,9 @@ function perform_step!(cache::GeneralBroydenCache{true}) termination_condition = cache.termination_condition(tc_storage) T = eltype(u) - mul!(_vec(du), J⁻¹, -_vec(fu)) + mul!(_vec(du), J⁻¹, _vec(fu)) α = perform_linesearch!(cache.lscache, u, du) - _axpy!(α, du, u) + _axpy!(-α, du, u) f(fu2, u, p) termination_condition(fu2, u, u_prev, cache.abstol, cache.reltol) && @@ -119,6 +116,7 @@ function perform_step!(cache::GeneralBroydenCache{true}) J⁻¹[diagind(J⁻¹)] .= T(1) cache.resets += 1 else + du .*= -1 mul!(_vec(J⁻¹df), J⁻¹, _vec(dfu)) mul!(J⁻¹₂, _vec(du)', J⁻¹) denom = dot(du, J⁻¹df) @@ -138,9 +136,9 @@ function perform_step!(cache::GeneralBroydenCache{false}) T = eltype(cache.u) - cache.du = _restructure(cache.du, cache.J⁻¹ * -_vec(cache.fu)) + cache.du = _restructure(cache.du, cache.J⁻¹ * _vec(cache.fu)) α = perform_linesearch!(cache.lscache, cache.u, cache.du) - cache.u = cache.u .+ α * cache.du + cache.u = cache.u .- α * cache.du cache.fu2 = f(cache.u, p) termination_condition(cache.fu2, cache.u, cache.u_prev, cache.abstol, cache.reltol) && @@ -160,6 +158,7 @@ function perform_step!(cache::GeneralBroydenCache{false}) cache.J⁻¹ = __init_identity_jacobian(cache.u, cache.fu) cache.resets += 1 else + cache.du = -cache.du cache.J⁻¹df = _restructure(cache.J⁻¹df, cache.J⁻¹ * _vec(cache.dfu)) cache.J⁻¹₂ = _vec(cache.du)' * cache.J⁻¹ denom = dot(cache.du, cache.J⁻¹df) diff --git a/src/dfsane.jl b/src/dfsane.jl index aca13c344..e567816f4 100644 --- a/src/dfsane.jl +++ b/src/dfsane.jl @@ -97,8 +97,8 @@ end function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::DFSane, args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, - termination_condition = nothing, internalnorm = DEFAULT_NORM, - kwargs...) where {uType, iip} + termination_condition = nothing, internalnorm::F = DEFAULT_NORM, + kwargs...) where {uType, iip, F} uₙ = alias_u0 ? prob.u0 : deepcopy(prob.u0) p = prob.p diff --git a/src/gaussnewton.jl b/src/gaussnewton.jl index b066f6169..99526b937 100644 --- a/src/gaussnewton.jl +++ b/src/gaussnewton.jl @@ -49,9 +49,7 @@ end function GaussNewton(; concrete_jac = nothing, linsolve = nothing, precs = DEFAULT_PRECS, adkwargs...) ad = default_adargs_to_adtype(; adkwargs...) - return GaussNewton{_unwrap_val(concrete_jac)}(ad, - linsolve, - precs) + return GaussNewton{_unwrap_val(concrete_jac)}(ad, linsolve, precs) end @concrete mutable struct GaussNewtonCache{iip} <: AbstractNonlinearSolveCache{iip} @@ -84,21 +82,15 @@ end function SciMLBase.__init(prob::NonlinearLeastSquaresProblem{uType, iip}, alg_::GaussNewton, args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, - termination_condition = nothing, - internalnorm = DEFAULT_NORM, - kwargs...) where {uType, iip} + termination_condition = nothing, internalnorm::F = DEFAULT_NORM, + kwargs...) where {uType, iip, F} alg = get_concrete_algorithm(alg_, prob) @unpack f, u0, p = prob linsolve_with_JᵀJ = Val(_needs_square_A(alg, u0)) u = alias_u0 ? u0 : deepcopy(u0) - if iip - fu1 = f.resid_prototype === nothing ? zero(u) : f.resid_prototype - f(fu1, u, p) - else - fu1 = f(u, p) - end + fu1 = evaluate_f(prob, u) if SciMLBase._unwrap_val(linsolve_with_JᵀJ) uf, linsolve, J, fu2, jac_cache, du, JᵀJ, Jᵀf = jacobian_caches(alg, f, u, p, diff --git a/src/klement.jl b/src/klement.jl index 435bdf52c..17334e2ba 100644 --- a/src/klement.jl +++ b/src/klement.jl @@ -70,8 +70,8 @@ get_fu(cache::GeneralKlementCache) = cache.fu function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::GeneralKlement, args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, - termination_condition = nothing, internalnorm = DEFAULT_NORM, - linsolve_kwargs = (;), kwargs...) where {uType, iip} + termination_condition = nothing, internalnorm::F = DEFAULT_NORM, + linsolve_kwargs = (;), kwargs...) where {uType, iip, F} @unpack f, u0, p = prob u = alias_u0 ? u0 : deepcopy(u0) fu = evaluate_f(prob, u) @@ -89,10 +89,8 @@ function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::GeneralKleme linsolve = __setup_linsolve(J, _vec(fu), _vec(du), p, alg) end - abstol, reltol, termination_condition = _init_termination_elements(abstol, - reltol, - termination_condition, - eltype(u)) + abstol, reltol, termination_condition = _init_termination_elements(abstol, reltol, + termination_condition, eltype(u)) mode = DiffEqBase.get_termination_mode(termination_condition) @@ -129,12 +127,12 @@ function perform_step!(cache::GeneralKlementCache{true}) # u = u - J \ fu linres = dolinsolve(alg.precs, linsolve; A = ifelse(fact_done, nothing, J), - b = -_vec(fu), linu = _vec(du), p, reltol = cache.abstol) + b = _vec(fu), linu = _vec(du), p, reltol = cache.abstol) cache.linsolve = linres.cache # Line Search α = perform_linesearch!(cache.lscache, u, du) - _axpy!(α, du, u) + _axpy!(-α, du, u) f(cache.fu2, u, p) termination_condition(cache.fu2, u, u_prev, cache.abstol, cache.reltol) && @@ -146,6 +144,7 @@ function perform_step!(cache::GeneralKlementCache{true}) cache.force_stop && return nothing # Update the Jacobian + cache.du .*= -1 cache.J_cache .= cache.J' .^ 2 cache.Jdu .= _vec(du) .^ 2 mul!(cache.Jᵀ²du, cache.J_cache, cache.Jdu) @@ -186,22 +185,22 @@ function perform_step!(cache::GeneralKlementCache{false}) # u = u - J \ fu if linsolve === nothing - cache.du = -fu / cache.J + cache.du = fu / cache.J else linres = dolinsolve(alg.precs, linsolve; A = ifelse(fact_done, nothing, J), - b = -_vec(fu), linu = _vec(cache.du), p, reltol = cache.abstol) + b = _vec(fu), linu = _vec(cache.du), p, reltol = cache.abstol) cache.linsolve = linres.cache end # Line Search α = perform_linesearch!(cache.lscache, cache.u, cache.du) - cache.u = @. cache.u + α * cache.du # `u` might not support mutation + cache.u = @. cache.u - α * cache.du # `u` might not support mutation cache.fu2 = f(cache.u, p) termination_condition(cache.fu2, cache.u, cache.u_prev, cache.abstol, cache.reltol) && (cache.force_stop = true) - cache.u_prev = @. cache.u + cache.u_prev = cache.u cache.stats.nf += 1 cache.stats.nsolve += 1 cache.stats.nfactors += 1 @@ -209,6 +208,7 @@ function perform_step!(cache::GeneralKlementCache{false}) cache.force_stop && return nothing # Update the Jacobian + cache.du = -cache.du cache.J_cache = cache.J' .^ 2 cache.Jdu = _vec(cache.du) .^ 2 cache.Jᵀ²du = cache.J_cache * cache.Jdu diff --git a/src/lbroyden.jl b/src/lbroyden.jl index eecc4b712..6a65f42ea 100644 --- a/src/lbroyden.jl +++ b/src/lbroyden.jl @@ -68,8 +68,8 @@ get_fu(cache::LimitedMemoryBroydenCache) = cache.fu function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::LimitedMemoryBroyden, args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, - termination_condition = nothing, internalnorm = DEFAULT_NORM, - kwargs...) where {uType, iip} + termination_condition = nothing, internalnorm::F = DEFAULT_NORM, + kwargs...) where {uType, iip, F} @unpack f, u0, p = prob u = alias_u0 ? u0 : deepcopy(u0) if u isa Number @@ -81,15 +81,13 @@ function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::LimitedMemory fu = evaluate_f(prob, u) threshold = min(alg.threshold, maxiters) U, Vᵀ = __init_low_rank_jacobian(u, fu, threshold) - du = -fu + du = copy(fu) reset_tolerance = alg.reset_tolerance === nothing ? sqrt(eps(eltype(u))) : alg.reset_tolerance reset_check = x -> abs(x) ≤ reset_tolerance - abstol, reltol, termination_condition = _init_termination_elements(abstol, - reltol, - termination_condition, - eltype(u)) + abstol, reltol, termination_condition = _init_termination_elements(abstol, reltol, + termination_condition, eltype(u)) mode = DiffEqBase.get_termination_mode(termination_condition) @@ -112,7 +110,7 @@ function perform_step!(cache::LimitedMemoryBroydenCache{true}) termination_condition = cache.termination_condition(tc_storage) α = perform_linesearch!(cache.lscache, u, du) - _axpy!(α, du, u) + _axpy!(-α, du, u) f(cache.fu2, u, p) termination_condition(cache.fu2, cache.u, cache.u_prev, cache.abstol, cache.reltol) && @@ -134,7 +132,7 @@ function perform_step!(cache::LimitedMemoryBroydenCache{true}) end cache.iterations_since_reset = 0 cache.resets += 1 - cache.du .= -cache.fu + cache.du .= cache.fu else idx = min(cache.iterations_since_reset, size(cache.U, 1)) U_part = selectdim(cache.U, 1, 1:idx) @@ -154,7 +152,6 @@ function perform_step!(cache::LimitedMemoryBroydenCache{true}) U_part = selectdim(cache.U, 1, 1:idx) Vᵀ_part = selectdim(cache.Vᵀ, 2, 1:idx) __lbroyden_matvec!(_vec(cache.du), cache.Ux, U_part, Vᵀ_part, _vec(cache.fu2)) - cache.du .*= -1 cache.iterations_since_reset += 1 end @@ -172,7 +169,7 @@ function perform_step!(cache::LimitedMemoryBroydenCache{false}) T = eltype(cache.u) α = perform_linesearch!(cache.lscache, cache.u, cache.du) - cache.u = cache.u .+ α * cache.du + cache.u = cache.u .- α * cache.du cache.fu2 = f(cache.u, p) termination_condition(cache.fu2, cache.u, cache.u_prev, cache.abstol, cache.reltol) && @@ -194,7 +191,7 @@ function perform_step!(cache::LimitedMemoryBroydenCache{false}) end cache.iterations_since_reset = 0 cache.resets += 1 - cache.du = -cache.fu + cache.du = cache.fu else idx = min(cache.iterations_since_reset, size(cache.U, 1)) U_part = selectdim(cache.U, 1, 1:idx) @@ -215,7 +212,7 @@ function perform_step!(cache::LimitedMemoryBroydenCache{false}) U_part = selectdim(cache.U, 1, 1:idx) Vᵀ_part = selectdim(cache.Vᵀ, 2, 1:idx) cache.du = _restructure(cache.du, - -__lbroyden_matvec(U_part, Vᵀ_part, _vec(cache.fu2))) + __lbroyden_matvec(U_part, Vᵀ_part, _vec(cache.fu2))) cache.iterations_since_reset += 1 end diff --git a/src/levenberg.jl b/src/levenberg.jl index bb9f88bd9..ffdb3b763 100644 --- a/src/levenberg.jl +++ b/src/levenberg.jl @@ -163,9 +163,8 @@ end function SciMLBase.__init(prob::Union{NonlinearProblem{uType, iip}, NonlinearLeastSquaresProblem{uType, iip}}, alg_::LevenbergMarquardt, args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, - termination_condition = nothing, - internalnorm = DEFAULT_NORM, - linsolve_kwargs = (;), kwargs...) where {uType, iip} + termination_condition = nothing, internalnorm::F = DEFAULT_NORM, + linsolve_kwargs = (;), kwargs...) where {uType, iip, F} alg = get_concrete_algorithm(alg_, prob) @unpack f, u0, p = prob u = alias_u0 ? u0 : deepcopy(u0) @@ -231,10 +230,8 @@ function SciMLBase.__init(prob::Union{NonlinearProblem{uType, iip}, end return LevenbergMarquardtCache{iip, !_unwrap_val(linsolve_with_JᵀJ)}(f, alg, u, copy(u), - fu1, - fu2, du, p, uf, linsolve, J, - jac_cache, false, maxiters, internalnorm, ReturnCode.Default, abstol, reltol, prob, - DᵀD, + fu1, fu2, du, p, uf, linsolve, J, jac_cache, false, maxiters, internalnorm, + ReturnCode.Default, abstol, reltol, prob, DᵀD, JᵀJ, λ, λ_factor, damping_increase_factor, damping_decrease_factor, h, α_geodesic, b_uphill, min_damping_D, v, a, tmp_vec, v_old, loss, δ, loss, make_new_J, fu_tmp, zero(u), zero(fu1), mat_tmp, rhs_tmp, J², NLStats(1, 0, 0, 0, 0), @@ -321,11 +318,7 @@ function perform_step!(cache::LevenbergMarquardtCache{true, fastls}) where {fast if (1 - β)^b_uphill * loss ≤ loss_old # Accept step. cache.u .+= δ - if termination_condition(cache.fu_tmp, - cache.u, - u_prev, - cache.abstol, - cache.reltol) + if termination_condition(cache.fu_tmp, u, u_prev, cache.abstol, cache.reltol) cache.force_stop = true return nothing end diff --git a/src/linesearch.jl b/src/linesearch.jl index 10751a021..b8e906c3f 100644 --- a/src/linesearch.jl +++ b/src/linesearch.jl @@ -228,21 +228,21 @@ function perform_linesearch!(cache::LiFukushimaLineSearchCache{iip}, u, du) wher # Early Terminate based on Eq. 2.7 if iip - cache.u_cache .= u .+ du + cache.u_cache .= u .- du cache.f(cache.fu_cache, cache.u_cache, cache.p) fxλ_norm = norm(cache.fu_cache, 2) else - fxλ_norm = norm(cache.f(u .+ du, cache.p), 2) + fxλ_norm = norm(cache.f(u .- du, cache.p), 2) end fxλ_norm ≤ ρ * fx_norm - σ₂ * norm(du, 2)^2 && return cache.α if iip - cache.u_cache .= u .+ λ₂ .* du + cache.u_cache .= u .- λ₂ .* du cache.f(cache.fu_cache, cache.u_cache, cache.p) fxλp_norm = norm(cache.fu_cache, 2) else - fxλp_norm = norm(cache.f(u .+ λ₂ .* du, cache.p), 2) + fxλp_norm = norm(cache.f(u .- λ₂ .* du, cache.p), 2) end if !isfinite(fxλp_norm) @@ -252,11 +252,11 @@ function perform_linesearch!(cache::LiFukushimaLineSearchCache{iip}, u, du) wher λ₁, λ₂ = λ₂, β * λ₂ if iip - cache.u_cache .= u .+ λ₂ .* du + cache.u_cache .= u .- λ₂ .* du cache.f(cache.fu_cache, cache.u_cache, cache.p) fxλp_norm = norm(cache.fu_cache, 2) else - fxλp_norm = norm(cache.f(u .+ λ₂ .* du, cache.p), 2) + fxλp_norm = norm(cache.f(u .- λ₂ .* du, cache.p), 2) end nan_converged = isfinite(fxλp_norm) @@ -269,11 +269,11 @@ function perform_linesearch!(cache::LiFukushimaLineSearchCache{iip}, u, du) wher for _ in 1:maxiters if iip - cache.u_cache .= u .+ λ₂ .* du + cache.u_cache .= u .- λ₂ .* du cache.f(cache.fu_cache, cache.u_cache, cache.p) fxλp_norm = norm(cache.fu_cache, 2) else - fxλp_norm = norm(cache.f(u .+ λ₂ .* du, cache.p), 2) + fxλp_norm = norm(cache.f(u .- λ₂ .* du, cache.p), 2) end converged = fxλp_norm ≤ (1 + η) * fx_norm - σ₁ * λ₂^2 * norm(du, 2)^2 diff --git a/src/pseudotransient.jl b/src/pseudotransient.jl index ca7cbcdbb..c487fc0b3 100644 --- a/src/pseudotransient.jl +++ b/src/pseudotransient.jl @@ -86,12 +86,7 @@ function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::PseudoTransi @unpack f, u0, p = prob u = alias_u0 ? u0 : deepcopy(u0) - if iip - fu1 = f.resid_prototype === nothing ? zero(u) : f.resid_prototype - f(fu1, u, p) - else - fu1 = _mutable(f(u, p)) - end + fu1 = evaluate_f(prob, u) uf, linsolve, J, fu2, jac_cache, du = jacobian_caches(alg, f, u, p, Val(iip); linsolve_kwargs) alpha = convert(eltype(u), alg.alpha_initial) diff --git a/src/raphson.jl b/src/raphson.jl index 4c5dcfb99..22893f21f 100644 --- a/src/raphson.jl +++ b/src/raphson.jl @@ -46,10 +46,7 @@ function NewtonRaphson(; concrete_jac = nothing, linsolve = nothing, linesearch = LineSearch(), precs = DEFAULT_PRECS, adkwargs...) ad = default_adargs_to_adtype(; adkwargs...) linesearch = linesearch isa LineSearch ? linesearch : LineSearch(; method = linesearch) - return NewtonRaphson{_unwrap_val(concrete_jac)}(ad, - linsolve, - precs, - linesearch) + return NewtonRaphson{_unwrap_val(concrete_jac)}(ad, linsolve, precs, linesearch) end @concrete mutable struct NewtonRaphsonCache{iip} <: AbstractNonlinearSolveCache{iip} From dd3c40ef78ca7a41afeb06801c26f9fb31dec5f0 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Sat, 28 Oct 2023 13:31:09 -0400 Subject: [PATCH 08/28] Reenable some of the 23 test problems tests --- src/lbroyden.jl | 4 +++- src/linesearch.jl | 9 +++------ test/23_test_problems.jl | 18 +++--------------- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/src/lbroyden.jl b/src/lbroyden.jl index 6a65f42ea..72dc48b94 100644 --- a/src/lbroyden.jl +++ b/src/lbroyden.jl @@ -25,7 +25,7 @@ An implementation of `LimitedMemoryBroyden` with reseting and line search. end function LimitedMemoryBroyden(; max_resets::Int = 3, linesearch = LineSearch(), - threshold::Int = 10, reset_tolerance = nothing) + threshold::Int = 27, reset_tolerance = nothing) linesearch = linesearch isa LineSearch ? linesearch : LineSearch(; method = linesearch) return LimitedMemoryBroyden(max_resets, threshold, linesearch, reset_tolerance) end @@ -134,6 +134,7 @@ function perform_step!(cache::LimitedMemoryBroydenCache{true}) cache.resets += 1 cache.du .= cache.fu else + cache.du .*= -1 idx = min(cache.iterations_since_reset, size(cache.U, 1)) U_part = selectdim(cache.U, 1, 1:idx) Vᵀ_part = selectdim(cache.Vᵀ, 2, 1:idx) @@ -193,6 +194,7 @@ function perform_step!(cache::LimitedMemoryBroydenCache{false}) cache.resets += 1 cache.du = cache.fu else + cache.du = -cache.du idx = min(cache.iterations_since_reset, size(cache.U, 1)) U_part = selectdim(cache.U, 1, 1:idx) Vᵀ_part = selectdim(cache.Vᵀ, 2, 1:idx) diff --git a/src/linesearch.jl b/src/linesearch.jl index b8e906c3f..608bc6cff 100644 --- a/src/linesearch.jl +++ b/src/linesearch.jl @@ -162,10 +162,7 @@ function perform_linesearch!(cache::LineSearchesJLCache, u, du) ϕ₀, dϕ₀ = ϕdϕ(zero(eltype(u))) - # This case is sometimes possible for large optimization problems - dϕ₀ ≥ 0 && return cache.α - - return first(cache.ls.method(ϕ, cache.dϕ(u, du), cache.ϕdϕ(u, du), cache.α, ϕ₀, dϕ₀)) + return first(cache.ls.method(ϕ, dϕ, ϕdϕ, cache.α, ϕ₀, dϕ₀)) end """ @@ -252,11 +249,11 @@ function perform_linesearch!(cache::LiFukushimaLineSearchCache{iip}, u, du) wher λ₁, λ₂ = λ₂, β * λ₂ if iip - cache.u_cache .= u .- λ₂ .* du + cache.u_cache .= u .+ λ₂ .* du cache.f(cache.fu_cache, cache.u_cache, cache.p) fxλp_norm = norm(cache.fu_cache, 2) else - fxλp_norm = norm(cache.f(u .- λ₂ .* du, cache.p), 2) + fxλp_norm = norm(cache.f(u .+ λ₂ .* du, cache.p), 2) end nan_converged = isfinite(fxλp_norm) diff --git a/test/23_test_problems.jl b/test/23_test_problems.jl index 77274d34a..cba67a4ae 100644 --- a/test/23_test_problems.jl +++ b/test/23_test_problems.jl @@ -83,32 +83,20 @@ end # Broyden and Klement Tests are quite flaky and failure seems to be platform dependent # needs additional investigation before we can enable them -#= @testset "GeneralBroyden 23 Test Problems" begin - alg_ops = (GeneralBroyden(), - GeneralBroyden(; linesearch = LiFukushimaLineSearch(; beta = 0.1)), - GeneralBroyden(; linesearch = BackTracking())) + alg_ops = (GeneralBroyden(),) broken_tests = Dict(alg => Int[] for alg in alg_ops) - broken_tests[alg_ops[1]] = [1, 3, 4, 5, 6, 11, 12, 13, 14, 21] - broken_tests[alg_ops[2]] = [1, 2, 3, 4, 5, 6, 9, 11, 13, 22] - broken_tests[alg_ops[3]] = [1, 2, 4, 5, 6, 11, 12, 13, 14, 21] + broken_tests[alg_ops[1]] = [1, 2, 4, 5, 6, 11, 12, 13, 14] test_on_library(problems, dicts, alg_ops, broken_tests) end @testset "GeneralKlement 23 Test Problems" begin - alg_ops = (GeneralKlement(), - GeneralKlement(; linesearch = BackTracking()), - GeneralKlement(; linesearch = HagerZhang())) + alg_ops = (GeneralKlement(),) broken_tests = Dict(alg => Int[] for alg in alg_ops) broken_tests[alg_ops[1]] = [1, 2, 4, 5, 6, 7, 11, 13, 22] - broken_tests[alg_ops[2]] = [1, 2, 4, 5, 6, 7, 11, 12, 13, 22] - broken_tests[alg_ops[3]] = [1, 2, 4, 5, 6, 8, 11, 12, 13, 22] test_on_library(problems, dicts, alg_ops, broken_tests) end -=# - -# NOTE: Not adding LimitedMemoryBroyden here since it fails on most of the preoblems From 1caff1093aee246003c4ffacaaf024bc87db0809 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Sat, 28 Oct 2023 13:52:15 -0400 Subject: [PATCH 09/28] Fix tests --- test/basictests.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/basictests.jl b/test/basictests.jl index eaa48d05e..ca033ef83 100644 --- a/test/basictests.jl +++ b/test/basictests.jl @@ -470,7 +470,7 @@ end end @testset "[OOP] [Immutable AD]" begin - broken_forwarddiff = [2.9, 3.0, 4.0, 81.0] + broken_forwarddiff = [3.0, 4.0, 81.0] for p in 1.1:0.1:100.0 res = abs.(benchmark_nlsolve_oop(quadratic_f, @SVector[1.0, 1.0], p).u) @@ -490,7 +490,7 @@ end end @testset "[OOP] [Scalar AD]" begin - broken_forwarddiff = [1.6, 2.9, 3.0, 3.5, 4.0, 81.0] + broken_forwarddiff = [3.0, 4.0, 81.0] for p in 1.1:0.1:100.0 res = abs(benchmark_nlsolve_oop(quadratic_f, 1.0, p).u) @@ -831,7 +831,7 @@ end sol = benchmark_nlsolve_oop(quadratic_f, u0; linesearch) # Some are failing by a margin # @test SciMLBase.successful_retcode(sol) - @test all(abs.(sol.u .* sol.u .- 2) .< 1e-9) + @test all(abs.(sol.u .* sol.u .- 2) .< 3e-9) cache = init(NonlinearProblem{false}(quadratic_f, u0, 2.0), GeneralKlement(; linesearch), abstol = 1e-9) From a24f20e56a23aa5c5b042a0b1489905055dadd94 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Sat, 28 Oct 2023 14:20:42 -0400 Subject: [PATCH 10/28] Specialize on functions --- src/jacobian.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jacobian.jl b/src/jacobian.jl index 676678bb2..b72cc04b0 100644 --- a/src/jacobian.jl +++ b/src/jacobian.jl @@ -49,9 +49,9 @@ end jacobian!!(::Number, cache) = last(value_derivative(cache.uf, cache.u)) # Build Jacobian Caches -function jacobian_caches(alg::AbstractNonlinearSolveAlgorithm, f, u, p, ::Val{iip}; +function jacobian_caches(alg::AbstractNonlinearSolveAlgorithm, f::F, u, p, ::Val{iip}; linsolve_kwargs = (;), lininit::Val{linsolve_init} = Val(true), - linsolve_with_JᵀJ::Val{needsJᵀJ} = Val(false)) where {iip, needsJᵀJ, linsolve_init} + linsolve_with_JᵀJ::Val{needsJᵀJ} = Val(false)) where {iip, needsJᵀJ, linsolve_init, F} uf = JacobianWrapper{iip}(f, p) haslinsolve = hasfield(typeof(alg), :linsolve) @@ -135,9 +135,9 @@ __maybe_symmetric(x::StaticArray) = x __maybe_symmetric(x::SparseArrays.AbstractSparseMatrix) = x ## Special Handling for Scalars -function jacobian_caches(alg::AbstractNonlinearSolveAlgorithm, f, u::Number, p, +function jacobian_caches(alg::AbstractNonlinearSolveAlgorithm, f::F, u::Number, p, ::Val{false}; linsolve_with_JᵀJ::Val{needsJᵀJ} = Val(false), - kwargs...) where {needsJᵀJ} + kwargs...) where {needsJᵀJ, F} # NOTE: Scalar `u` assumes scalar output from `f` uf = JacobianWrapper{false}(f, p) needsJᵀJ && return uf, nothing, u, nothing, nothing, u, u, u From 59c988e43187accbc1f4fa01e0a0348cdd2c366f Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Sat, 28 Oct 2023 15:22:13 -0400 Subject: [PATCH 11/28] Short circuit linesearch for now --- src/linesearch.jl | 26 ++++++++++++++++++-------- src/utils.jl | 2 +- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/linesearch.jl b/src/linesearch.jl index 608bc6cff..0d37dc222 100644 --- a/src/linesearch.jl +++ b/src/linesearch.jl @@ -8,7 +8,7 @@ differentiation for fast Vector Jacobian Products. ### Arguments - - `method`: the line search algorithm to use. Defaults to `Static()`, which means that the + - `method`: the line search algorithm to use. Defaults to `nothing`, which means that the step size is fixed to the value of `alpha`. - `autodiff`: the automatic differentiation backend to use for the line search. Defaults to `AutoFiniteDiff()`, which means that finite differencing is used to compute the VJP. @@ -22,7 +22,7 @@ differentiation for fast Vector Jacobian Products. α end -function LineSearch(; method = Static(), autodiff = AutoFiniteDiff(), alpha = true) +function LineSearch(; method = nothing, autodiff = AutoFiniteDiff(), alpha = true) return LineSearch(method, autodiff, alpha) end @@ -30,11 +30,23 @@ end return init_linesearch_cache(ls.method, ls, args...) end +@concrete struct NoLineSearchCache + α +end + +function init_linesearch_cache(::Nothing, ls, f::F, u, p, fu, iip) where {F} + return NoLineSearchCache(convert(eltype(u), ls.α)) +end + +perform_linesearch!(cache::NoLineSearchCache, u, du) = cache.α + # LineSearches.jl doesn't have a supertype so default to that -function init_linesearch_cache(_, ls, f::F, u, p, fu, iip) where {F <: Function} +function init_linesearch_cache(_, ls, f::F, u, p, fu, iip) where {F} return LineSearchesJLCache(ls, f, u, p, fu, iip) end +# FIXME: The closures lead to too many unnecessary runtime dispatches which leads to the +# massive increase in precompilation times. # Wrapper over LineSearches.jl algorithms @concrete mutable struct LineSearchesJLCache f @@ -45,8 +57,7 @@ end ls end -function LineSearchesJLCache(ls::LineSearch, f::F, u::Number, p, _, - ::Val{false}) where {F <: Function} +function LineSearchesJLCache(ls::LineSearch, f::F, u::Number, p, _, ::Val{false}) where {F} eval_f(u, du, α) = eval_f(u - α * du) eval_f(u) = f(u, p) @@ -87,8 +98,7 @@ function LineSearchesJLCache(ls::LineSearch, f::F, u::Number, p, _, return LineSearchesJLCache(eval_f, ϕ, dϕ, ϕdϕ, convert(eltype(u), ls.α), ls) end -function LineSearchesJLCache(ls::LineSearch, f::F, u, p, fu1, - IIP::Val{iip}) where {iip, F <: Function} +function LineSearchesJLCache(ls::LineSearch, f::F, u, p, fu1, IIP::Val{iip}) where {iip, F} fu = iip ? deepcopy(fu1) : nothing u_ = _mutable_zero(u) @@ -202,7 +212,7 @@ end end function init_linesearch_cache(alg::LiFukushimaLineSearch, ls::LineSearch, f::F, _u, p, _fu, - ::Val{iip}) where {iip, F <: Function} + ::Val{iip}) where {iip, F} fu = iip ? deepcopy(_fu) : nothing u = iip ? deepcopy(_u) : nothing return LiFukushimaLineSearchCache{iip}(f, p, u, fu, alg, ls.α) diff --git a/src/utils.jl b/src/utils.jl index 9349c2505..424163604 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -216,7 +216,7 @@ function __get_concrete_algorithm(alg, prob) use_sparse_ad ? AutoSparseFiniteDiff() : AutoFiniteDiff() else tag = NonlinearSolveTag() - use_sparse_ad ? AutoSparseForwardDiff(; tag) : AutoForwardDiff(; tag) + (use_sparse_ad ? AutoSparseForwardDiff : AutoForwardDiff)(; tag) end return set_ad(alg, ad) end From 49de475340a0794c1366ba81ecdd83ca54dbbdd8 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Sun, 29 Oct 2023 09:38:42 -0400 Subject: [PATCH 12/28] Incorrect tag being passed --- src/utils.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils.jl b/src/utils.jl index 424163604..8fd896848 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -21,6 +21,8 @@ function __findmin(f, x) end end +struct NonlinearSolveTag end + """ default_adargs_to_adtype(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(), diff_type = Val{:forward}) @@ -53,7 +55,7 @@ function default_adargs_to_adtype(; chunk_size = missing, autodiff = nothing, autodiff === missing && (autodiff = Val{true}()) ad = _unwrap_val(autodiff) - tag = _unwrap_val(standardtag) + tag = _unwrap_val(standardtag) ? NonlinearSolveTag() : nothing ad && return AutoForwardDiff{_unwrap_val(chunk_size), typeof(tag)}(tag) return AutoFiniteDiff(; fdtype = diff_type) end @@ -206,8 +208,6 @@ function get_concrete_algorithm(alg, prob) return __get_concrete_algorithm(alg, prob) end -struct NonlinearSolveTag end - function __get_concrete_algorithm(alg, prob) @unpack sparsity, jac_prototype = prob.f use_sparse_ad = sparsity !== nothing || jac_prototype !== nothing From b36a46b751cc1dc55306ade87a3dec929fe7a924 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Sun, 29 Oct 2023 20:31:01 -0400 Subject: [PATCH 13/28] Fix tag --- src/utils.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils.jl b/src/utils.jl index 8fd896848..3707857f6 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -55,8 +55,8 @@ function default_adargs_to_adtype(; chunk_size = missing, autodiff = nothing, autodiff === missing && (autodiff = Val{true}()) ad = _unwrap_val(autodiff) - tag = _unwrap_val(standardtag) ? NonlinearSolveTag() : nothing - ad && return AutoForwardDiff{_unwrap_val(chunk_size), typeof(tag)}(tag) + # We don't really know the typeof the input yet, so we can't use the correct tag! + ad && return AutoForwardDiff{_unwrap_val(chunk_size), Nothing}(nothing) return AutoFiniteDiff(; fdtype = diff_type) end @@ -215,7 +215,7 @@ function __get_concrete_algorithm(alg, prob) # Use Finite Differencing use_sparse_ad ? AutoSparseFiniteDiff() : AutoFiniteDiff() else - tag = NonlinearSolveTag() + tag = ForwardDiff.Tag(NonlinearSolveTag(), eltype(prob.u0)) (use_sparse_ad ? AutoSparseForwardDiff : AutoForwardDiff)(; tag) end return set_ad(alg, ad) From 12d9743e7be3ba008e3d59c30b0d2c8004a27c98 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Sun, 29 Oct 2023 20:59:40 -0400 Subject: [PATCH 14/28] Run formatter --- ...NonlinearSolveFastLevenbergMarquardtExt.jl | 4 ++-- ext/NonlinearSolveLeastSquaresOptimExt.jl | 2 +- src/NonlinearSolve.jl | 2 +- src/ad.jl | 12 +++++----- src/broyden.jl | 14 +++++------ src/default.jl | 22 ++++++++--------- src/dfsane.jl | 16 ++++++------- src/extension_algs.jl | 4 ++-- src/gaussnewton.jl | 14 +++++------ src/jacobian.jl | 8 +++---- src/klement.jl | 14 +++++------ src/lbroyden.jl | 14 +++++------ src/levenberg.jl | 17 ++++++------- src/linesearch.jl | 4 ++-- src/pseudotransient.jl | 16 ++++++------- src/raphson.jl | 14 +++++------ src/trustRegion.jl | 24 +++++++++---------- src/utils.jl | 4 ++-- test/basictests.jl | 4 ++-- 19 files changed, 105 insertions(+), 104 deletions(-) diff --git a/ext/NonlinearSolveFastLevenbergMarquardtExt.jl b/ext/NonlinearSolveFastLevenbergMarquardtExt.jl index 4a096747d..08d719f96 100644 --- a/ext/NonlinearSolveFastLevenbergMarquardtExt.jl +++ b/ext/NonlinearSolveFastLevenbergMarquardtExt.jl @@ -32,8 +32,8 @@ end (f::InplaceFunction{false})(fx, x, p) = (fx .= f.f(x, p)) function SciMLBase.__init(prob::NonlinearLeastSquaresProblem, - alg::FastLevenbergMarquardtJL, args...; abstol = 1e-8, reltol = 1e-8, - verbose = false, maxiters = 1000, kwargs...) + alg::FastLevenbergMarquardtJL, args...; abstol = 1e-8, reltol = 1e-8, + verbose = false, maxiters = 1000, kwargs...) iip = SciMLBase.isinplace(prob) @assert prob.f.jac!==nothing "FastLevenbergMarquardt requires a Jacobian!" diff --git a/ext/NonlinearSolveLeastSquaresOptimExt.jl b/ext/NonlinearSolveLeastSquaresOptimExt.jl index e1f3cdfb7..5cf6ab67d 100644 --- a/ext/NonlinearSolveLeastSquaresOptimExt.jl +++ b/ext/NonlinearSolveLeastSquaresOptimExt.jl @@ -33,7 +33,7 @@ end (f::FunctionWrapper{false})(du, u) = (du .= f.f(u, f.p)) function SciMLBase.__init(prob::NonlinearLeastSquaresProblem, alg::LeastSquaresOptimJL, - args...; abstol = 1e-8, reltol = 1e-8, verbose = false, maxiters = 1000, kwargs...) + args...; abstol = 1e-8, reltol = 1e-8, verbose = false, maxiters = 1000, kwargs...) iip = SciMLBase.isinplace(prob) f! = FunctionWrapper{iip}(prob.f, prob.p) diff --git a/src/NonlinearSolve.jl b/src/NonlinearSolve.jl index 0f8626314..64bd0a62c 100644 --- a/src/NonlinearSolve.jl +++ b/src/NonlinearSolve.jl @@ -44,7 +44,7 @@ abstract type AbstractNonlinearSolveCache{iip} end isinplace(::AbstractNonlinearSolveCache{iip}) where {iip} = iip function SciMLBase.__solve(prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem}, - alg::AbstractNonlinearSolveAlgorithm, args...; kwargs...) + alg::AbstractNonlinearSolveAlgorithm, args...; kwargs...) cache = init(prob, alg, args...; kwargs...) return solve!(cache) end diff --git a/src/ad.jl b/src/ad.jl index 1af781e21..c54daa939 100644 --- a/src/ad.jl +++ b/src/ad.jl @@ -26,16 +26,16 @@ function scalar_nlsolve_ad(prob, alg, args...; kwargs...) end function SciMLBase.solve(prob::NonlinearProblem{<:Union{Number, SVector, <:AbstractArray}, - false, <:Dual{T, V, P}}, alg::AbstractNewtonAlgorithm, args...; - kwargs...) where {T, V, P} + false, <:Dual{T, V, P}}, alg::AbstractNewtonAlgorithm, args...; + kwargs...) where {T, V, P} sol, partials = scalar_nlsolve_ad(prob, alg, args...; kwargs...) dual_soln = scalar_nlsolve_dual_soln(sol.u, partials, prob.p) return SciMLBase.build_solution(prob, alg, dual_soln, sol.resid; sol.retcode) end function SciMLBase.solve(prob::NonlinearProblem{<:Union{Number, SVector, <:AbstractArray}, - false, <:AbstractArray{<:Dual{T, V, P}}}, alg::AbstractNewtonAlgorithm, args...; - kwargs...) where {T, V, P} + false, <:AbstractArray{<:Dual{T, V, P}}}, alg::AbstractNewtonAlgorithm, args...; + kwargs...) where {T, V, P} sol, partials = scalar_nlsolve_ad(prob, alg, args...; kwargs...) dual_soln = scalar_nlsolve_dual_soln(sol.u, partials, prob.p) return SciMLBase.build_solution(prob, alg, dual_soln, sol.resid; sol.retcode) @@ -53,11 +53,11 @@ function scalar_nlsolve_∂f_∂u(f, u, p) end function scalar_nlsolve_dual_soln(u::Number, partials, - ::Union{<:AbstractArray{<:Dual{T, V, P}}, Dual{T, V, P}}) where {T, V, P} + ::Union{<:AbstractArray{<:Dual{T, V, P}}, Dual{T, V, P}}) where {T, V, P} return Dual{T, V, P}(u, partials) end function scalar_nlsolve_dual_soln(u::AbstractArray, partials, - ::Union{<:AbstractArray{<:Dual{T, V, P}}, Dual{T, V, P}}) where {T, V, P} + ::Union{<:AbstractArray{<:Dual{T, V, P}}, Dual{T, V, P}}) where {T, V, P} return map(((uᵢ, pᵢ),) -> Dual{T, V, P}(uᵢ, pᵢ), zip(u, partials)) end diff --git a/src/broyden.jl b/src/broyden.jl index a5b5e7f3d..b728c6944 100644 --- a/src/broyden.jl +++ b/src/broyden.jl @@ -22,7 +22,7 @@ An implementation of `Broyden` with reseting and line search. end function GeneralBroyden(; max_resets = 3, linesearch = LineSearch(), - reset_tolerance = nothing) + reset_tolerance = nothing) linesearch = linesearch isa LineSearch ? linesearch : LineSearch(; method = linesearch) return GeneralBroyden(max_resets, reset_tolerance, linesearch) end @@ -60,9 +60,9 @@ end get_fu(cache::GeneralBroydenCache) = cache.fu function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::GeneralBroyden, args...; - alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, - termination_condition = nothing, internalnorm::F = DEFAULT_NORM, - kwargs...) where {uType, iip, F} + alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, + termination_condition = nothing, internalnorm::F = DEFAULT_NORM, + kwargs...) where {uType, iip, F} @unpack f, u0, p = prob u = alias_u0 ? u0 : deepcopy(u0) fu = evaluate_f(prob, u) @@ -172,9 +172,9 @@ function perform_step!(cache::GeneralBroydenCache{false}) end function SciMLBase.reinit!(cache::GeneralBroydenCache{iip}, u0 = cache.u; p = cache.p, - abstol = cache.abstol, reltol = cache.reltol, - termination_condition = cache.termination_condition, - maxiters = cache.maxiters) where {iip} + abstol = cache.abstol, reltol = cache.reltol, + termination_condition = cache.termination_condition, + maxiters = cache.maxiters) where {iip} cache.p = p if iip recursivecopy!(cache.u, u0) diff --git a/src/default.jl b/src/default.jl index 1c992a527..178d72f1c 100644 --- a/src/default.jl +++ b/src/default.jl @@ -42,7 +42,7 @@ end const Robusters = RobustMultiNewton function RobustMultiNewton(; concrete_jac = nothing, linsolve = nothing, - precs = DEFAULT_PRECS, adkwargs...) + precs = DEFAULT_PRECS, adkwargs...) return RobustMultiNewton{_unwrap_val(concrete_jac)}(adkwargs, linsolve, precs) end @@ -53,7 +53,7 @@ end end function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::RobustMultiNewton, - args...; kwargs...) where {uType, iip} + args...; kwargs...) where {uType, iip} @unpack adkwargs, linsolve, precs = alg algs = (TrustRegion(; linsolve, precs, adkwargs...), @@ -105,7 +105,7 @@ for more performance and then tries more robust techniques if the faster ones fa end function FastShortcutNonlinearPolyalg(; concrete_jac = nothing, linsolve = nothing, - precs = DEFAULT_PRECS, adkwargs...) + precs = DEFAULT_PRECS, adkwargs...) return FastShortcutNonlinearPolyalg{_unwrap_val(concrete_jac)}(adkwargs, linsolve, precs) end @@ -118,13 +118,13 @@ end end function FastShortcutNonlinearPolyalgCache(; concrete_jac = nothing, linsolve = nothing, - precs = DEFAULT_PRECS, adkwargs...) + precs = DEFAULT_PRECS, adkwargs...) return FastShortcutNonlinearPolyalgCache{_unwrap_val(concrete_jac)}(adkwargs, linsolve, precs) end function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, - alg::FastShortcutNonlinearPolyalg, args...; kwargs...) where {uType, iip} + alg::FastShortcutNonlinearPolyalg, args...; kwargs...) where {uType, iip} @unpack adkwargs, linsolve, precs = alg algs = (GeneralKlement(; linsolve, precs), @@ -141,8 +141,8 @@ end # This version doesn't allocate all the caches! @generated function SciMLBase.__solve(prob::NonlinearProblem{uType, iip}, - alg::Union{FastShortcutNonlinearPolyalg, RobustMultiNewton}, args...; - kwargs...) where {uType, iip} + alg::Union{FastShortcutNonlinearPolyalg, RobustMultiNewton}, args...; + kwargs...) where {uType, iip} calls = [:(@unpack adkwargs, linsolve, precs = alg)] algs = if parameterless_type(alg) == RobustMultiNewton @@ -210,7 +210,7 @@ end ## General shared polyalg functions @generated function SciMLBase.solve!(cache::Union{RobustMultiNewtonCache{iip, N}, - FastShortcutNonlinearPolyalgCache{iip, N}}) where {iip, N} + FastShortcutNonlinearPolyalgCache{iip, N}}) where {iip, N} calls = [ quote 1 ≤ cache.current ≤ length(cache.caches) || @@ -260,7 +260,7 @@ end end function SciMLBase.reinit!(cache::Union{RobustMultiNewtonCache, - FastShortcutNonlinearPolyalgCache}, args...; kwargs...) + FastShortcutNonlinearPolyalgCache}, args...; kwargs...) for c in cache.caches SciMLBase.reinit!(c, args...; kwargs...) end @@ -269,11 +269,11 @@ end ## Defaults function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::Nothing, args...; - kwargs...) where {uType, iip} + kwargs...) where {uType, iip} SciMLBase.__init(prob, FastShortcutNonlinearPolyalg(), args...; kwargs...) end function SciMLBase.__solve(prob::NonlinearProblem{uType, iip}, alg::Nothing, args...; - kwargs...) where {uType, iip} + kwargs...) where {uType, iip} SciMLBase.__solve(prob, FastShortcutNonlinearPolyalg(), args...; kwargs...) end diff --git a/src/dfsane.jl b/src/dfsane.jl index e567816f4..727a49248 100644 --- a/src/dfsane.jl +++ b/src/dfsane.jl @@ -57,8 +57,8 @@ struct DFSane{T, F} <: AbstractNonlinearSolveAlgorithm end function DFSane(; σ_min = 1e-10, σ_max = 1e+10, σ_1 = 1.0, M = 10, γ = 1e-4, τ_min = 0.1, - τ_max = 0.5, n_exp = 2, η_strategy = (fn_1, n, x_n, f_n) -> fn_1 / n^2, - max_inner_iterations = 1000) + τ_max = 0.5, n_exp = 2, η_strategy = (fn_1, n, x_n, f_n) -> fn_1 / n^2, + max_inner_iterations = 1000) return DFSane{typeof(σ_min), typeof(η_strategy)}(σ_min, σ_max, σ_1, M, γ, τ_min, τ_max, n_exp, η_strategy, max_inner_iterations) end @@ -96,9 +96,9 @@ end end function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::DFSane, args...; - alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, - termination_condition = nothing, internalnorm::F = DEFAULT_NORM, - kwargs...) where {uType, iip, F} + alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, + termination_condition = nothing, internalnorm::F = DEFAULT_NORM, + kwargs...) where {uType, iip, F} uₙ = alias_u0 ? prob.u0 : deepcopy(prob.u0) p = prob.p @@ -307,9 +307,9 @@ function SciMLBase.solve!(cache::DFSaneCache) end function SciMLBase.reinit!(cache::DFSaneCache{iip}, u0 = cache.uₙ; p = cache.p, - abstol = cache.abstol, reltol = cache.reltol, - termination_condition = cache.termination_condition, - maxiters = cache.maxiters) where {iip} + abstol = cache.abstol, reltol = cache.reltol, + termination_condition = cache.termination_condition, + maxiters = cache.maxiters) where {iip} cache.p = p if iip recursivecopy!(cache.uₙ, u0) diff --git a/src/extension_algs.jl b/src/extension_algs.jl index 6038a7623..c4e56b6a5 100644 --- a/src/extension_algs.jl +++ b/src/extension_algs.jl @@ -65,8 +65,8 @@ Wrapper over [FastLevenbergMarquardt.jl](https://github.com/kamesy/FastLevenberg end function FastLevenbergMarquardtJL(linsolve::Symbol = :cholesky; factor = 1e-6, - factoraccept = 13.0, factorreject = 3.0, factorupdate = :marquardt, - minscale = 1e-12, maxscale = 1e16, minfactor = 1e-28, maxfactor = 1e32) + factoraccept = 13.0, factorreject = 3.0, factorupdate = :marquardt, + minscale = 1e-12, maxscale = 1e16, minfactor = 1e-28, maxfactor = 1e32) @assert linsolve in (:qr, :cholesky) @assert factorupdate in (:marquardt, :nielson) diff --git a/src/gaussnewton.jl b/src/gaussnewton.jl index 99526b937..89401fab4 100644 --- a/src/gaussnewton.jl +++ b/src/gaussnewton.jl @@ -47,7 +47,7 @@ function set_ad(alg::GaussNewton{CJ}, ad) where {CJ} end function GaussNewton(; concrete_jac = nothing, linsolve = nothing, - precs = DEFAULT_PRECS, adkwargs...) + precs = DEFAULT_PRECS, adkwargs...) ad = default_adargs_to_adtype(; adkwargs...) return GaussNewton{_unwrap_val(concrete_jac)}(ad, linsolve, precs) end @@ -81,9 +81,9 @@ end end function SciMLBase.__init(prob::NonlinearLeastSquaresProblem{uType, iip}, alg_::GaussNewton, - args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, - termination_condition = nothing, internalnorm::F = DEFAULT_NORM, - kwargs...) where {uType, iip, F} + args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, + termination_condition = nothing, internalnorm::F = DEFAULT_NORM, + kwargs...) where {uType, iip, F} alg = get_concrete_algorithm(alg_, prob) @unpack f, u0, p = prob @@ -192,9 +192,9 @@ function perform_step!(cache::GaussNewtonCache{false}) end function SciMLBase.reinit!(cache::GaussNewtonCache{iip}, u0 = cache.u; p = cache.p, - abstol = cache.abstol, reltol = cache.reltol, - termination_condition = cache.termination_condition, - maxiters = cache.maxiters) where {iip} + abstol = cache.abstol, reltol = cache.reltol, + termination_condition = cache.termination_condition, + maxiters = cache.maxiters) where {iip} cache.p = p if iip recursivecopy!(cache.u, u0) diff --git a/src/jacobian.jl b/src/jacobian.jl index b72cc04b0..41df3c092 100644 --- a/src/jacobian.jl +++ b/src/jacobian.jl @@ -50,8 +50,8 @@ jacobian!!(::Number, cache) = last(value_derivative(cache.uf, cache.u)) # Build Jacobian Caches function jacobian_caches(alg::AbstractNonlinearSolveAlgorithm, f::F, u, p, ::Val{iip}; - linsolve_kwargs = (;), lininit::Val{linsolve_init} = Val(true), - linsolve_with_JᵀJ::Val{needsJᵀJ} = Val(false)) where {iip, needsJᵀJ, linsolve_init, F} + linsolve_kwargs = (;), lininit::Val{linsolve_init} = Val(true), + linsolve_with_JᵀJ::Val{needsJᵀJ} = Val(false)) where {iip, needsJᵀJ, linsolve_init, F} uf = JacobianWrapper{iip}(f, p) haslinsolve = hasfield(typeof(alg), :linsolve) @@ -136,8 +136,8 @@ __maybe_symmetric(x::SparseArrays.AbstractSparseMatrix) = x ## Special Handling for Scalars function jacobian_caches(alg::AbstractNonlinearSolveAlgorithm, f::F, u::Number, p, - ::Val{false}; linsolve_with_JᵀJ::Val{needsJᵀJ} = Val(false), - kwargs...) where {needsJᵀJ, F} + ::Val{false}; linsolve_with_JᵀJ::Val{needsJᵀJ} = Val(false), + kwargs...) where {needsJᵀJ, F} # NOTE: Scalar `u` assumes scalar output from `f` uf = JacobianWrapper{false}(f, p) needsJᵀJ && return uf, nothing, u, nothing, nothing, u, u, u diff --git a/src/klement.jl b/src/klement.jl index 17334e2ba..10c83c775 100644 --- a/src/klement.jl +++ b/src/klement.jl @@ -32,7 +32,7 @@ function set_linsolve(alg::GeneralKlement, linsolve) end function GeneralKlement(; max_resets::Int = 5, linsolve = nothing, - linesearch = LineSearch(), precs = DEFAULT_PRECS) + linesearch = LineSearch(), precs = DEFAULT_PRECS) linesearch = linesearch isa LineSearch ? linesearch : LineSearch(; method = linesearch) return GeneralKlement(max_resets, linsolve, precs, linesearch) end @@ -69,9 +69,9 @@ end get_fu(cache::GeneralKlementCache) = cache.fu function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::GeneralKlement, args...; - alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, - termination_condition = nothing, internalnorm::F = DEFAULT_NORM, - linsolve_kwargs = (;), kwargs...) where {uType, iip, F} + alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, + termination_condition = nothing, internalnorm::F = DEFAULT_NORM, + linsolve_kwargs = (;), kwargs...) where {uType, iip, F} @unpack f, u0, p = prob u = alias_u0 ? u0 : deepcopy(u0) fu = evaluate_f(prob, u) @@ -225,9 +225,9 @@ function perform_step!(cache::GeneralKlementCache{false}) end function SciMLBase.reinit!(cache::GeneralKlementCache{iip}, u0 = cache.u; p = cache.p, - abstol = cache.abstol, reltol = cache.reltol, - termination_condition = cache.termination_condition, - maxiters = cache.maxiters) where {iip} + abstol = cache.abstol, reltol = cache.reltol, + termination_condition = cache.termination_condition, + maxiters = cache.maxiters) where {iip} cache.p = p if iip recursivecopy!(cache.u, u0) diff --git a/src/lbroyden.jl b/src/lbroyden.jl index 72dc48b94..81c6a19c0 100644 --- a/src/lbroyden.jl +++ b/src/lbroyden.jl @@ -25,7 +25,7 @@ An implementation of `LimitedMemoryBroyden` with reseting and line search. end function LimitedMemoryBroyden(; max_resets::Int = 3, linesearch = LineSearch(), - threshold::Int = 27, reset_tolerance = nothing) + threshold::Int = 27, reset_tolerance = nothing) linesearch = linesearch isa LineSearch ? linesearch : LineSearch(; method = linesearch) return LimitedMemoryBroyden(max_resets, threshold, linesearch, reset_tolerance) end @@ -67,9 +67,9 @@ end get_fu(cache::LimitedMemoryBroydenCache) = cache.fu function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::LimitedMemoryBroyden, - args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, - termination_condition = nothing, internalnorm::F = DEFAULT_NORM, - kwargs...) where {uType, iip, F} + args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, + termination_condition = nothing, internalnorm::F = DEFAULT_NORM, + kwargs...) where {uType, iip, F} @unpack f, u0, p = prob u = alias_u0 ? u0 : deepcopy(u0) if u isa Number @@ -225,7 +225,7 @@ function perform_step!(cache::LimitedMemoryBroydenCache{false}) end function SciMLBase.reinit!(cache::LimitedMemoryBroydenCache{iip}, u0 = cache.u; p = cache.p, - abstol = cache.abstol, maxiters = cache.maxiters) where {iip} + abstol = cache.abstol, maxiters = cache.maxiters) where {iip} cache.p = p if iip recursivecopy!(cache.u, u0) @@ -247,7 +247,7 @@ function SciMLBase.reinit!(cache::LimitedMemoryBroydenCache{iip}, u0 = cache.u; end @views function __lbroyden_matvec!(y::AbstractVector, Ux::AbstractVector, - U::AbstractMatrix, Vᵀ::AbstractMatrix, x::AbstractVector) + U::AbstractMatrix, Vᵀ::AbstractMatrix, x::AbstractVector) # Computes Vᵀ × U × x η = size(U, 1) if η == 0 @@ -266,7 +266,7 @@ end end @views function __lbroyden_rmatvec!(y::AbstractVector, xᵀVᵀ::AbstractMatrix, - U::AbstractMatrix, Vᵀ::AbstractMatrix, x::AbstractVector) + U::AbstractMatrix, Vᵀ::AbstractMatrix, x::AbstractVector) # Computes xᵀ × Vᵀ × U η = size(U, 1) if η == 0 diff --git a/src/levenberg.jl b/src/levenberg.jl index ffdb3b763..3c0dfe95b 100644 --- a/src/levenberg.jl +++ b/src/levenberg.jl @@ -100,10 +100,11 @@ function set_ad(alg::LevenbergMarquardt{CJ}, ad) where {CJ} end function LevenbergMarquardt(; concrete_jac = nothing, linsolve = nothing, - precs = DEFAULT_PRECS, damping_initial::Real = 1.0, damping_increase_factor::Real = 2.0, - damping_decrease_factor::Real = 3.0, finite_diff_step_geodesic::Real = 0.1, - α_geodesic::Real = 0.75, b_uphill::Real = 1.0, min_damping_D::AbstractFloat = 1e-8, - adkwargs...) + precs = DEFAULT_PRECS, damping_initial::Real = 1.0, + damping_increase_factor::Real = 2.0, + damping_decrease_factor::Real = 3.0, finite_diff_step_geodesic::Real = 0.1, + α_geodesic::Real = 0.75, b_uphill::Real = 1.0, min_damping_D::AbstractFloat = 1e-8, + adkwargs...) ad = default_adargs_to_adtype(; adkwargs...) return LevenbergMarquardt{_unwrap_val(concrete_jac)}(ad, linsolve, precs, damping_initial, damping_increase_factor, damping_decrease_factor, @@ -161,10 +162,10 @@ end end function SciMLBase.__init(prob::Union{NonlinearProblem{uType, iip}, - NonlinearLeastSquaresProblem{uType, iip}}, alg_::LevenbergMarquardt, - args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, - termination_condition = nothing, internalnorm::F = DEFAULT_NORM, - linsolve_kwargs = (;), kwargs...) where {uType, iip, F} + NonlinearLeastSquaresProblem{uType, iip}}, alg_::LevenbergMarquardt, + args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, + termination_condition = nothing, internalnorm::F = DEFAULT_NORM, + linsolve_kwargs = (;), kwargs...) where {uType, iip, F} alg = get_concrete_algorithm(alg_, prob) @unpack f, u0, p = prob u = alias_u0 ? u0 : deepcopy(u0) diff --git a/src/linesearch.jl b/src/linesearch.jl index 0d37dc222..272d8b7cf 100644 --- a/src/linesearch.jl +++ b/src/linesearch.jl @@ -195,7 +195,7 @@ struct LiFukushimaLineSearch{T} <: AbstractNonlinearSolveLineSearchAlgorithm end function LiFukushimaLineSearch(; lambda_0 = 1.0, beta = 0.1, sigma_1 = 0.001, - sigma_2 = 0.001, eta = 0.1, rho = 0.9, nan_max_iter = 5, maxiters = 50) + sigma_2 = 0.001, eta = 0.1, rho = 0.9, nan_max_iter = 5, maxiters = 50) T = promote_type(typeof(lambda_0), typeof(beta), typeof(sigma_1), typeof(eta), typeof(rho), typeof(sigma_2)) return LiFukushimaLineSearch{T}(lambda_0, beta, sigma_1, sigma_2, eta, rho, @@ -212,7 +212,7 @@ end end function init_linesearch_cache(alg::LiFukushimaLineSearch, ls::LineSearch, f::F, _u, p, _fu, - ::Val{iip}) where {iip, F} + ::Val{iip}) where {iip, F} fu = iip ? deepcopy(_fu) : nothing u = iip ? deepcopy(_u) : nothing return LiFukushimaLineSearchCache{iip}(f, p, u, fu, alg, ls.α) diff --git a/src/pseudotransient.jl b/src/pseudotransient.jl index c487fc0b3..1c5691699 100644 --- a/src/pseudotransient.jl +++ b/src/pseudotransient.jl @@ -46,7 +46,7 @@ function set_ad(alg::PseudoTransient{CJ}, ad) where {CJ} end function PseudoTransient(; concrete_jac = nothing, linsolve = nothing, - precs = DEFAULT_PRECS, alpha_initial = 1e-3, adkwargs...) + precs = DEFAULT_PRECS, alpha_initial = 1e-3, adkwargs...) ad = default_adargs_to_adtype(; adkwargs...) return PseudoTransient{_unwrap_val(concrete_jac)}(ad, linsolve, precs, alpha_initial) end @@ -79,9 +79,9 @@ end end function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::PseudoTransient, - args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, - termination_condition = nothing, internalnorm = DEFAULT_NORM, - linsolve_kwargs = (;), kwargs...) where {uType, iip} + args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, + termination_condition = nothing, internalnorm = DEFAULT_NORM, + linsolve_kwargs = (;), kwargs...) where {uType, iip} alg = get_concrete_algorithm(alg_, prob) @unpack f, u0, p = prob @@ -182,10 +182,10 @@ function perform_step!(cache::PseudoTransientCache{false}) end function SciMLBase.reinit!(cache::PseudoTransientCache{iip}, u0 = cache.u; p = cache.p, - alpha_new, - abstol = cache.abstol, reltol = cache.reltol, - termination_condition = cache.termination_condition, - maxiters = cache.maxiters) where {iip} + alpha_new, + abstol = cache.abstol, reltol = cache.reltol, + termination_condition = cache.termination_condition, + maxiters = cache.maxiters) where {iip} cache.p = p if iip recursivecopy!(cache.u, u0) diff --git a/src/raphson.jl b/src/raphson.jl index 22893f21f..00338ccc0 100644 --- a/src/raphson.jl +++ b/src/raphson.jl @@ -43,7 +43,7 @@ function set_ad(alg::NewtonRaphson{CJ}, ad) where {CJ} end function NewtonRaphson(; concrete_jac = nothing, linsolve = nothing, - linesearch = LineSearch(), precs = DEFAULT_PRECS, adkwargs...) + linesearch = LineSearch(), precs = DEFAULT_PRECS, adkwargs...) ad = default_adargs_to_adtype(; adkwargs...) linesearch = linesearch isa LineSearch ? linesearch : LineSearch(; method = linesearch) return NewtonRaphson{_unwrap_val(concrete_jac)}(ad, linsolve, precs, linesearch) @@ -76,9 +76,9 @@ end end function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::NewtonRaphson, args...; - alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, - termination_condition = nothing, internalnorm = DEFAULT_NORM, - linsolve_kwargs = (;), kwargs...) where {uType, iip} + alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, + termination_condition = nothing, internalnorm = DEFAULT_NORM, + linsolve_kwargs = (;), kwargs...) where {uType, iip} alg = get_concrete_algorithm(alg_, prob) @unpack f, u0, p = prob u = alias_u0 ? u0 : deepcopy(u0) @@ -160,9 +160,9 @@ function perform_step!(cache::NewtonRaphsonCache{false}) end function SciMLBase.reinit!(cache::NewtonRaphsonCache{iip}, u0 = cache.u; p = cache.p, - abstol = cache.abstol, reltol = cache.reltol, - termination_condition = cache.termination_condition, - maxiters = cache.maxiters) where {iip} + abstol = cache.abstol, reltol = cache.reltol, + termination_condition = cache.termination_condition, + maxiters = cache.maxiters) where {iip} cache.p = p if iip recursivecopy!(cache.u, u0) diff --git a/src/trustRegion.jl b/src/trustRegion.jl index a8db99440..789516847 100644 --- a/src/trustRegion.jl +++ b/src/trustRegion.jl @@ -166,11 +166,11 @@ function set_ad(alg::TrustRegion{CJ}, ad) where {CJ} end function TrustRegion(; concrete_jac = nothing, linsolve = nothing, precs = DEFAULT_PRECS, - radius_update_scheme::RadiusUpdateSchemes.T = RadiusUpdateSchemes.Simple, #defaults to conventional radius update - max_trust_radius::Real = 0 // 1, initial_trust_radius::Real = 0 // 1, - step_threshold::Real = 1 // 10000, shrink_threshold::Real = 1 // 4, - expand_threshold::Real = 3 // 4, shrink_factor::Real = 1 // 4, - expand_factor::Real = 2 // 1, max_shrink_times::Int = 32, adkwargs...) + radius_update_scheme::RadiusUpdateSchemes.T = RadiusUpdateSchemes.Simple, #defaults to conventional radius update + max_trust_radius::Real = 0 // 1, initial_trust_radius::Real = 0 // 1, + step_threshold::Real = 1 // 10000, shrink_threshold::Real = 1 // 4, + expand_threshold::Real = 3 // 4, shrink_factor::Real = 1 // 4, + expand_factor::Real = 2 // 1, max_shrink_times::Int = 32, adkwargs...) ad = default_adargs_to_adtype(; adkwargs...) return TrustRegion{_unwrap_val(concrete_jac)}(ad, linsolve, precs, radius_update_scheme, max_trust_radius, initial_trust_radius, step_threshold, shrink_threshold, @@ -229,10 +229,10 @@ end end function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::TrustRegion, args...; - alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, - termination_condition = nothing, - internalnorm = DEFAULT_NORM, - linsolve_kwargs = (;), kwargs...) where {uType, iip} + alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, + termination_condition = nothing, + internalnorm = DEFAULT_NORM, + linsolve_kwargs = (;), kwargs...) where {uType, iip} alg = get_concrete_algorithm(alg_, prob) @unpack f, u0, p = prob u = alias_u0 ? u0 : deepcopy(u0) @@ -735,9 +735,9 @@ end get_fu(cache::TrustRegionCache) = cache.fu function SciMLBase.reinit!(cache::TrustRegionCache{iip}, u0 = cache.u; p = cache.p, - abstol = cache.abstol, reltol = cache.reltol, - termination_condition = cache.termination_condition, - maxiters = cache.maxiters) where {iip} + abstol = cache.abstol, reltol = cache.reltol, + termination_condition = cache.termination_condition, + maxiters = cache.maxiters) where {iip} cache.p = p if iip recursivecopy!(cache.u, u0) diff --git a/src/utils.jl b/src/utils.jl index 3707857f6..2221025e7 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -215,8 +215,8 @@ function __get_concrete_algorithm(alg, prob) # Use Finite Differencing use_sparse_ad ? AutoSparseFiniteDiff() : AutoFiniteDiff() else - tag = ForwardDiff.Tag(NonlinearSolveTag(), eltype(prob.u0)) - (use_sparse_ad ? AutoSparseForwardDiff : AutoForwardDiff)(; tag) + (use_sparse_ad ? AutoSparseForwardDiff : AutoForwardDiff)(; + tag = NonlinearSolveTag()) end return set_ad(alg, ad) end diff --git a/test/basictests.jl b/test/basictests.jl index ca033ef83..dae41796e 100644 --- a/test/basictests.jl +++ b/test/basictests.jl @@ -27,7 +27,7 @@ end end function benchmark_nlsolve_iip(f, u0, p = 2.0; linsolve, precs, - linesearch = LineSearch()) + linesearch = LineSearch()) prob = NonlinearProblem{true}(f, u0, p) return solve(prob, NewtonRaphson(; linsolve, precs, linesearch), abstol = 1e-9) end @@ -598,7 +598,7 @@ end end function benchmark_nlsolve_iip(f, u0, p = 2.0; linsolve, precs, - alpha_initial = 10.0) + alpha_initial = 10.0) prob = NonlinearProblem{true}(f, u0, p) return solve(prob, PseudoTransient(; linsolve, precs, alpha_initial), abstol = 1e-9) end From e9b714620d6cfc26728de494d516d093d816342a Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Mon, 30 Oct 2023 13:21:04 -0400 Subject: [PATCH 15/28] Use the new Termination Condition API --- Manifest.toml | 956 ++++++++++++++++++++++++++++++++++++++++++ Project.toml | 4 +- src/NonlinearSolve.jl | 1 + src/broyden.jl | 6 +- src/klement.jl | 6 +- src/lbroyden.jl | 6 +- src/raphson.jl | 51 +-- src/utils.jl | 39 +- 8 files changed, 1009 insertions(+), 60 deletions(-) create mode 100644 Manifest.toml diff --git a/Manifest.toml b/Manifest.toml new file mode 100644 index 000000000..295c748b6 --- /dev/null +++ b/Manifest.toml @@ -0,0 +1,956 @@ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.10.0-beta3" +manifest_format = "2.0" +project_hash = "1ed626bd8f3bd27c54d2cbbee8b7f3b485bdc0ba" + +[[deps.ADTypes]] +git-tree-sha1 = "5d2e21d7b0d8c22f67483ef95ebdc39c0e6b6003" +uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" +version = "0.2.4" + +[[deps.Adapt]] +deps = ["LinearAlgebra", "Requires"] +git-tree-sha1 = "02f731463748db57cc2ebfbd9fbc9ce8280d3433" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "3.7.1" +weakdeps = ["StaticArrays"] + + [deps.Adapt.extensions] + AdaptStaticArraysExt = "StaticArrays" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +version = "1.1.1" + +[[deps.ArnoldiMethod]] +deps = ["LinearAlgebra", "Random", "StaticArrays"] +git-tree-sha1 = "62e51b39331de8911e4a7ff6f5aaf38a5f4cc0ae" +uuid = "ec485272-7323-5ecc-a04f-4719b315124d" +version = "0.2.0" + +[[deps.ArrayInterface]] +deps = ["Adapt", "LinearAlgebra", "Requires", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "eba0af42241f0cb648806604222bab1e064edb67" +uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" +version = "7.5.0" + + [deps.ArrayInterface.extensions] + ArrayInterfaceBandedMatricesExt = "BandedMatrices" + ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" + ArrayInterfaceCUDAExt = "CUDA" + ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" + ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" + ArrayInterfaceTrackerExt = "Tracker" + + [deps.ArrayInterface.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.ArrayInterfaceCore]] +deps = ["LinearAlgebra", "SnoopPrecompile", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "e5f08b5689b1aad068e01751889f2f615c7db36d" +uuid = "30b0a656-2188-435a-8636-2ec0e6a096e2" +version = "0.1.29" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[deps.BitTwiddlingConvenienceFunctions]] +deps = ["Static"] +git-tree-sha1 = "0c5f81f47bbbcf4aea7b2959135713459170798b" +uuid = "62783981-4cbd-42fc-bca8-16325de8dc4b" +version = "0.1.5" + +[[deps.CPUSummary]] +deps = ["CpuId", "IfElse", "PrecompileTools", "Static"] +git-tree-sha1 = "601f7e7b3d36f18790e2caf83a882d88e9b71ff1" +uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" +version = "0.2.4" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra"] +git-tree-sha1 = "e0af648f0692ec1691b5d094b8724ba1346281cf" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.18.0" +weakdeps = ["SparseArrays"] + + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" + +[[deps.CloseOpenIntervals]] +deps = ["Static", "StaticArrayInterface"] +git-tree-sha1 = "70232f82ffaab9dc52585e0dd043b5e0c6b714f1" +uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" +version = "0.1.12" + +[[deps.CommonSolve]] +git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" +uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" +version = "0.2.4" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools", "Test"] +git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.0" + +[[deps.Compat]] +deps = ["UUIDs"] +git-tree-sha1 = "8a62af3e248a8c4bad6b32cbbe663ae02275e32c" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.10.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "1.0.5+1" + +[[deps.ConcreteStructs]] +git-tree-sha1 = "f749037478283d372048690eb3b5f92a79432b34" +uuid = "2569d6c7-a4a2-43d3-a901-331e8e4be471" +version = "0.2.3" + +[[deps.ConstructionBase]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.5.4" + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseStaticArraysExt = "StaticArrays" + + [deps.ConstructionBase.weakdeps] + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.CpuId]] +deps = ["Markdown"] +git-tree-sha1 = "fcbb72b032692610bfbdb15018ac16a36cf2e406" +uuid = "adafc99b-e345-5852-983c-f28acb93d879" +version = "0.3.1" + +[[deps.DataAPI]] +git-tree-sha1 = "8da84edb865b0b5b0100c0666a9bc9a0b71c553c" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.15.0" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "3dbd312d370723b6bb43ba9d02fc36abade4518d" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.15" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[deps.DiffEqBase]] +deps = ["ArrayInterface", "ChainRulesCore", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces", "ZygoteRules"] +git-tree-sha1 = "e5049e32074cd22f86d74036caf6663637623003" +repo-rev = "ap/tstable_termination" +repo-url = "https://github.com/SciML/DiffEqBase.jl" +uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" +version = "6.136.0" + + [deps.DiffEqBase.extensions] + DiffEqBaseDistributionsExt = "Distributions" + DiffEqBaseEnzymeExt = "Enzyme" + DiffEqBaseGeneralizedGeneratedExt = "GeneralizedGenerated" + DiffEqBaseMPIExt = "MPI" + DiffEqBaseMeasurementsExt = "Measurements" + DiffEqBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" + DiffEqBaseReverseDiffExt = "ReverseDiff" + DiffEqBaseTrackerExt = "Tracker" + DiffEqBaseUnitfulExt = "Unitful" + DiffEqBaseZygoteExt = "Zygote" + + [deps.DiffEqBase.weakdeps] + Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + GeneralizedGenerated = "6b9d7cbe-bcb9-11e9-073f-15a7a543e2eb" + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.DiffResults]] +deps = ["StaticArraysCore"] +git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.1.0" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.15.1" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.3" + +[[deps.Downloads]] +deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +version = "1.6.0" + +[[deps.EnumX]] +git-tree-sha1 = "bdb1942cd4c45e3c678fd11569d5cccd80976237" +uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" +version = "1.0.4" + +[[deps.EnzymeCore]] +deps = ["Adapt"] +git-tree-sha1 = "ab81396e4e7b61f5590db02fa1c17fae4f16d7ab" +uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" +version = "0.6.3" + +[[deps.ExprTools]] +git-tree-sha1 = "27415f162e6028e81c72b82ef756bf321213b6ec" +uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" +version = "0.1.10" + +[[deps.FastBroadcast]] +deps = ["ArrayInterface", "LinearAlgebra", "Polyester", "Static", "StaticArrayInterface", "StrideArraysCore"] +git-tree-sha1 = "9d77cb1caf03e67514ba60bcfc47c6e131b1950c" +uuid = "7034ab61-46d4-4ed7-9d0f-46aef9175898" +version = "0.2.7" + +[[deps.FastLapackInterface]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "b12f05108e405dadcc2aff0008db7f831374e051" +uuid = "29a986be-02c6-4525-aec4-84b980013641" +version = "2.0.0" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" + +[[deps.FillArrays]] +deps = ["LinearAlgebra", "Random"] +git-tree-sha1 = "35f0c0f345bff2c6d636f95fdb136323b5a796ef" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "1.7.0" +weakdeps = ["SparseArrays", "Statistics"] + + [deps.FillArrays.extensions] + FillArraysSparseArraysExt = "SparseArrays" + FillArraysStatisticsExt = "Statistics" + +[[deps.FiniteDiff]] +deps = ["ArrayInterface", "LinearAlgebra", "Requires", "Setfield", "SparseArrays"] +git-tree-sha1 = "c6e4a1fbe73b31a3dea94b1da449503b8830c306" +uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" +version = "2.21.1" + + [deps.FiniteDiff.extensions] + FiniteDiffBandedMatricesExt = "BandedMatrices" + FiniteDiffBlockBandedMatricesExt = "BlockBandedMatrices" + FiniteDiffStaticArraysExt = "StaticArrays" + + [deps.FiniteDiff.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "0.10.36" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" + +[[deps.FunctionWrappers]] +git-tree-sha1 = "d62485945ce5ae9c0c48f124a84998d755bae00e" +uuid = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" +version = "1.1.3" + +[[deps.FunctionWrappersWrappers]] +deps = ["FunctionWrappers"] +git-tree-sha1 = "b104d487b34566608f8b4e1c39fb0b10aa279ff8" +uuid = "77dc65aa-8811-40c2-897b-53d922fa7daf" +version = "0.1.3" + +[[deps.Future]] +deps = ["Random"] +uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" + +[[deps.GPUArraysCore]] +deps = ["Adapt"] +git-tree-sha1 = "2d6ca471a6c7b536127afccfa7564b5b39227fe0" +uuid = "46192b85-c4d5-4398-a991-12ede77f4527" +version = "0.1.5" + +[[deps.Graphs]] +deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] +git-tree-sha1 = "899050ace26649433ef1af25bc17a815b3db52b7" +uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" +version = "1.9.0" + +[[deps.HostCPUFeatures]] +deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] +git-tree-sha1 = "eb8fed28f4994600e29beef49744639d985a04b2" +uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" +version = "0.1.16" + +[[deps.IfElse]] +git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" +uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" +version = "0.1.1" + +[[deps.Inflate]] +git-tree-sha1 = "ea8031dea4aff6bd41f1df8f2fdfb25b33626381" +uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" +version = "0.1.4" + +[[deps.IntelOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "ad37c091f7d7daf900963171600d7c1c5c3ede32" +uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" +version = "2023.2.0+0" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.2.2" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.5.0" + +[[deps.KLU]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse_jll"] +git-tree-sha1 = "884c2968c2e8e7e6bf5956af88cb46aa745c854b" +uuid = "ef3ab10e-7fda-4108-b977-705223b18434" +version = "0.4.1" + +[[deps.Krylov]] +deps = ["LinearAlgebra", "Printf", "SparseArrays"] +git-tree-sha1 = "17e462054b42dcdda73e9a9ba0c67754170c88ae" +uuid = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" +version = "0.9.4" + +[[deps.LayoutPointers]] +deps = ["ArrayInterface", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface"] +git-tree-sha1 = "88b8f66b604da079a627b6fb2860d3704a6729a1" +uuid = "10f19ff3-798f-405d-979b-55457f8fc047" +version = "0.1.14" + +[[deps.Lazy]] +deps = ["MacroTools"] +git-tree-sha1 = "1370f8202dac30758f3c345f9909b97f53d87d3f" +uuid = "50d2b5c4-7a5e-59d5-8109-a42b560f39c0" +version = "0.15.1" + +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" +version = "0.6.4" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +version = "8.0.1+1" + +[[deps.LibGit2]] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.11.0+1" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[deps.LineSearches]] +deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] +git-tree-sha1 = "7bbea35cec17305fc70a0e5b4641477dc0789d9d" +uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" +version = "7.2.0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[deps.LinearSolve]] +deps = ["ArrayInterface", "ConcreteStructs", "DocStringExtensions", "EnumX", "EnzymeCore", "FastLapackInterface", "GPUArraysCore", "InteractiveUtils", "KLU", "Krylov", "Libdl", "LinearAlgebra", "MKL_jll", "PrecompileTools", "Preferences", "RecursiveFactorization", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Sparspak", "SuiteSparse", "UnPack"] +git-tree-sha1 = "27732d23d88534a7b735dcf8f411daf34293a39e" +uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" +version = "2.14.0" + + [deps.LinearSolve.extensions] + LinearSolveBandedMatricesExt = "BandedMatrices" + LinearSolveBlockDiagonalsExt = "BlockDiagonals" + LinearSolveCUDAExt = "CUDA" + LinearSolveEnzymeExt = "Enzyme" + LinearSolveHYPREExt = "HYPRE" + LinearSolveIterativeSolversExt = "IterativeSolvers" + LinearSolveKernelAbstractionsExt = "KernelAbstractions" + LinearSolveKrylovKitExt = "KrylovKit" + LinearSolveMetalExt = "Metal" + LinearSolvePardisoExt = "Pardiso" + LinearSolveRecursiveArrayToolsExt = "RecursiveArrayTools" + + [deps.LinearSolve.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockDiagonals = "0a1fb500-61f7-11e9-3c65-f5ef3456f9f0" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" + IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" + Metal = "dde4c033-4e86-420c-a63e-0dd931031962" + Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" + RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" + +[[deps.LogExpFunctions]] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "7d6dd4e9212aebaeed356de34ccf262a3cd415aa" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.26" + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" + + [deps.LogExpFunctions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[deps.LoopVectorization]] +deps = ["ArrayInterface", "ArrayInterfaceCore", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "PrecompileTools", "SIMDTypes", "SLEEFPirates", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"] +git-tree-sha1 = "c88a4afe1703d731b1c4fdf4e3c7e77e3b176ea2" +uuid = "bdcacae8-1622-11e9-2a5c-532679323890" +version = "0.12.165" +weakdeps = ["ChainRulesCore", "ForwardDiff", "SpecialFunctions"] + + [deps.LoopVectorization.extensions] + ForwardDiffExt = ["ChainRulesCore", "ForwardDiff"] + SpecialFunctionsExt = "SpecialFunctions" + +[[deps.MKL_jll]] +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] +git-tree-sha1 = "eb006abbd7041c28e0d16260e50a24f8f9104913" +uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" +version = "2023.2.0+0" + +[[deps.MacroTools]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "9ee1618cbf5240e6d4e0371d6f24065083f60c48" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.11" + +[[deps.ManualMemory]] +git-tree-sha1 = "bcaef4fc7a0cfe2cba636d84cda54b5e4e4ca3cd" +uuid = "d125e4d3-2237-4719-b19c-fa641b8a4667" +version = "0.1.8" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[deps.MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +version = "2.28.2+1" + +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +version = "2023.1.10" + +[[deps.MuladdMacro]] +git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab" +uuid = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221" +version = "0.2.4" + +[[deps.NLSolversBase]] +deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"] +git-tree-sha1 = "a0b464d183da839699f4c79e7606d9d186ec172c" +uuid = "d41bc354-129a-5804-8e4c-c37616107c6c" +version = "7.8.3" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "0877504529a3e5c3343c6f8b4c0381e57e4387e4" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.0.2" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.2.0" + +[[deps.OffsetArrays]] +deps = ["Adapt"] +git-tree-sha1 = "2ac17d29c523ce1cd38e27785a7d23024853a4bb" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.12.10" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.23+2" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+2" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.5+0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "2e73fe17cac3c62ad1aebe70d44c963c3cfdc3e3" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.6.2" + +[[deps.PackageExtensionCompat]] +git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" +uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" +version = "1.0.2" +weakdeps = ["Requires", "TOML"] + +[[deps.Parameters]] +deps = ["OrderedCollections", "UnPack"] +git-tree-sha1 = "34c0e9ad262e5f7fc75b10a9952ca7692cfc5fbe" +uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a" +version = "0.12.3" + +[[deps.Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +version = "1.10.0" + +[[deps.Polyester]] +deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Requires", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] +git-tree-sha1 = "398f91235beaac50445557c937ecb0145d171842" +uuid = "f517fe37-dbe3-4b94-8317-1923a5111588" +version = "0.7.8" + +[[deps.PolyesterWeave]] +deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"] +git-tree-sha1 = "240d7170f5ffdb285f9427b92333c3463bf65bf6" +uuid = "1d0040c9-8b98-4ee7-8388-3f51789ca0ad" +version = "0.2.1" + +[[deps.PreallocationTools]] +deps = ["Adapt", "ArrayInterface", "ForwardDiff", "Requires"] +git-tree-sha1 = "f739b1b3cc7b9949af3b35089931f2b58c289163" +uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46" +version = "0.4.12" + + [deps.PreallocationTools.extensions] + PreallocationToolsReverseDiffExt = "ReverseDiff" + + [deps.PreallocationTools.weakdeps] + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "03b4c25b43cb84cee5c90aa9b5ea0a78fd848d2f" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.2.0" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "00805cd429dcb4870060ff49ef443486c262e38e" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.4.1" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[deps.REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[deps.Random]] +deps = ["SHA"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[deps.RecipesBase]] +deps = ["PrecompileTools"] +git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.4" + +[[deps.RecursiveArrayTools]] +deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "Requires", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] +git-tree-sha1 = "d7087c013e8a496ff396bae843b1e16d9a30ede8" +uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" +version = "2.38.10" + + [deps.RecursiveArrayTools.extensions] + RecursiveArrayToolsMeasurementsExt = "Measurements" + RecursiveArrayToolsMonteCarloMeasurementsExt = "MonteCarloMeasurements" + RecursiveArrayToolsTrackerExt = "Tracker" + RecursiveArrayToolsZygoteExt = "Zygote" + + [deps.RecursiveArrayTools.weakdeps] + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.RecursiveFactorization]] +deps = ["LinearAlgebra", "LoopVectorization", "Polyester", "PrecompileTools", "StrideArraysCore", "TriangularSolve"] +git-tree-sha1 = "2b6d4a40339aa02655b1743f4cd7c03109f520c1" +uuid = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" +version = "0.2.20" + +[[deps.Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.0" + +[[deps.RuntimeGeneratedFunctions]] +deps = ["ExprTools", "SHA", "Serialization"] +git-tree-sha1 = "6aacc5eefe8415f47b3e34214c1d79d2674a0ba2" +uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" +version = "0.5.12" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.SIMDTypes]] +git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" +uuid = "94e857df-77ce-4151-89e5-788b33177be4" +version = "0.1.0" + +[[deps.SLEEFPirates]] +deps = ["IfElse", "Static", "VectorizationBase"] +git-tree-sha1 = "897b39ec056c0619ea87adc7eeadba0bec0cf931" +uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" +version = "0.6.40" + +[[deps.SciMLBase]] +deps = ["ADTypes", "ArrayInterface", "ChainRulesCore", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FillArrays", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables", "TruncatedStacktraces", "ZygoteRules"] +git-tree-sha1 = "1c2a4e245744dd76b2eb677d3535ffad16d8b989" +uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" +version = "2.5.0" + + [deps.SciMLBase.extensions] + SciMLBasePartialFunctionsExt = "PartialFunctions" + SciMLBasePyCallExt = "PyCall" + SciMLBasePythonCallExt = "PythonCall" + SciMLBaseRCallExt = "RCall" + SciMLBaseZygoteExt = "Zygote" + + [deps.SciMLBase.weakdeps] + PartialFunctions = "570af359-4316-4cb7-8c74-252c00c2016b" + PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" + PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" + RCall = "6f49c342-dc21-5d91-9882-a32aef131414" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.SciMLOperators]] +deps = ["ArrayInterface", "DocStringExtensions", "Lazy", "LinearAlgebra", "Setfield", "SparseArrays", "StaticArraysCore", "Tricks"] +git-tree-sha1 = "65c2e6ced6f62ea796af251eb292a0e131a3613b" +uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" +version = "0.3.6" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[deps.Setfield]] +deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] +git-tree-sha1 = "e2cc6d8c88613c05e1defb55170bf5ff211fbeac" +uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" +version = "1.1.1" + +[[deps.SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[deps.SimpleNonlinearSolve]] +deps = ["ArrayInterface", "DiffEqBase", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Reexport", "SciMLBase", "StaticArraysCore"] +git-tree-sha1 = "15ff97fa4881133caa324dacafe28b5ac47ad8a2" +uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" +version = "0.1.23" + + [deps.SimpleNonlinearSolve.extensions] + SimpleNonlinearSolveNNlibExt = "NNlib" + + [deps.SimpleNonlinearSolve.weakdeps] + NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" + +[[deps.SimpleTraits]] +deps = ["InteractiveUtils", "MacroTools"] +git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" +uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d" +version = "0.9.4" + +[[deps.SnoopPrecompile]] +deps = ["Preferences"] +git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c" +uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" +version = "1.0.3" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[deps.SparseArrays]] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" + +[[deps.SparseDiffTools]] +deps = ["ADTypes", "Adapt", "ArrayInterface", "Compat", "DataStructures", "FiniteDiff", "ForwardDiff", "Graphs", "LinearAlgebra", "PackageExtensionCompat", "Random", "Reexport", "SciMLOperators", "Setfield", "SparseArrays", "StaticArrayInterface", "StaticArrays", "Tricks", "UnPack", "VertexSafeGraphs"] +git-tree-sha1 = "5188e5e415908a19a41cd90d8ab74a23affacba6" +repo-rev = "ap/tagging" +repo-url = "https://github.com/avik-pal/SparseDiffTools.jl" +uuid = "47a9eef4-7e08-11e9-0b38-333d64bd3804" +version = "2.9.2" + + [deps.SparseDiffTools.extensions] + SparseDiffToolsEnzymeExt = "Enzyme" + SparseDiffToolsSymbolicsExt = "Symbolics" + SparseDiffToolsZygoteExt = "Zygote" + + [deps.SparseDiffTools.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.Sparspak]] +deps = ["Libdl", "LinearAlgebra", "Logging", "OffsetArrays", "Printf", "SparseArrays", "Test"] +git-tree-sha1 = "342cf4b449c299d8d1ceaf00b7a49f4fbc7940e7" +uuid = "e56a9233-b9d6-4f03-8d0f-1825330902ac" +version = "0.3.9" + +[[deps.SpecialFunctions]] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.3.1" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" + +[[deps.Static]] +deps = ["IfElse"] +git-tree-sha1 = "f295e0a1da4ca425659c57441bcb59abb035a4bc" +uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" +version = "0.8.8" + +[[deps.StaticArrayInterface]] +deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "Requires", "SparseArrays", "Static", "SuiteSparse"] +git-tree-sha1 = "03fec6800a986d191f64f5c0996b59ed526eda25" +uuid = "0d7ed370-da01-4f52-bd93-41d350b8b718" +version = "1.4.1" +weakdeps = ["OffsetArrays", "StaticArrays"] + + [deps.StaticArrayInterface.extensions] + StaticArrayInterfaceOffsetArraysExt = "OffsetArrays" + StaticArrayInterfaceStaticArraysExt = "StaticArrays" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "Random", "StaticArraysCore"] +git-tree-sha1 = "0adf069a2a490c47273727e029371b31d44b72b2" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.6.5" +weakdeps = ["Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysStatisticsExt = "Statistics" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.4.2" + +[[deps.Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.10.0" + +[[deps.StrideArraysCore]] +deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface", "ThreadingUtilities"] +git-tree-sha1 = "f02eb61eb5c97b48c153861c72fbbfdddc607e06" +uuid = "7792a7ef-975c-4747-a70f-980b88e8d1da" +version = "0.4.17" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "7.2.0+1" + +[[deps.SymbolicIndexingInterface]] +deps = ["DocStringExtensions"] +git-tree-sha1 = "f8ab052bfcbdb9b48fad2c80c873aa0d0344dfe5" +uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" +version = "0.2.2" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.3" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "cb76cf677714c095e535e3501ac7954732aeea2d" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.11.1" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" +version = "1.10.0" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.ThreadingUtilities]] +deps = ["ManualMemory"] +git-tree-sha1 = "eda08f7e9818eb53661b3deb74e3159460dfbc27" +uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5" +version = "0.5.2" + +[[deps.TriangularSolve]] +deps = ["CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "LoopVectorization", "Polyester", "Static", "VectorizationBase"] +git-tree-sha1 = "31eedbc0b6d07c08a700e26d31298ac27ef330eb" +uuid = "d5829a12-d9aa-46ab-831f-fb7c9ab06edf" +version = "0.1.19" + +[[deps.Tricks]] +git-tree-sha1 = "eae1bb484cd63b36999ee58be2de6c178105112f" +uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" +version = "0.1.8" + +[[deps.TruncatedStacktraces]] +deps = ["InteractiveUtils", "MacroTools", "Preferences"] +git-tree-sha1 = "ea3e54c2bdde39062abf5a9758a23735558705e1" +uuid = "781d530d-4396-4725-bb49-402e4bee1e77" +version = "1.4.0" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[deps.UnPack]] +git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" +uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" +version = "1.0.2" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[deps.VectorizationBase]] +deps = ["ArrayInterface", "CPUSummary", "HostCPUFeatures", "IfElse", "LayoutPointers", "Libdl", "LinearAlgebra", "SIMDTypes", "Static", "StaticArrayInterface"] +git-tree-sha1 = "b182207d4af54ac64cbc71797765068fdeff475d" +uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f" +version = "0.21.64" + +[[deps.VertexSafeGraphs]] +deps = ["Graphs"] +git-tree-sha1 = "8351f8d73d7e880bfc042a8b6922684ebeafb35c" +uuid = "19fa3120-7c27-5ec5-8db8-b0b0aa330d6f" +version = "0.2.0" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.13+1" + +[[deps.ZygoteRules]] +deps = ["ChainRulesCore", "MacroTools"] +git-tree-sha1 = "9d749cd449fb448aeca4feee9a2f4186dbb5d184" +uuid = "700de1a5-db45-46bc-99cf-38207098b444" +version = "0.2.4" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.8.0+1" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.52.0+1" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.4.0+2" diff --git a/Project.toml b/Project.toml index 078c37f3b..af3db4c85 100644 --- a/Project.toml +++ b/Project.toml @@ -40,7 +40,7 @@ ADTypes = "0.2" ArrayInterface = "6.0.24, 7" BandedMatrices = "1" ConcreteStructs = "0.2" -DiffEqBase = "6.130" +DiffEqBase = "6.136" EnumX = "1" Enzyme = "0.11" FastBroadcast = "0.1.9, 0.2" @@ -56,7 +56,7 @@ RecursiveArrayTools = "2" Reexport = "0.2, 1" SciMLBase = "2.4" SimpleNonlinearSolve = "0.1.23" -SparseDiffTools = "2.6" +SparseDiffTools = "2.9" StaticArraysCore = "1.4" UnPack = "1.0" Zygote = "0.6" diff --git a/src/NonlinearSolve.jl b/src/NonlinearSolve.jl index 64bd0a62c..1a9401eef 100644 --- a/src/NonlinearSolve.jl +++ b/src/NonlinearSolve.jl @@ -30,6 +30,7 @@ PrecompileTools.@recompile_invalidations begin end @reexport using ADTypes, LineSearches, SciMLBase, SimpleNonlinearSolve +import DiffEqBase: AbstractNonlinearTerminationMode const AbstractSparseADType = Union{ADTypes.AbstractSparseFiniteDifferences, ADTypes.AbstractSparseForwardMode, ADTypes.AbstractSparseReverseMode} diff --git a/src/broyden.jl b/src/broyden.jl index b728c6944..7ce090f1a 100644 --- a/src/broyden.jl +++ b/src/broyden.jl @@ -52,7 +52,7 @@ end reset_check prob stats::NLStats - lscache + ls_cache termination_condition tc_storage end @@ -93,7 +93,7 @@ function perform_step!(cache::GeneralBroydenCache{true}) T = eltype(u) mul!(_vec(du), J⁻¹, _vec(fu)) - α = perform_linesearch!(cache.lscache, u, du) + α = perform_linesearch!(cache.ls_cache, u, du) _axpy!(-α, du, u) f(fu2, u, p) @@ -137,7 +137,7 @@ function perform_step!(cache::GeneralBroydenCache{false}) T = eltype(cache.u) cache.du = _restructure(cache.du, cache.J⁻¹ * _vec(cache.fu)) - α = perform_linesearch!(cache.lscache, cache.u, cache.du) + α = perform_linesearch!(cache.ls_cache, cache.u, cache.du) cache.u = cache.u .- α * cache.du cache.fu2 = f(cache.u, p) diff --git a/src/klement.jl b/src/klement.jl index 10c83c775..982c07c3a 100644 --- a/src/klement.jl +++ b/src/klement.jl @@ -61,7 +61,7 @@ end reltol prob stats::NLStats - lscache + ls_cache termination_condition tc_storage end @@ -131,7 +131,7 @@ function perform_step!(cache::GeneralKlementCache{true}) cache.linsolve = linres.cache # Line Search - α = perform_linesearch!(cache.lscache, u, du) + α = perform_linesearch!(cache.ls_cache, u, du) _axpy!(-α, du, u) f(cache.fu2, u, p) @@ -193,7 +193,7 @@ function perform_step!(cache::GeneralKlementCache{false}) end # Line Search - α = perform_linesearch!(cache.lscache, cache.u, cache.du) + α = perform_linesearch!(cache.ls_cache, cache.u, cache.du) cache.u = @. cache.u - α * cache.du # `u` might not support mutation cache.fu2 = f(cache.u, p) diff --git a/src/lbroyden.jl b/src/lbroyden.jl index 81c6a19c0..3489e87b9 100644 --- a/src/lbroyden.jl +++ b/src/lbroyden.jl @@ -59,7 +59,7 @@ end reset_check prob stats::NLStats - lscache + ls_cache termination_condition tc_storage end @@ -109,7 +109,7 @@ function perform_step!(cache::LimitedMemoryBroydenCache{true}) termination_condition = cache.termination_condition(tc_storage) - α = perform_linesearch!(cache.lscache, u, du) + α = perform_linesearch!(cache.ls_cache, u, du) _axpy!(-α, du, u) f(cache.fu2, u, p) @@ -169,7 +169,7 @@ function perform_step!(cache::LimitedMemoryBroydenCache{false}) T = eltype(cache.u) - α = perform_linesearch!(cache.lscache, cache.u, cache.du) + α = perform_linesearch!(cache.ls_cache, cache.u, cache.du) cache.u = cache.u .- α * cache.du cache.fu2 = f(cache.u, p) diff --git a/src/raphson.jl b/src/raphson.jl index 00338ccc0..c9d405de8 100644 --- a/src/raphson.jl +++ b/src/raphson.jl @@ -70,9 +70,8 @@ end reltol prob stats::NLStats - lscache - termination_condition - tc_storage + ls_cache + tc_cache end function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::NewtonRaphson, args...; @@ -86,39 +85,34 @@ function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::NewtonRaphso uf, linsolve, J, fu2, jac_cache, du = jacobian_caches(alg, f, u, p, Val(iip); linsolve_kwargs) - abstol, reltol, termination_condition = _init_termination_elements(abstol, - reltol, termination_condition, eltype(u)) - - mode = DiffEqBase.get_termination_mode(termination_condition) - - storage = mode ∈ DiffEqBase.SAFE_TERMINATION_MODES ? NLSolveSafeTerminationResult() : - nothing + abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, u, + termination_condition) return NewtonRaphsonCache{iip}(f, alg, u, copy(u), fu1, fu2, du, p, uf, linsolve, J, jac_cache, false, maxiters, internalnorm, ReturnCode.Default, abstol, reltol, prob, NLStats(1, 0, 0, 0, 0), - init_linesearch_cache(alg.linesearch, f, u, p, fu1, Val(iip)), - termination_condition, storage) + init_linesearch_cache(alg.linesearch, f, u, p, fu1, Val(iip)), tc_cache) end function perform_step!(cache::NewtonRaphsonCache{true}) - @unpack u, u_prev, fu1, f, p, alg, J, linsolve, du, tc_storage = cache + @unpack u, u_prev, fu1, f, p, alg, J, linsolve, du = cache jacobian!!(J, cache) - termination_condition = cache.termination_condition(tc_storage) - # u = u - J \ fu linres = dolinsolve(alg.precs, linsolve; A = J, b = _vec(fu1), linu = _vec(du), p, reltol = cache.abstol) cache.linsolve = linres.cache # Line Search - α = perform_linesearch!(cache.lscache, u, du) + α = perform_linesearch!(cache.ls_cache, u, du) _axpy!(-α, du, u) f(cache.fu1, u, p) - termination_condition(cache.fu1, u, u_prev, cache.abstol, cache.reltol) && - (cache.force_stop = true) + if cache.tc_cache(cache.fu1, cache.u, u_prev) + # Stores the best solution in cache! + cache.tc_cache.u !== nothing && copyto!(cache.u, cache.tc_cache.u) + cache.force_stop = true + end @. u_prev = u cache.stats.nf += 1 @@ -129,9 +123,7 @@ function perform_step!(cache::NewtonRaphsonCache{true}) end function perform_step!(cache::NewtonRaphsonCache{false}) - @unpack u, u_prev, fu1, f, p, alg, linsolve, tc_storage = cache - - termination_condition = cache.termination_condition(tc_storage) + @unpack u, u_prev, fu1, f, p, alg, linsolve = cache cache.J = jacobian!!(cache.J, cache) # u = u - J \ fu @@ -144,14 +136,17 @@ function perform_step!(cache::NewtonRaphsonCache{false}) end # Line Search - α = perform_linesearch!(cache.lscache, u, cache.du) + α = perform_linesearch!(cache.ls_cache, u, cache.du) cache.u = @. u - α * cache.du # `u` might not support mutation cache.fu1 = f(cache.u, p) - termination_condition(cache.fu1, cache.u, u_prev, cache.abstol, cache.reltol) && - (cache.force_stop = true) + if cache.tc_cache(cache.fu1, cache.u, u_prev) + # Stores the best solution in cache! + cache.tc_cache.u !== nothing && (cache.u = cache.tc_cache.u) + cache.force_stop = true + end - cache.u_prev = @. cache.u + cache.u_prev = cache.u cache.stats.nf += 1 cache.stats.njacs += 1 cache.stats.nsolve += 1 @@ -161,7 +156,7 @@ end function SciMLBase.reinit!(cache::NewtonRaphsonCache{iip}, u0 = cache.u; p = cache.p, abstol = cache.abstol, reltol = cache.reltol, - termination_condition = cache.termination_condition, + termination_condition = get_termination_mode(cache.tc_cache), maxiters = cache.maxiters) where {iip} cache.p = p if iip @@ -173,12 +168,12 @@ function SciMLBase.reinit!(cache::NewtonRaphsonCache{iip}, u0 = cache.u; p = cac cache.fu1 = cache.f(cache.u, p) end - termination_condition = _get_reinit_termination_condition(cache, abstol, reltol, + abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, cache.u, termination_condition) cache.abstol = abstol cache.reltol = reltol - cache.termination_condition = termination_condition + cache.tc_cache = tc_cache cache.maxiters = maxiters cache.stats.nf = 1 cache.stats.nsteps = 1 diff --git a/src/utils.jl b/src/utils.jl index 2221025e7..704d340cb 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -1,17 +1,4 @@ - -@inline UNITLESS_ABS2(x) = real(abs2(x)) -@inline DEFAULT_NORM(u::Union{AbstractFloat, Complex}) = @fastmath abs(u) -@inline function DEFAULT_NORM(u::Array{T}) where {T <: Union{AbstractFloat, Complex}} - return sqrt(real(sum(abs2, u)) / length(u)) -end -@inline function DEFAULT_NORM(u::StaticArray{<:Union{AbstractFloat, Complex}}) - return sqrt(real(sum(abs2, u)) / length(u)) -end -@inline function DEFAULT_NORM(u::AbstractVectorOfArray) - return sum(sqrt(real(sum(UNITLESS_ABS2, _u)) / length(_u)) for _u in u.u) -end -@inline DEFAULT_NORM(u::AbstractArray) = sqrt(real(sum(UNITLESS_ABS2, u)) / length(u)) -@inline DEFAULT_NORM(u) = norm(u) +const DEFAULT_NORM = DiffEqBase.NONLINEARSOLVE_DEFAULT_NORM # Ignores NaN function __findmin(f, x) @@ -36,7 +23,7 @@ code. `autodiff=`. """ function default_adargs_to_adtype(; chunk_size = missing, autodiff = nothing, - standardtag = missing, diff_type = missing) + standardtag = missing, diff_type = missing) # If using the new API short circuit autodiff === nothing && return nothing autodiff isa ADTypes.AbstractADType && return autodiff @@ -89,8 +76,8 @@ end DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, cachedata) = nothing, nothing function dolinsolve(precs::P, linsolve; A = nothing, linu = nothing, b = nothing, - du = nothing, u = nothing, p = nothing, t = nothing, weight = nothing, - cachedata = nothing, reltol = nothing) where {P} + du = nothing, u = nothing, p = nothing, t = nothing, weight = nothing, + cachedata = nothing, reltol = nothing) where {P} A !== nothing && (linsolve.A = A) b !== nothing && (linsolve.b = b) linu !== nothing && (linsolve.u = linu) @@ -167,7 +154,7 @@ _maybe_mutable(x, _) = x # Helper function to get value of `f(u, p)` function evaluate_f(prob::Union{NonlinearProblem{uType, iip}, - NonlinearLeastSquaresProblem{uType, iip}}, u) where {uType, iip} + NonlinearLeastSquaresProblem{uType, iip}}, u) where {uType, iip} @unpack f, u0, p = prob if iip fu = f.resid_prototype === nothing ? zero(u) : f.resid_prototype @@ -194,7 +181,7 @@ end Defaults to `mul!(C, A, B)`. However, for sparse matrices uses `C .= A * B`. """ -__matmul!(C, A, B) = mul!(C, A, B) +__matmul!(C, A, B) = mul!(C, A, B)`` __matmul!(C::AbstractSparseMatrix, A, B) = C .= A * B # Concretize Algorithms @@ -216,11 +203,20 @@ function __get_concrete_algorithm(alg, prob) use_sparse_ad ? AutoSparseFiniteDiff() : AutoFiniteDiff() else (use_sparse_ad ? AutoSparseForwardDiff : AutoForwardDiff)(; - tag = NonlinearSolveTag()) + tag = ForwardDiff.Tag(NonlinearSolveTag(), eltype(prob.u0))) end return set_ad(alg, ad) end +function init_termination_cache(abstol, reltol, u, ::Nothing) + return init_termination_cache(abstol, reltol, u, AbsNormTerminationMode()) +end +function init_termination_cache(abstol, reltol, u, tc::AbstractNonlinearTerminationMode) + tc_cache = init(u, tc; abstol, reltol) + return DiffEqBase.get_abstol(tc_cache), DiffEqBase.get_reltol(tc_cache), tc_cache +end + +# FIXME: Remove the functions below when we have migrated to the new type stable API __cvt_real(::Type{T}, ::Nothing) where {T} = nothing __cvt_real(::Type{T}, x) where {T} = real(T(x)) @@ -231,7 +227,7 @@ function _get_tolerance(η, tc_η, ::Type{T}) where {T} end function _init_termination_elements(abstol, reltol, termination_condition, - ::Type{T}; mode = NLSolveTerminationMode.AbsNorm) where {T} + ::Type{T}; mode = NLSolveTerminationMode.AbsNorm) where {T} if termination_condition !== nothing if abstol !== nothing && abstol != termination_condition.abstol error("Incompatible absolute tolerances found. The tolerances supplied as the \ @@ -279,6 +275,7 @@ function _get_reinit_termination_condition(cache, abstol, reltol, termination_co termination_condition.safe_termination_options) end end +# FIXME: Purge things till here! __init_identity_jacobian(u::Number, _) = u function __init_identity_jacobian(u, fu) From 7c8a0a765e9f7f198aa0ce2c59eeb37e9940dda3 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Mon, 30 Oct 2023 15:56:56 -0400 Subject: [PATCH 16/28] Improve termination conditions --- Manifest.toml | 6 +- src/NonlinearSolve.jl | 14 ++++- src/broyden.jl | 38 +++++-------- src/dfsane.jl | 60 ++++++-------------- src/gaussnewton.jl | 54 +++++++++--------- src/klement.jl | 40 +++++--------- src/lbroyden.jl | 39 ++++++------- src/levenberg.jl | 62 +++++++++------------ src/pseudotransient.jl | 47 ++++++---------- src/raphson.jl | 21 ++----- src/trustRegion.jl | 91 ++++++++---------------------- src/utils.jl | 116 ++++++++++++++++++++------------------- test/23_test_problems.jl | 6 +- test/basictests.jl | 76 +++++++++++-------------- test/gpu.jl | 4 +- test/polyalgs.jl | 6 +- test/sparse.jl | 1 - 17 files changed, 272 insertions(+), 409 deletions(-) diff --git a/Manifest.toml b/Manifest.toml index 295c748b6..7a9729bd6 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -164,7 +164,7 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" [[deps.DiffEqBase]] deps = ["ArrayInterface", "ChainRulesCore", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces", "ZygoteRules"] -git-tree-sha1 = "e5049e32074cd22f86d74036caf6663637623003" +git-tree-sha1 = "4e661d0beddac31da05e71b79afd769232622de8" repo-rev = "ap/tstable_termination" repo-url = "https://github.com/SciML/DiffEqBase.jl" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" @@ -689,9 +689,9 @@ version = "0.1.0" [[deps.SLEEFPirates]] deps = ["IfElse", "Static", "VectorizationBase"] -git-tree-sha1 = "897b39ec056c0619ea87adc7eeadba0bec0cf931" +git-tree-sha1 = "f5c896d781486f1d67c8492f0e0ead2c3517208c" uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" -version = "0.6.40" +version = "0.6.41" [[deps.SciMLBase]] deps = ["ADTypes", "ArrayInterface", "ChainRulesCore", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FillArrays", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables", "TruncatedStacktraces", "ZygoteRules"] diff --git a/src/NonlinearSolve.jl b/src/NonlinearSolve.jl index 1a9401eef..5557ecd0d 100644 --- a/src/NonlinearSolve.jl +++ b/src/NonlinearSolve.jl @@ -30,7 +30,9 @@ PrecompileTools.@recompile_invalidations begin end @reexport using ADTypes, LineSearches, SciMLBase, SimpleNonlinearSolve -import DiffEqBase: AbstractNonlinearTerminationMode +import DiffEqBase: AbstractNonlinearTerminationMode, + AbstractSafeNonlinearTerminationMode, AbstractSafeBestNonlinearTerminationMode, + NonlinearSafeTerminationReturnCode, get_termination_mode const AbstractSparseADType = Union{ADTypes.AbstractSparseFiniteDifferences, ADTypes.AbstractSparseForwardMode, ADTypes.AbstractSparseReverseMode} @@ -54,6 +56,8 @@ function not_terminated(cache::AbstractNonlinearSolveCache) return !cache.force_stop && cache.stats.nsteps < cache.maxiters end get_fu(cache::AbstractNonlinearSolveCache) = cache.fu1 +set_fu!(cache::AbstractNonlinearSolveCache, fu) = (cache.fu1 = fu) +get_u(cache::AbstractNonlinearSolveCache) = cache.u function SciMLBase.solve!(cache::AbstractNonlinearSolveCache) while not_terminated(cache) @@ -70,7 +74,7 @@ function SciMLBase.solve!(cache::AbstractNonlinearSolveCache) end end - return SciMLBase.build_solution(cache.prob, cache.alg, cache.u, get_fu(cache); + return SciMLBase.build_solution(cache.prob, cache.alg, get_u(cache), get_fu(cache); cache.retcode, cache.stats) end @@ -114,4 +118,10 @@ export RobustMultiNewton, FastShortcutNonlinearPolyalg export LineSearch, LiFukushimaLineSearch +# Export the termination conditions from DiffEqBase +export SteadyStateDiffEqTerminationMode, SimpleNonlinearSolveTerminationMode, + NormTerminationMode, RelTerminationMode, RelNormTerminationMode, AbsTerminationMode, + AbsNormTerminationMode, RelSafeTerminationMode, AbsSafeTerminationMode, + RelSafeBestTerminationMode, AbsSafeBestTerminationMode + end # module diff --git a/src/broyden.jl b/src/broyden.jl index 7ce090f1a..4d3be3224 100644 --- a/src/broyden.jl +++ b/src/broyden.jl @@ -53,11 +53,11 @@ end prob stats::NLStats ls_cache - termination_condition - tc_storage + tc_cache end get_fu(cache::GeneralBroydenCache) = cache.fu +set_fu!(cache::GeneralBroydenCache, fu) = (cache.fu = fu) function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::GeneralBroyden, args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, @@ -71,25 +71,18 @@ function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::GeneralBroyde alg.reset_tolerance reset_check = x -> abs(x) ≤ reset_tolerance - abstol, reltol, termination_condition = _init_termination_elements(abstol, reltol, - termination_condition, eltype(u)) - - mode = DiffEqBase.get_termination_mode(termination_condition) + abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, fu, u, + termination_condition) - storage = mode ∈ DiffEqBase.SAFE_TERMINATION_MODES ? NLSolveSafeTerminationResult() : - nothing return GeneralBroydenCache{iip}(f, alg, u, zero(u), _mutable_zero(u), fu, zero(fu), zero(fu), p, J⁻¹, zero(_reshape(fu, 1, :)), _mutable_zero(u), false, 0, alg.max_resets, maxiters, internalnorm, ReturnCode.Default, abstol, reltol, reset_tolerance, reset_check, prob, NLStats(1, 0, 0, 0, 0), - init_linesearch_cache(alg.linesearch, f, u, p, fu, Val(iip)), termination_condition, - storage) + init_linesearch_cache(alg.linesearch, f, u, p, fu, Val(iip)), tc_cache) end function perform_step!(cache::GeneralBroydenCache{true}) - @unpack f, p, du, fu, fu2, dfu, u, u_prev, J⁻¹, J⁻¹df, J⁻¹₂, tc_storage = cache - - termination_condition = cache.termination_condition(tc_storage) + @unpack f, p, du, fu, fu2, dfu, u, u_prev, J⁻¹, J⁻¹df, J⁻¹₂ = cache T = eltype(u) mul!(_vec(du), J⁻¹, _vec(fu)) @@ -97,8 +90,7 @@ function perform_step!(cache::GeneralBroydenCache{true}) _axpy!(-α, du, u) f(fu2, u, p) - termination_condition(fu2, u, u_prev, cache.abstol, cache.reltol) && - (cache.force_stop = true) + check_and_update!(cache, fu2, u, u_prev) cache.stats.nf += 1 cache.force_stop && return nothing @@ -130,9 +122,7 @@ function perform_step!(cache::GeneralBroydenCache{true}) end function perform_step!(cache::GeneralBroydenCache{false}) - @unpack f, p, tc_storage = cache - - termination_condition = cache.termination_condition(tc_storage) + @unpack f, p = cache T = eltype(cache.u) @@ -141,8 +131,7 @@ function perform_step!(cache::GeneralBroydenCache{false}) cache.u = cache.u .- α * cache.du cache.fu2 = f(cache.u, p) - termination_condition(cache.fu2, cache.u, cache.u_prev, cache.abstol, cache.reltol) && - (cache.force_stop = true) + check_and_update!(cache, cache.fu2, cache.u, cache.u_prev) cache.stats.nf += 1 cache.force_stop && return nothing @@ -172,9 +161,8 @@ function perform_step!(cache::GeneralBroydenCache{false}) end function SciMLBase.reinit!(cache::GeneralBroydenCache{iip}, u0 = cache.u; p = cache.p, - abstol = cache.abstol, reltol = cache.reltol, - termination_condition = cache.termination_condition, - maxiters = cache.maxiters) where {iip} + abstol = cache.abstol, reltol = cache.reltol, maxiters = cache.maxiters, + termination_condition = get_termination_mode(cache.tc_cache)) where {iip} cache.p = p if iip recursivecopy!(cache.u, u0) @@ -185,12 +173,12 @@ function SciMLBase.reinit!(cache::GeneralBroydenCache{iip}, u0 = cache.u; p = ca cache.fu = cache.f(cache.u, p) end - termination_condition = _get_reinit_termination_condition(cache, abstol, reltol, + abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, cache.fu, cache.u, termination_condition) cache.abstol = abstol cache.reltol = reltol - cache.termination_condition = termination_condition + cache.tc_cache = tc_cache cache.maxiters = maxiters cache.stats.nf = 1 cache.stats.nsteps = 1 diff --git a/src/dfsane.jl b/src/dfsane.jl index 727a49248..b0de39c49 100644 --- a/src/dfsane.jl +++ b/src/dfsane.jl @@ -63,7 +63,8 @@ function DFSane(; σ_min = 1e-10, σ_max = 1e+10, σ_1 = 1.0, M = 10, γ = 1e-4, n_exp, η_strategy, max_inner_iterations) end -@concrete mutable struct DFSaneCache{iip} +# FIXME: Someone please make this code conform to the style of the remaining solvers +@concrete mutable struct DFSaneCache{iip} <: AbstractNonlinearSolveCache{iip} alg uₙ uₙ₋₁ @@ -91,10 +92,13 @@ end reltol prob stats::NLStats - termination_condition - tc_storage + tc_cache end +get_fu(cache::DFSaneCache) = cache.fuₙ +set_fu!(cache::DFSaneCache, fu) = (cache.fuₙ = fu) +get_u(cache::DFSaneCache) = cache.uₙ + function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::DFSane, args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, termination_condition = nothing, internalnorm::F = DEFAULT_NORM, @@ -124,24 +128,18 @@ function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::DFSane, args. ℋ = fill(f₍ₙₒᵣₘ₎ₙ₋₁, M) - abstol, reltol, termination_condition = _init_termination_elements(abstol, reltol, - termination_condition, T) - - mode = DiffEqBase.get_termination_mode(termination_condition) - - storage = mode ∈ DiffEqBase.SAFE_TERMINATION_MODES ? NLSolveSafeTerminationResult() : - nothing + abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, fuₙ₋₁, uₙ₋₁, + termination_condition) return DFSaneCache{iip}(alg, uₙ, uₙ₋₁, fuₙ, fuₙ₋₁, 𝒹, ℋ, f₍ₙₒᵣₘ₎ₙ₋₁, f₍ₙₒᵣₘ₎₀, M, σₙ, σₘᵢₙ, σₘₐₓ, α₁, γ, τₘᵢₙ, τₘₐₓ, nₑₓₚ, p, false, maxiters, internalnorm, ReturnCode.Default, abstol, reltol, prob, NLStats(1, 0, 0, 0, 0), - termination_condition, storage) + tc_cache) end function perform_step!(cache::DFSaneCache{true}) - @unpack alg, f₍ₙₒᵣₘ₎ₙ₋₁, f₍ₙₒᵣₘ₎₀, σₙ, σₘᵢₙ, σₘₐₓ, α₁, γ, τₘᵢₙ, τₘₐₓ, nₑₓₚ, M, tc_storage = cache + @unpack alg, f₍ₙₒᵣₘ₎ₙ₋₁, f₍ₙₒᵣₘ₎₀, σₙ, σₘᵢₙ, σₘₐₓ, α₁, γ, τₘᵢₙ, τₘₐₓ, nₑₓₚ, M = cache - termination_condition = cache.termination_condition(tc_storage) f = (dx, x) -> cache.prob.f(dx, x, cache.p) T = eltype(cache.uₙ) @@ -184,9 +182,7 @@ function perform_step!(cache::DFSaneCache{true}) f₍ₙₒᵣₘ₎ₙ = norm(cache.fuₙ)^nₑₓₚ end - if termination_condition(cache.fuₙ, cache.uₙ, cache.uₙ₋₁, cache.abstol, cache.reltol) - cache.force_stop = true - end + check_and_update!(cache, cache.fuₙ, cache.uₙ, cache.uₙ₋₁) # Update spectral parameter @. cache.uₙ₋₁ = cache.uₙ - cache.uₙ₋₁ @@ -215,9 +211,8 @@ function perform_step!(cache::DFSaneCache{true}) end function perform_step!(cache::DFSaneCache{false}) - @unpack alg, f₍ₙₒᵣₘ₎ₙ₋₁, f₍ₙₒᵣₘ₎₀, σₙ, σₘᵢₙ, σₘₐₓ, α₁, γ, τₘᵢₙ, τₘₐₓ, nₑₓₚ, M, tc_storage = cache + @unpack alg, f₍ₙₒᵣₘ₎ₙ₋₁, f₍ₙₒᵣₘ₎₀, σₙ, σₘᵢₙ, σₘₐₓ, α₁, γ, τₘᵢₙ, τₘₐₓ, nₑₓₚ, M = cache - termination_condition = cache.termination_condition(tc_storage) f = x -> cache.prob.f(x, cache.p) T = eltype(cache.uₙ) @@ -260,9 +255,7 @@ function perform_step!(cache::DFSaneCache{false}) f₍ₙₒᵣₘ₎ₙ = norm(cache.fuₙ)^nₑₓₚ end - if termination_condition(cache.fuₙ, cache.uₙ, cache.uₙ₋₁, cache.abstol, cache.reltol) - cache.force_stop = true - end + check_and_update!(cache, cache.fuₙ, cache.uₙ, cache.uₙ₋₁) # Update spectral parameter cache.uₙ₋₁ = @. cache.uₙ - cache.uₙ₋₁ @@ -290,26 +283,9 @@ function perform_step!(cache::DFSaneCache{false}) return nothing end -function SciMLBase.solve!(cache::DFSaneCache) - while !cache.force_stop && cache.stats.nsteps < cache.maxiters - cache.stats.nsteps += 1 - perform_step!(cache) - end - - if cache.stats.nsteps == cache.maxiters - cache.retcode = ReturnCode.MaxIters - else - cache.retcode = ReturnCode.Success - end - - return SciMLBase.build_solution(cache.prob, cache.alg, cache.uₙ, cache.fuₙ; - retcode = cache.retcode, stats = cache.stats) -end - function SciMLBase.reinit!(cache::DFSaneCache{iip}, u0 = cache.uₙ; p = cache.p, - abstol = cache.abstol, reltol = cache.reltol, - termination_condition = cache.termination_condition, - maxiters = cache.maxiters) where {iip} + abstol = cache.abstol, reltol = cache.reltol, maxiters = cache.maxiters, + termination_condition = get_termination_mode(cache.tc_cache)) where {iip} cache.p = p if iip recursivecopy!(cache.uₙ, u0) @@ -330,12 +306,12 @@ function SciMLBase.reinit!(cache::DFSaneCache{iip}, u0 = cache.uₙ; p = cache.p T = eltype(cache.uₙ) cache.σₙ = T(cache.alg.σ_1) - termination_condition = _get_reinit_termination_condition(cache, abstol, reltol, + abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, cache.fuₙ, cache.uₙ, termination_condition) cache.abstol = abstol cache.reltol = reltol - cache.termination_condition = termination_condition + cache.tc_cache = tc_cache cache.maxiters = maxiters cache.stats.nf = 1 cache.stats.nsteps = 1 diff --git a/src/gaussnewton.jl b/src/gaussnewton.jl index 89401fab4..c857f2d23 100644 --- a/src/gaussnewton.jl +++ b/src/gaussnewton.jl @@ -76,8 +76,8 @@ end reltol prob stats::NLStats - tc_storage - termination_condition + tc_cache_1 + tc_cache_2 end function SciMLBase.__init(prob::NonlinearLeastSquaresProblem{uType, iip}, alg_::GaussNewton, @@ -101,25 +101,19 @@ function SciMLBase.__init(prob::NonlinearLeastSquaresProblem{uType, iip}, alg_:: JᵀJ, Jᵀf = nothing, nothing end - abstol, reltol, termination_condition = _init_termination_elements(abstol, reltol, - termination_condition, eltype(u); mode = NLSolveTerminationMode.AbsNorm) - - mode = DiffEqBase.get_termination_mode(termination_condition) - - storage = mode ∈ DiffEqBase.SAFE_TERMINATION_MODES ? NLSolveSafeTerminationResult() : - nothing + abstol, reltol, tc_cache_1 = init_termination_cache(abstol, reltol, fu1, u, + termination_condition) + _, _, tc_cache_2 = init_termination_cache(abstol, reltol, fu1, u, termination_condition) return GaussNewtonCache{iip}(f, alg, u, copy(u), fu1, fu2, zero(fu1), du, p, uf, linsolve, J, JᵀJ, Jᵀf, jac_cache, false, maxiters, internalnorm, ReturnCode.Default, - abstol, reltol, prob, NLStats(1, 0, 0, 0, 0), storage, termination_condition) + abstol, reltol, prob, NLStats(1, 0, 0, 0, 0), tc_cache_1, tc_cache_2) end function perform_step!(cache::GaussNewtonCache{true}) - @unpack u, u_prev, fu1, f, p, alg, J, JᵀJ, Jᵀf, linsolve, du, tc_storage = cache + @unpack u, u_prev, fu1, f, p, alg, J, JᵀJ, Jᵀf, linsolve, du = cache jacobian!!(J, cache) - termination_condition = cache.termination_condition(tc_storage) - if JᵀJ !== nothing __matmul!(JᵀJ, J', J) __matmul!(Jᵀf, J', fu1) @@ -137,10 +131,11 @@ function perform_step!(cache::GaussNewtonCache{true}) @. u = u - du f(cache.fu_new, u, p) - (termination_condition(cache.fu_new .- cache.fu1, cache.u, u_prev, cache.abstol, - cache.reltol) || - termination_condition(cache.fu_new, cache.u, u_prev, cache.abstol, cache.reltol)) && - (cache.force_stop = true) + check_and_update!(cache.tc_cache_1, cache, cache.fu_new, cache.u, cache.u_prev) + if !cache.force_stop + cache.fu1 .= cache.fu_new .- cache.fu1 + check_and_update!(cache.tc_cache_2, cache, cache.fu1, cache.u, cache.u_prev) + end @. u_prev = u cache.fu1 .= cache.fu_new @@ -152,9 +147,7 @@ function perform_step!(cache::GaussNewtonCache{true}) end function perform_step!(cache::GaussNewtonCache{false}) - @unpack u, u_prev, fu1, f, p, alg, linsolve, tc_storage = cache - - termination_condition = cache.termination_condition(tc_storage) + @unpack u, u_prev, fu1, f, p, alg, linsolve = cache cache.J = jacobian!!(cache.J, cache) @@ -179,10 +172,13 @@ function perform_step!(cache::GaussNewtonCache{false}) cache.u = @. u - cache.du # `u` might not support mutation cache.fu_new = f(cache.u, p) - termination_condition(cache.fu_new, cache.u, u_prev, cache.abstol, cache.reltol) && - (cache.force_stop = true) + check_and_update!(cache.tc_cache_1, cache, cache.fu_new, cache.u, cache.u_prev) + if !cache.force_stop + cache.fu1 = cache.fu_new .- cache.fu1 + check_and_update!(cache.tc_cache_2, cache, cache.fu1, cache.u, cache.u_prev) + end - cache.u_prev = @. cache.u + cache.u_prev = cache.u cache.fu1 = cache.fu_new cache.stats.nf += 1 cache.stats.njacs += 1 @@ -192,9 +188,8 @@ function perform_step!(cache::GaussNewtonCache{false}) end function SciMLBase.reinit!(cache::GaussNewtonCache{iip}, u0 = cache.u; p = cache.p, - abstol = cache.abstol, reltol = cache.reltol, - termination_condition = cache.termination_condition, - maxiters = cache.maxiters) where {iip} + abstol = cache.abstol, reltol = cache.reltol, maxiters = cache.maxiters, + termination_condition = get_termination_mode(cache.tc_cache)) where {iip} cache.p = p if iip recursivecopy!(cache.u, u0) @@ -205,12 +200,15 @@ function SciMLBase.reinit!(cache::GaussNewtonCache{iip}, u0 = cache.u; p = cache cache.fu1 = cache.f(cache.u, p) end - termination_condition = _get_reinit_termination_condition(cache, abstol, reltol, + abstol, reltol, tc_cache_1 = init_termination_cache(abstol, reltol, cache.fu1, cache.u, + termination_condition) + _, _, tc_cache_2 = init_termination_cache(abstol, reltol, cache.fu1, cache.u, termination_condition) cache.abstol = abstol cache.reltol = reltol - cache.termination_condition = termination_condition + cache.tc_cache_1 = tc_cache_1 + cache.tc_cache_2 = tc_cache_2 cache.maxiters = maxiters cache.stats.nf = 1 cache.stats.nsteps = 1 diff --git a/src/klement.jl b/src/klement.jl index 982c07c3a..cdb146892 100644 --- a/src/klement.jl +++ b/src/klement.jl @@ -62,11 +62,11 @@ end prob stats::NLStats ls_cache - termination_condition - tc_storage + tc_cache end get_fu(cache::GeneralKlementCache) = cache.fu +set_fu!(cache::GeneralKlementCache, fu) = (cache.fu = fu) function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::GeneralKlement, args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, @@ -89,28 +89,20 @@ function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::GeneralKleme linsolve = __setup_linsolve(J, _vec(fu), _vec(du), p, alg) end - abstol, reltol, termination_condition = _init_termination_elements(abstol, reltol, - termination_condition, eltype(u)) - - mode = DiffEqBase.get_termination_mode(termination_condition) - - storage = mode ∈ DiffEqBase.SAFE_TERMINATION_MODES ? NLSolveSafeTerminationResult() : - nothing + abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, fu, u, + termination_condition) return GeneralKlementCache{iip}(f, alg, u, zero(u), fu, zero(fu), du, p, linsolve, J, zero(J), zero(J), _vec(zero(fu)), _vec(zero(fu)), 0, false, maxiters, internalnorm, ReturnCode.Default, abstol, reltol, prob, NLStats(1, 0, 0, 0, 0), - init_linesearch_cache(alg.linesearch, f, u, p, fu, Val(iip)), termination_condition, - storage) + init_linesearch_cache(alg.linesearch, f, u, p, fu, Val(iip)), tc_cache) end function perform_step!(cache::GeneralKlementCache{true}) - @unpack u, u_prev, fu, f, p, alg, J, linsolve, du, tc_storage = cache + @unpack u, u_prev, fu, f, p, alg, J, linsolve, du = cache T = eltype(J) - termination_condition = cache.termination_condition(tc_storage) - singular, fact_done = _try_factorize_and_check_singular!(linsolve, J) if singular @@ -135,8 +127,7 @@ function perform_step!(cache::GeneralKlementCache{true}) _axpy!(-α, du, u) f(cache.fu2, u, p) - termination_condition(cache.fu2, u, u_prev, cache.abstol, cache.reltol) && - (cache.force_stop = true) + check_and_update!(cache, cache.fu2, cache.u, cache.u_prev) cache.stats.nf += 1 cache.stats.nsolve += 1 cache.stats.nfactors += 1 @@ -164,9 +155,7 @@ function perform_step!(cache::GeneralKlementCache{true}) end function perform_step!(cache::GeneralKlementCache{false}) - @unpack fu, f, p, alg, J, linsolve, tc_storage = cache - - termination_condition = cache.termination_condition(tc_storage) + @unpack fu, f, p, alg, J, linsolve = cache T = eltype(J) @@ -197,9 +186,7 @@ function perform_step!(cache::GeneralKlementCache{false}) cache.u = @. cache.u - α * cache.du # `u` might not support mutation cache.fu2 = f(cache.u, p) - termination_condition(cache.fu2, cache.u, cache.u_prev, cache.abstol, cache.reltol) && - (cache.force_stop = true) - + check_and_update!(cache, cache.fu2, cache.u, cache.u_prev) cache.u_prev = cache.u cache.stats.nf += 1 cache.stats.nsolve += 1 @@ -225,9 +212,8 @@ function perform_step!(cache::GeneralKlementCache{false}) end function SciMLBase.reinit!(cache::GeneralKlementCache{iip}, u0 = cache.u; p = cache.p, - abstol = cache.abstol, reltol = cache.reltol, - termination_condition = cache.termination_condition, - maxiters = cache.maxiters) where {iip} + abstol = cache.abstol, reltol = cache.reltol, maxiters = cache.maxiters, + termination_condition = get_termination_mode(cache.tc_cache)) where {iip} cache.p = p if iip recursivecopy!(cache.u, u0) @@ -238,12 +224,12 @@ function SciMLBase.reinit!(cache::GeneralKlementCache{iip}, u0 = cache.u; p = ca cache.fu = cache.f(cache.u, p) end - termination_condition = _get_reinit_termination_condition(cache, abstol, reltol, + abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, cache.fu, cache.u, termination_condition) cache.abstol = abstol cache.reltol = reltol - cache.termination_condition = termination_condition + cache.tc_cache = tc_cache cache.maxiters = maxiters cache.stats.nf = 1 cache.stats.nsteps = 1 diff --git a/src/lbroyden.jl b/src/lbroyden.jl index 3489e87b9..62fad090d 100644 --- a/src/lbroyden.jl +++ b/src/lbroyden.jl @@ -60,11 +60,11 @@ end prob stats::NLStats ls_cache - termination_condition - tc_storage + tc_cache end get_fu(cache::LimitedMemoryBroydenCache) = cache.fu +set_fu!(cache::LimitedMemoryBroydenCache, fu) = (cache.fu = fu) function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::LimitedMemoryBroyden, args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, @@ -86,35 +86,26 @@ function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::LimitedMemory alg.reset_tolerance reset_check = x -> abs(x) ≤ reset_tolerance - abstol, reltol, termination_condition = _init_termination_elements(abstol, reltol, - termination_condition, eltype(u)) - - mode = DiffEqBase.get_termination_mode(termination_condition) - - storage = mode ∈ DiffEqBase.SAFE_TERMINATION_MODES ? NLSolveSafeTerminationResult() : - nothing + abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, fu, u, + termination_condition) return LimitedMemoryBroydenCache{iip}(f, alg, u, zero(u), du, fu, zero(fu), zero(fu), p, U, Vᵀ, similar(u, threshold), similar(u, 1, threshold), zero(u), zero(u), false, 0, 0, alg.max_resets, maxiters, internalnorm, ReturnCode.Default, abstol, reltol, reset_tolerance, reset_check, prob, NLStats(1, 0, 0, 0, 0), - init_linesearch_cache(alg.linesearch, f, u, p, fu, Val(iip)), termination_condition, - storage) + init_linesearch_cache(alg.linesearch, f, u, p, fu, Val(iip)), tc_cache) end function perform_step!(cache::LimitedMemoryBroydenCache{true}) - @unpack f, p, du, u, tc_storage = cache + @unpack f, p, du, u = cache T = eltype(u) - termination_condition = cache.termination_condition(tc_storage) - α = perform_linesearch!(cache.ls_cache, u, du) _axpy!(-α, du, u) f(cache.fu2, u, p) - termination_condition(cache.fu2, cache.u, cache.u_prev, cache.abstol, cache.reltol) && - (cache.force_stop = true) + check_and_update!(cache, cache.fu2, cache.u, cache.u_prev) cache.stats.nf += 1 cache.force_stop && return nothing @@ -163,9 +154,7 @@ function perform_step!(cache::LimitedMemoryBroydenCache{true}) end function perform_step!(cache::LimitedMemoryBroydenCache{false}) - @unpack f, p, tc_storage = cache - - termination_condition = cache.termination_condition(tc_storage) + @unpack f, p = cache T = eltype(cache.u) @@ -173,8 +162,7 @@ function perform_step!(cache::LimitedMemoryBroydenCache{false}) cache.u = cache.u .- α * cache.du cache.fu2 = f(cache.u, p) - termination_condition(cache.fu2, cache.u, cache.u_prev, cache.abstol, cache.reltol) && - (cache.force_stop = true) + check_and_update!(cache, cache.fu2, cache.u, cache.u_prev) cache.stats.nf += 1 cache.force_stop && return nothing @@ -225,7 +213,8 @@ function perform_step!(cache::LimitedMemoryBroydenCache{false}) end function SciMLBase.reinit!(cache::LimitedMemoryBroydenCache{iip}, u0 = cache.u; p = cache.p, - abstol = cache.abstol, maxiters = cache.maxiters) where {iip} + termination_condition = get_termination_mode(cache.tc_cache), + abstol = cache.abstol, reltol = cache.reltol, maxiters = cache.maxiters) where {iip} cache.p = p if iip recursivecopy!(cache.u, u0) @@ -235,7 +224,13 @@ function SciMLBase.reinit!(cache::LimitedMemoryBroydenCache{iip}, u0 = cache.u; cache.u = u0 cache.fu = cache.f(cache.u, p) end + + abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, cache.fu, cache.u, + termination_condition) + cache.abstol = abstol + cache.reltol = reltol + cache.tc_cache = tc_cache cache.maxiters = maxiters cache.stats.nf = 1 cache.stats.nsteps = 1 diff --git a/src/levenberg.jl b/src/levenberg.jl index 3c0dfe95b..f181fcfcc 100644 --- a/src/levenberg.jl +++ b/src/levenberg.jl @@ -157,8 +157,8 @@ end rhs_tmp J² stats::NLStats - termination_condition - tc_storage + tc_cache_1 + tc_cache_2 end function SciMLBase.__init(prob::Union{NonlinearProblem{uType, iip}, @@ -185,9 +185,6 @@ function SciMLBase.__init(prob::Union{NonlinearProblem{uType, iip}, v = similar(du) end - abstol, reltol, termination_condition = _init_termination_elements(abstol, reltol, - termination_condition, eltype(u); mode = NLSolveTerminationMode.AbsNorm) - λ = convert(eltype(u), alg.damping_initial) λ_factor = convert(eltype(u), alg.damping_increase_factor) damping_increase_factor = convert(eltype(u), alg.damping_increase_factor) @@ -213,10 +210,14 @@ function SciMLBase.__init(prob::Union{NonlinearProblem{uType, iip}, make_new_J = true fu_tmp = zero(fu1) - mode = DiffEqBase.get_termination_mode(termination_condition) - - storage = mode ∈ DiffEqBase.SAFE_TERMINATION_MODES ? NLSolveSafeTerminationResult() : - nothing + abstol, reltol, tc_cache_1 = init_termination_cache(abstol, reltol, fu1, u, + termination_condition) + if prob isa NonlinearLeastSquaresProblem + _, _, tc_cache_2 = init_termination_cache(abstol, reltol, fu1, u, + termination_condition) + else + tc_cache_2 = nothing + end if _unwrap_val(linsolve_with_JᵀJ) mat_tmp = zero(JᵀJ) @@ -232,22 +233,14 @@ function SciMLBase.__init(prob::Union{NonlinearProblem{uType, iip}, return LevenbergMarquardtCache{iip, !_unwrap_val(linsolve_with_JᵀJ)}(f, alg, u, copy(u), fu1, fu2, du, p, uf, linsolve, J, jac_cache, false, maxiters, internalnorm, - ReturnCode.Default, abstol, reltol, prob, DᵀD, - JᵀJ, λ, λ_factor, damping_increase_factor, damping_decrease_factor, h, α_geodesic, - b_uphill, min_damping_D, v, a, tmp_vec, v_old, loss, δ, loss, make_new_J, fu_tmp, - zero(u), zero(fu1), mat_tmp, rhs_tmp, J², NLStats(1, 0, 0, 0, 0), - termination_condition, storage) + ReturnCode.Default, abstol, reltol, prob, DᵀD, JᵀJ, λ, λ_factor, + damping_increase_factor, damping_decrease_factor, h, α_geodesic, b_uphill, + min_damping_D, v, a, tmp_vec, v_old, loss, δ, loss, make_new_J, fu_tmp, zero(u), + zero(fu1), mat_tmp, rhs_tmp, J², NLStats(1, 0, 0, 0, 0), tc_cache_1, tc_cache_2) end function perform_step!(cache::LevenbergMarquardtCache{true, fastls}) where {fastls} - @unpack fu1, f, make_new_J, tc_storage = cache - - termination_condition = cache.termination_condition(tc_storage) - - if iszero(fu1) - cache.force_stop = true - return nothing - end + @unpack fu1, f, make_new_J = cache if make_new_J jacobian!!(cache.J, cache) @@ -319,9 +312,11 @@ function perform_step!(cache::LevenbergMarquardtCache{true, fastls}) where {fast if (1 - β)^b_uphill * loss ≤ loss_old # Accept step. cache.u .+= δ - if termination_condition(cache.fu_tmp, u, u_prev, cache.abstol, cache.reltol) - cache.force_stop = true - return nothing + check_and_update!(cache.tc_cache_1, cache, cache.fu_tmp, cache.u, cache.u_prev) + if !cache.force_stop && cache.tc_cache_2 !== nothing + # For NLLS Problems + cache.fu1 .= cache.fu_tmp .- cache.fu1 + check_and_update!(cache.tc_cache_2, cache, cache.fu1, cache.u, cache.u_prev) end cache.fu1 .= cache.fu_tmp _vec(cache.v_old) .= _vec(v) @@ -338,14 +333,7 @@ function perform_step!(cache::LevenbergMarquardtCache{true, fastls}) where {fast end function perform_step!(cache::LevenbergMarquardtCache{false, fastls}) where {fastls} - @unpack fu1, f, make_new_J, tc_storage = cache - - termination_condition = cache.termination_condition(tc_storage) - - if iszero(fu1) - cache.force_stop = true - return nothing - end + @unpack fu1, f, make_new_J = cache if make_new_J cache.J = jacobian!!(cache.J, cache) @@ -417,9 +405,11 @@ function perform_step!(cache::LevenbergMarquardtCache{false, fastls}) where {fas if (1 - β)^b_uphill * loss ≤ loss_old # Accept step. cache.u += δ - if termination_condition(fu_new, cache.u, u_prev, cache.abstol, cache.reltol) - cache.force_stop = true - return nothing + check_and_update!(cache.tc_cache_1, cache, fu_new, cache.u, cache.u_prev) + if !cache.force_stop && cache.tc_cache_2 !== nothing + # For NLLS Problems + cache.fu1 = fu_new .- cache.fu1 + check_and_update!(cache.tc_cache_2, cache, cache.fu1, cache.u, cache.u_prev) end cache.fu1 = fu_new cache.v_old = _restructure(cache.v_old, v) diff --git a/src/pseudotransient.jl b/src/pseudotransient.jl index 1c5691699..56b79bc09 100644 --- a/src/pseudotransient.jl +++ b/src/pseudotransient.jl @@ -74,8 +74,7 @@ end reltol prob stats::NLStats - termination_condition - tc_storage + tc_cache end function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::PseudoTransient, @@ -92,22 +91,16 @@ function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::PseudoTransi alpha = convert(eltype(u), alg.alpha_initial) res_norm = internalnorm(fu1) - abstol, reltol, termination_condition = _init_termination_elements(abstol, - reltol, termination_condition, eltype(u)) - - mode = DiffEqBase.get_termination_mode(termination_condition) - - storage = mode ∈ DiffEqBase.SAFE_TERMINATION_MODES ? NLSolveSafeTerminationResult() : - nothing + abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, fu1, u, + termination_condition) return PseudoTransientCache{iip}(f, alg, u, copy(u), fu1, fu2, du, p, alpha, res_norm, - uf, - linsolve, J, jac_cache, false, maxiters, internalnorm, ReturnCode.Default, abstol, - reltol, prob, NLStats(1, 0, 0, 0, 0), termination_condition, storage) + uf, linsolve, J, jac_cache, false, maxiters, internalnorm, ReturnCode.Default, + abstol, reltol, prob, NLStats(1, 0, 0, 0, 0), tc_cache) end function perform_step!(cache::PseudoTransientCache{true}) - @unpack u, u_prev, fu1, f, p, alg, J, linsolve, du, alpha, tc_storage = cache + @unpack u, u_prev, fu1, f, p, alg, J, linsolve, du, alpha = cache jacobian!!(J, cache) inv_alpha = inv(alpha) @@ -124,8 +117,6 @@ function perform_step!(cache::PseudoTransientCache{true}) end end - termination_condition = cache.termination_condition(tc_storage) - # u = u - J \ fu linres = dolinsolve(alg.precs, linsolve; A = J, b = _vec(fu1), linu = _vec(du), p, reltol = cache.abstol) @@ -137,8 +128,7 @@ function perform_step!(cache::PseudoTransientCache{true}) cache.alpha *= cache.res_norm / new_norm cache.res_norm = new_norm - termination_condition(fu1, u, u_prev, cache.abstol, cache.reltol) && - (cache.force_stop = true) + check_and_update!(cache, cache.fu1, cache.u, cache.u_prev) @. u_prev = u cache.stats.nf += 1 @@ -149,10 +139,7 @@ function perform_step!(cache::PseudoTransientCache{true}) end function perform_step!(cache::PseudoTransientCache{false}) - @unpack u, u_prev, fu1, f, p, alg, linsolve, alpha, tc_storage = cache - - tc_storage = cache.tc_storage - termination_condition = cache.termination_condition(tc_storage) + @unpack u, u_prev, fu1, f, p, alg, linsolve, alpha = cache cache.J = jacobian!!(cache.J, cache) inv_alpha = inv(alpha) @@ -171,9 +158,10 @@ function perform_step!(cache::PseudoTransientCache{false}) new_norm = cache.internalnorm(fu1) cache.alpha *= cache.res_norm / new_norm cache.res_norm = new_norm - termination_condition(fu1, cache.u, u_prev, cache.abstol, cache.reltol) && - (cache.force_stop = true) - cache.u_prev = @. cache.u + + check_and_update!(cache, cache.fu1, cache.u, cache.u_prev) + + cache.u_prev = cache.u cache.stats.nf += 1 cache.stats.njacs += 1 cache.stats.nsolve += 1 @@ -182,9 +170,8 @@ function perform_step!(cache::PseudoTransientCache{false}) end function SciMLBase.reinit!(cache::PseudoTransientCache{iip}, u0 = cache.u; p = cache.p, - alpha_new, - abstol = cache.abstol, reltol = cache.reltol, - termination_condition = cache.termination_condition, + alpha = cache.alpha, abstol = cache.abstol, reltol = cache.reltol, + termination_condition = get_termination_mode(cache.tc_cache), maxiters = cache.maxiters) where {iip} cache.p = p if iip @@ -196,14 +183,14 @@ function SciMLBase.reinit!(cache::PseudoTransientCache{iip}, u0 = cache.u; p = c cache.fu1 = cache.f(cache.u, p) end - termination_condition = _get_reinit_termination_condition(cache, abstol, reltol, + abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, cache.fu1, cache.u, termination_condition) - cache.alpha = convert(eltype(cache.u), alpha_new) + cache.alpha = convert(eltype(cache.u), alpha) cache.res_norm = cache.internalnorm(cache.fu1) cache.abstol = abstol cache.reltol = reltol - cache.termination_condition = termination_condition + cache.tc_cache = tc_cache cache.maxiters = maxiters cache.stats.nf = 1 cache.stats.nsteps = 1 diff --git a/src/raphson.jl b/src/raphson.jl index c9d405de8..1b75d231e 100644 --- a/src/raphson.jl +++ b/src/raphson.jl @@ -85,7 +85,7 @@ function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::NewtonRaphso uf, linsolve, J, fu2, jac_cache, du = jacobian_caches(alg, f, u, p, Val(iip); linsolve_kwargs) - abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, u, + abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, fu1, u, termination_condition) return NewtonRaphsonCache{iip}(f, alg, u, copy(u), fu1, fu2, du, p, uf, linsolve, J, @@ -108,11 +108,7 @@ function perform_step!(cache::NewtonRaphsonCache{true}) _axpy!(-α, du, u) f(cache.fu1, u, p) - if cache.tc_cache(cache.fu1, cache.u, u_prev) - # Stores the best solution in cache! - cache.tc_cache.u !== nothing && copyto!(cache.u, cache.tc_cache.u) - cache.force_stop = true - end + check_and_update!(cache, cache.fu1, cache.u, cache.u_prev) @. u_prev = u cache.stats.nf += 1 @@ -140,11 +136,7 @@ function perform_step!(cache::NewtonRaphsonCache{false}) cache.u = @. u - α * cache.du # `u` might not support mutation cache.fu1 = f(cache.u, p) - if cache.tc_cache(cache.fu1, cache.u, u_prev) - # Stores the best solution in cache! - cache.tc_cache.u !== nothing && (cache.u = cache.tc_cache.u) - cache.force_stop = true - end + check_and_update!(cache, cache.fu1, cache.u, cache.u_prev) cache.u_prev = cache.u cache.stats.nf += 1 @@ -155,9 +147,8 @@ function perform_step!(cache::NewtonRaphsonCache{false}) end function SciMLBase.reinit!(cache::NewtonRaphsonCache{iip}, u0 = cache.u; p = cache.p, - abstol = cache.abstol, reltol = cache.reltol, - termination_condition = get_termination_mode(cache.tc_cache), - maxiters = cache.maxiters) where {iip} + abstol = cache.abstol, reltol = cache.reltol, maxiters = cache.maxiters, + termination_condition = get_termination_mode(cache.tc_cache)) where {iip} cache.p = p if iip recursivecopy!(cache.u, u0) @@ -168,7 +159,7 @@ function SciMLBase.reinit!(cache::NewtonRaphsonCache{iip}, u0 = cache.u; p = cac cache.fu1 = cache.f(cache.u, p) end - abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, cache.u, + abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, cache.fu1, cache.u, termination_condition) cache.abstol = abstol diff --git a/src/trustRegion.jl b/src/trustRegion.jl index 789516847..0070694ff 100644 --- a/src/trustRegion.jl +++ b/src/trustRegion.jl @@ -224,15 +224,13 @@ end p4::floatType ϵ::floatType stats::NLStats - tc_storage - termination_condition + tc_cache end function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::TrustRegion, args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, - termination_condition = nothing, - internalnorm = DEFAULT_NORM, - linsolve_kwargs = (;), kwargs...) where {uType, iip} + termination_condition = nothing, internalnorm = DEFAULT_NORM, linsolve_kwargs = (;), + kwargs...) where {uType, iip} alg = get_concrete_algorithm(alg_, prob) @unpack f, u0, p = prob u = alias_u0 ? u0 : deepcopy(u0) @@ -333,21 +331,15 @@ function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg_::TrustRegion, initial_trust_radius = convert(trustType, 1.0) end - abstol, reltol, termination_condition = _init_termination_elements(abstol, reltol, - termination_condition, eltype(u)) - - mode = DiffEqBase.get_termination_mode(termination_condition) - - storage = mode ∈ DiffEqBase.SAFE_TERMINATION_MODES ? NLSolveSafeTerminationResult() : - nothing + abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, fu1, u, + termination_condition) return TrustRegionCache{iip}(f, alg, u_prev, u, fu_prev, fu1, fu2, p, uf, linsolve, J, jac_cache, false, maxiters, internalnorm, ReturnCode.Default, abstol, reltol, prob, radius_update_scheme, initial_trust_radius, max_trust_radius, step_threshold, shrink_threshold, expand_threshold, shrink_factor, expand_factor, loss, loss_new, H, g, shrink_counter, du, u_tmp, u_gauss_newton, u_cauchy, fu_new, make_new_J, r, - p1, p2, p3, p4, ϵ, - NLStats(1, 0, 0, 0, 0), storage, termination_condition) + p1, p2, p3, p4, ϵ, NLStats(1, 0, 0, 0, 0), tc_cache) end function perform_step!(cache::TrustRegionCache{true}) @@ -433,9 +425,7 @@ function retrospective_step!(cache::TrustRegionCache) end function trust_region_step!(cache::TrustRegionCache) - @unpack fu_new, du, g, H, loss, max_trust_r, radius_update_scheme, tc_storage = cache - - termination_condition = cache.termination_condition(tc_storage) + @unpack fu_new, du, g, H, loss, max_trust_r, radius_update_scheme = cache cache.loss_new = get_loss(fu_new) @@ -466,13 +456,7 @@ function trust_region_step!(cache::TrustRegionCache) # No need to make a new J, no step was taken, so we try again with a smaller trust_r cache.make_new_J = false end - if iszero(cache.fu) || termination_condition(cache.fu, - cache.u, - cache.u_prev, - cache.abstol, - cache.reltol) - cache.force_stop = true - end + check_and_update!(cache, cache.fu, cache.u, cache.u_prev) elseif radius_update_scheme === RadiusUpdateSchemes.NLsolve # accept/reject decision @@ -494,9 +478,7 @@ function trust_region_step!(cache::TrustRegionCache) end # convergence test - if iszero(cache.fu) || cache.internalnorm(cache.fu) < cache.abstol - cache.force_stop = true - end + check_and_update!(cache, cache.fu, cache.u, cache.u_prev) elseif radius_update_scheme === RadiusUpdateSchemes.NocedalWright # accept/reject decision @@ -515,9 +497,7 @@ function trust_region_step!(cache::TrustRegionCache) end # convergence test - if iszero(cache.fu) || cache.internalnorm(cache.fu) < cache.abstol - cache.force_stop = true - end + check_and_update!(cache, cache.fu, cache.u, cache.u_prev) elseif radius_update_scheme === RadiusUpdateSchemes.Hei if r > cache.step_threshold @@ -538,15 +518,8 @@ function trust_region_step!(cache::TrustRegionCache) cache.trust_r = rfunc(r, shrink_threshold, p1, p3, p4, p2) * cache.internalnorm(du) - if iszero(cache.fu) || - termination_condition(cache.fu, - cache.u, - cache.u_prev, - cache.abstol, - cache.reltol) || - cache.internalnorm(g) < cache.ϵ - cache.force_stop = true - end + check_and_update!(cache, cache.fu, cache.u, cache.u_prev) + cache.internalnorm(g) < cache.ϵ && (cache.force_stop = true) elseif radius_update_scheme === RadiusUpdateSchemes.Yuan if r < cache.shrink_threshold @@ -568,15 +541,8 @@ function trust_region_step!(cache::TrustRegionCache) @unpack p1 = cache cache.trust_r = p1 * cache.internalnorm(jvp!(cache)) - if iszero(cache.fu) || - termination_condition(cache.fu, - cache.u, - cache.u_prev, - cache.abstol, - cache.reltol) || - cache.internalnorm(g) < cache.ϵ - cache.force_stop = true - end + check_and_update!(cache, cache.fu, cache.u, cache.u_prev) + cache.internalnorm(g) < cache.ϵ && (cache.force_stop = true) #Fan's update scheme elseif radius_update_scheme === RadiusUpdateSchemes.Fan if r < cache.shrink_threshold @@ -597,15 +563,8 @@ function trust_region_step!(cache::TrustRegionCache) @unpack p1 = cache cache.trust_r = p1 * (cache.internalnorm(cache.fu)^0.99) - if iszero(cache.fu) || - termination_condition(cache.fu, - cache.u, - cache.u_prev, - cache.abstol, - cache.reltol) || - cache.internalnorm(g) < cache.ϵ - cache.force_stop = true - end + check_and_update!(cache, cache.fu, cache.u, cache.u_prev) + cache.internalnorm(g) < cache.ϵ && (cache.force_stop = true) elseif radius_update_scheme === RadiusUpdateSchemes.Bastin if r > cache.step_threshold take_step!(cache) @@ -620,13 +579,7 @@ function trust_region_step!(cache::TrustRegionCache) cache.trust_r *= cache.p2 cache.shrink_counter += 1 end - if iszero(cache.fu) || termination_condition(cache.fu, - cache.u, - cache.u_prev, - cache.abstol, - cache.reltol) - cache.force_stop = true - end + check_and_update!(cache, cache.fu, cache.u, cache.u_prev) end end @@ -733,11 +686,11 @@ function not_terminated(cache::TrustRegionCache) return true end get_fu(cache::TrustRegionCache) = cache.fu +set_fu!(cache::TrustRegionCache, fu) = (cache.fu = fu) function SciMLBase.reinit!(cache::TrustRegionCache{iip}, u0 = cache.u; p = cache.p, - abstol = cache.abstol, reltol = cache.reltol, - termination_condition = cache.termination_condition, - maxiters = cache.maxiters) where {iip} + abstol = cache.abstol, reltol = cache.reltol, maxiters = cache.maxiters, + termination_condition = get_termination_mode(cache.tc_cache)) where {iip} cache.p = p if iip recursivecopy!(cache.u, u0) @@ -748,12 +701,12 @@ function SciMLBase.reinit!(cache::TrustRegionCache{iip}, u0 = cache.u; p = cache cache.fu = cache.f(cache.u, p) end - termination_condition = _get_reinit_termination_condition(cache, abstol, reltol, + abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, cache.fu, cache.u, termination_condition) cache.abstol = abstol cache.reltol = reltol - cache.termination_condition = termination_condition + cache.tc_cache = tc_cache cache.maxiters = maxiters cache.stats.nf = 1 cache.stats.nsteps = 1 diff --git a/src/utils.jl b/src/utils.jl index 704d340cb..1977735f4 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -181,7 +181,7 @@ end Defaults to `mul!(C, A, B)`. However, for sparse matrices uses `C .= A * B`. """ -__matmul!(C, A, B) = mul!(C, A, B)`` +__matmul!(C, A, B) = mul!(C, A, B) __matmul!(C::AbstractSparseMatrix, A, B) = C .= A * B # Concretize Algorithms @@ -208,74 +208,78 @@ function __get_concrete_algorithm(alg, prob) return set_ad(alg, ad) end -function init_termination_cache(abstol, reltol, u, ::Nothing) - return init_termination_cache(abstol, reltol, u, AbsNormTerminationMode()) +function init_termination_cache(abstol, reltol, du, u, ::Nothing) + return init_termination_cache(abstol, reltol, du, u, AbsSafeBestTerminationMode()) end -function init_termination_cache(abstol, reltol, u, tc::AbstractNonlinearTerminationMode) - tc_cache = init(u, tc; abstol, reltol) +function init_termination_cache(abstol, reltol, du, u, tc::AbstractNonlinearTerminationMode) + tc_cache = init(du, u, tc; abstol, reltol) return DiffEqBase.get_abstol(tc_cache), DiffEqBase.get_reltol(tc_cache), tc_cache end -# FIXME: Remove the functions below when we have migrated to the new type stable API -__cvt_real(::Type{T}, ::Nothing) where {T} = nothing -__cvt_real(::Type{T}, x) where {T} = real(T(x)) - -function _get_tolerance(η, tc_η, ::Type{T}) where {T} - fallback_η = real(oneunit(T)) * (eps(real(one(T))))^(4 // 5) - return ifelse(η !== nothing, __cvt_real(T, η), - ifelse(tc_η !== nothing, __cvt_real(T, tc_η), fallback_η)) +function check_and_update!(cache, fu, u, uprev) + return check_and_update!(cache.tc_cache, cache, fu, u, uprev) end - -function _init_termination_elements(abstol, reltol, termination_condition, - ::Type{T}; mode = NLSolveTerminationMode.AbsNorm) where {T} - if termination_condition !== nothing - if abstol !== nothing && abstol != termination_condition.abstol - error("Incompatible absolute tolerances found. The tolerances supplied as the \ - keyword argument and the one supplied in the termination condition should \ - be same.") +function check_and_update!(tc_cache, cache, fu, u, uprev) + return check_and_update!(tc_cache, cache, fu, u, uprev, + DiffEqBase.get_termination_mode(tc_cache)) +end +function check_and_update!(tc_cache, cache, fu, u, uprev, + mode::AbstractNonlinearTerminationMode) + if tc_cache(fu, u, uprev) + # Just a sanity measure! + if isinplace(cache) + cache.prob.f(get_fu(cache), u, cache.prob.p) + else + cache.u = u + set_fu!(cache, cache.prob.f(cache.u, cache.prob.p)) end - if reltol !== nothing && reltol != termination_condition.reltol - error("Incompatible relative tolerances found. The tolerances supplied as the \ - keyword argument and the one supplied in the termination condition should \ - be same.") + cache.force_stop = true + end +end +function check_and_update!(tc_cache, cache, fu, u, uprev, + mode::AbstractSafeNonlinearTerminationMode) + if tc_cache(fu, u, uprev) + if tc_cache.retcode == NonlinearSafeTerminationReturnCode.Success + cache.retcode = ReturnCode.Success end - abstol = _get_tolerance(abstol, termination_condition.abstol, T) - reltol = _get_tolerance(reltol, termination_condition.reltol, T) - return abstol, reltol, termination_condition - else - abstol = _get_tolerance(abstol, nothing, T) - reltol = _get_tolerance(reltol, nothing, T) - termination_condition = NLSolveTerminationCondition(mode; abstol, reltol) - return abstol, reltol, termination_condition + if tc_cache.retcode == NonlinearSafeTerminationReturnCode.PatienceTermination + cache.retcode = ReturnCode.ConvergenceFailure + end + if tc_cache.retcode == NonlinearSafeTerminationReturnCode.ProtectiveTermination + cache.retcode = ReturnCode.Unstable + end + # Just a sanity measure! + if isinplace(cache) + cache.prob.f(get_fu(cache), u, cache.prob.p) + else + cache.u = u + set_fu!(cache, cache.prob.f(cache.u, cache.prob.p)) + end + cache.force_stop = true end end - -function _get_reinit_termination_condition(cache, abstol, reltol, termination_condition) - if termination_condition != cache.termination_condition - if abstol != cache.abstol && abstol != termination_condition.abstol - error("Incompatible absolute tolerances found. The tolerances supplied as the \ - keyword argument and the one supplied in the termination condition \ - should be same.") +function check_and_update!(tc_cache, cache, fu, u, uprev, + mode::AbstractSafeBestNonlinearTerminationMode) + if tc_cache(fu, u, uprev) + if tc_cache.retcode == NonlinearSafeTerminationReturnCode.Success + cache.retcode = ReturnCode.Success end - - if reltol != cache.reltol && reltol != termination_condition.reltol - error("Incompatible absolute tolerances found. The tolerances supplied as the \ - keyword argument and the one supplied in the termination condition \ - should be same.") + if tc_cache.retcode == NonlinearSafeTerminationReturnCode.PatienceTermination + cache.retcode = ReturnCode.ConvergenceFailure end - return termination_condition - else - # Build the termination_condition with new abstol and reltol - return NLSolveTerminationCondition{ - DiffEqBase.get_termination_mode(termination_condition), - eltype(abstol), - typeof(termination_condition.safe_termination_options), - }(abstol, - reltol, - termination_condition.safe_termination_options) + if tc_cache.retcode == NonlinearSafeTerminationReturnCode.ProtectiveTermination + cache.retcode = ReturnCode.Unstable + end + if isinplace(cache) + copyto!(u, tc_cache.u) + cache.prob.f(get_fu(cache), u, cache.prob.p) + else + cache.u = tc_cache.u + set_fu!(cache, cache.prob.f(cache.u, cache.prob.p)) + end + cache.force_stop = true end end -# FIXME: Purge things till here! __init_identity_jacobian(u::Number, _) = u function __init_identity_jacobian(u, fu) diff --git a/test/23_test_problems.jl b/test/23_test_problems.jl index cba67a4ae..7a67d1a9f 100644 --- a/test/23_test_problems.jl +++ b/test/23_test_problems.jl @@ -11,7 +11,7 @@ function test_on_library(problems, dicts, alg_ops, broken_tests, ϵ = 1e-4) @testset "$idx: $(dict["title"])" begin for alg in alg_ops try - sol = solve(nlprob, alg) + sol = solve(nlprob, alg; termination_condition = AbsNormTerminationMode()) problem(res, sol.u, nothing) broken = idx in broken_tests[alg] ? true : false @@ -52,7 +52,7 @@ end broken_tests[alg_ops[1]] = [6, 11, 21] broken_tests[alg_ops[2]] = [6, 11, 21] broken_tests[alg_ops[3]] = [1, 6, 11, 12, 15, 16, 21] - broken_tests[alg_ops[4]] = [1, 6, 8, 11, 16, 21, 22] + broken_tests[alg_ops[4]] = [1, 6, 8, 11, 15, 16, 21, 22] broken_tests[alg_ops[5]] = [6, 21] broken_tests[alg_ops[6]] = [6, 21] @@ -76,7 +76,7 @@ end alg_ops = (DFSane(),) broken_tests = Dict(alg => Int[] for alg in alg_ops) - broken_tests[alg_ops[1]] = [1, 2, 3, 5, 6, 21] + broken_tests[alg_ops[1]] = [1, 2, 3, 4, 5, 6, 11, 22] test_on_library(problems, dicts, alg_ops, broken_tests) end diff --git a/test/basictests.jl b/test/basictests.jl index dae41796e..6602edfb6 100644 --- a/test/basictests.jl +++ b/test/basictests.jl @@ -18,6 +18,13 @@ function newton_fails(u, p) 0.0011552453009332421u .- p end +const TERMINATION_CONDITIONS = [ + SteadyStateDiffEqTerminationMode(), SimpleNonlinearSolveTerminationMode(), + NormTerminationMode(), RelTerminationMode(), RelNormTerminationMode(), + AbsTerminationMode(), AbsNormTerminationMode(), RelSafeTerminationMode(), + AbsSafeTerminationMode(), RelSafeBestTerminationMode(), AbsSafeBestTerminationMode() +] + # --- NewtonRaphson tests --- @testset "NewtonRaphson" begin @@ -124,16 +131,8 @@ end @test all(solve(probN, NewtonRaphson(; autodiff)).u .≈ sqrt(2.0)) end - @testset "Termination condition: $(mode) u0: $(_nameof(u0))" for mode in instances(NLSolveTerminationMode.T), + @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) - - if mode ∈ - (NLSolveTerminationMode.SteadyStateDefault, NLSolveTerminationMode.RelSafeBest, - NLSolveTerminationMode.AbsSafeBest) - continue - end - termination_condition = NLSolveTerminationCondition(mode; abstol = nothing, - reltol = nothing) probN = NonlinearProblem(quadratic_f, u0, 2.0) @test all(solve(probN, NewtonRaphson(); termination_condition).u .≈ sqrt(2.0)) end @@ -296,16 +295,8 @@ end end end - @testset "Termination condition: $(mode) u0: $(_nameof(u0))" for mode in instances(NLSolveTerminationMode.T), + @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) - - if mode ∈ - (NLSolveTerminationMode.SteadyStateDefault, NLSolveTerminationMode.RelSafeBest, - NLSolveTerminationMode.AbsSafeBest) - continue - end - termination_condition = NLSolveTerminationCondition(mode; abstol = nothing, - reltol = nothing) probN = NonlinearProblem(quadratic_f, u0, 2.0) @test all(solve(probN, TrustRegion(); termination_condition).u .≈ sqrt(2.0)) end @@ -420,16 +411,8 @@ end end end - @testset "Termination condition: $(mode) u0: $(_nameof(u0))" for mode in instances(NLSolveTerminationMode.T), + @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) - - if mode ∈ - (NLSolveTerminationMode.SteadyStateDefault, NLSolveTerminationMode.RelSafeBest, - NLSolveTerminationMode.AbsSafeBest) - continue - end - termination_condition = NLSolveTerminationCondition(mode; abstol = nothing, - reltol = nothing) probN = NonlinearProblem(quadratic_f, u0, 2.0) @test all(solve(probN, LevenbergMarquardt(); termination_condition).u .≈ sqrt(2.0)) end @@ -571,16 +554,8 @@ end end end - @testset "Termination condition: $(mode) u0: $(_nameof(u0))" for mode in instances(NLSolveTerminationMode.T), + @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) - - if mode ∈ - (NLSolveTerminationMode.SteadyStateDefault, NLSolveTerminationMode.RelSafeBest, - NLSolveTerminationMode.AbsSafeBest) - continue - end - termination_condition = NLSolveTerminationCondition(mode; abstol = nothing, - reltol = nothing) probN = NonlinearProblem(quadratic_f, u0, 2.0) @test all(solve(probN, DFSane(); termination_condition).u .≈ sqrt(2.0)) end @@ -701,16 +676,8 @@ end @test all(abs.(newton_fails(sol.u, p)) .< 1e-10) end - @testset "Termination condition: $(mode) u0: $(_nameof(u0))" for mode in instances(NLSolveTerminationMode.T), + @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) - - if mode ∈ - (NLSolveTerminationMode.SteadyStateDefault, NLSolveTerminationMode.RelSafeBest, - NLSolveTerminationMode.AbsSafeBest) - continue - end - termination_condition = NLSolveTerminationCondition(mode; abstol = nothing, - reltol = nothing) probN = NonlinearProblem(quadratic_f, u0, 2.0) @test all(solve(probN, PseudoTransient(; alpha_initial = 10.0); termination_condition).u .≈ sqrt(2.0)) @@ -805,6 +772,12 @@ end p = range(0.01, 2, length = 200) @test nlprob_iterator_interface(quadratic_f, p, Val(false)) ≈ sqrt.(p) @test nlprob_iterator_interface(quadratic_f!, p, Val(true)) ≈ sqrt.(p) + + @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, + u0 in (1.0, [1.0, 1.0]) + probN = NonlinearProblem(quadratic_f, u0, 2.0) + @test all(solve(probN, GeneralBroyden(); termination_condition).u .≈ sqrt(2.0)) + end end # --- GeneralKlement tests --- @@ -895,6 +868,12 @@ end p = range(0.01, 2, length = 200) @test nlprob_iterator_interface(quadratic_f, p, Val(false)) ≈ sqrt.(p) @test nlprob_iterator_interface(quadratic_f!, p, Val(true)) ≈ sqrt.(p) + + @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, + u0 in (1.0, [1.0, 1.0]) + probN = NonlinearProblem(quadratic_f, u0, 2.0) + @test all(solve(probN,GeneralKlement(); termination_condition).u .≈ sqrt(2.0)) + end end # --- LimitedMemoryBroyden tests --- @@ -985,4 +964,11 @@ end p = range(0.01, 2, length = 200) @test nlprob_iterator_interface(quadratic_f, p, Val(false))≈sqrt.(p) atol=1e-2 @test nlprob_iterator_interface(quadratic_f!, p, Val(true))≈sqrt.(p) atol=1e-2 + + @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, + u0 in (1.0, [1.0, 1.0]) + probN = NonlinearProblem(quadratic_f, u0, 2.0) + @test all(solve(probN, LimitedMemoryBroyden(); + termination_condition).u .≈ sqrt(2.0)) + end end diff --git a/test/gpu.jl b/test/gpu.jl index 43f12672a..daeee0c58 100644 --- a/test/gpu.jl +++ b/test/gpu.jl @@ -15,7 +15,7 @@ prob = NonlinearProblem(f, u0) # TrustRegion is broken # LimitedMemoryBroyden will diverge! for alg in (NewtonRaphson(), LevenbergMarquardt(; linsolve = QRFactorization()), - PseudoTransient(; alpha_initial = 10.0f0), GeneralKlement(), GeneralBroyden(), + PseudoTransient(; alpha_initial = 1.0f0), GeneralKlement(), GeneralBroyden(), LimitedMemoryBroyden()) @test_nowarn sol = solve(prob, alg; abstol = 1.0f-8, reltol = 1.0f-8) end @@ -27,7 +27,7 @@ prob = NonlinearProblem{false}(f, u0) # TrustRegion is broken # LimitedMemoryBroyden will diverge! for alg in (NewtonRaphson(), LevenbergMarquardt(; linsolve = QRFactorization()), - PseudoTransient(; alpha_initial = 10.0f0), GeneralKlement(), GeneralBroyden(), + PseudoTransient(; alpha_initial = 1.0f0), GeneralKlement(), GeneralBroyden(), LimitedMemoryBroyden()) @test_nowarn sol = solve(prob, alg; abstol = 1.0f-8, reltol = 1.0f-8) end diff --git a/test/polyalgs.jl b/test/polyalgs.jl index 4f861c20b..01fd011b6 100644 --- a/test/polyalgs.jl +++ b/test/polyalgs.jl @@ -34,7 +34,7 @@ function f(du, u, p) end prob = NonlinearProblem(f, [2.0, 2.0, 2.0], [1.0, 2.0, 2.5]) -sol = solve(prob) +sol = solve(prob; abstol=1e-9) @test SciMLBase.successful_retcode(sol) # https://github.com/SciML/NonlinearSolve.jl/issues/187 @@ -43,11 +43,11 @@ ff(u, p) = 0.5 / 1.5 * NaNMath.log.(u ./ (1.0 .- u)) .- 2.0 * u .+ 1.0 uspan = (0.02, 0.1) prob = IntervalNonlinearProblem(ff, uspan) -sol = solve(prob) +sol = solve(prob; abstol=1e-9) @test SciMLBase.successful_retcode(sol) u0 = 0.06 p = 2.0 prob = NonlinearProblem(ff, u0, p) -sol = solve(prob) +sol = solve(prob; abstol=1e-9) @test SciMLBase.successful_retcode(sol) diff --git a/test/sparse.jl b/test/sparse.jl index 256ca7530..ce338489e 100644 --- a/test/sparse.jl +++ b/test/sparse.jl @@ -52,7 +52,6 @@ fill!(jac_prototype, 0) ff = NonlinearFunction(brusselator_2d_loop; jac_prototype) prob_brusselator_2d = NonlinearProblem(ff, u0, p) -# for autodiff in [false, ] sol = solve(prob_brusselator_2d, NewtonRaphson()) @test norm(sol.resid) < 1e-8 @test !all(iszero, jac_prototype) From 8c700ed6aaeedf0a7953893a25545046fa27c329 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Mon, 30 Oct 2023 16:08:34 -0400 Subject: [PATCH 17/28] Should make tests pass --- Manifest.toml | 2 +- src/NonlinearSolve.jl | 1 + src/dfsane.jl | 1 + src/utils.jl | 14 ++++++-------- test/basictests.jl | 27 ++++++++++----------------- 5 files changed, 19 insertions(+), 26 deletions(-) diff --git a/Manifest.toml b/Manifest.toml index 7a9729bd6..4fb69b6ae 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -164,7 +164,7 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" [[deps.DiffEqBase]] deps = ["ArrayInterface", "ChainRulesCore", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces", "ZygoteRules"] -git-tree-sha1 = "4e661d0beddac31da05e71b79afd769232622de8" +git-tree-sha1 = "0ab52aef95c5cc71e9a8c9d26919ce1f7fb472fa" repo-rev = "ap/tstable_termination" repo-url = "https://github.com/SciML/DiffEqBase.jl" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" diff --git a/src/NonlinearSolve.jl b/src/NonlinearSolve.jl index 5557ecd0d..d7219ae9b 100644 --- a/src/NonlinearSolve.jl +++ b/src/NonlinearSolve.jl @@ -58,6 +58,7 @@ end get_fu(cache::AbstractNonlinearSolveCache) = cache.fu1 set_fu!(cache::AbstractNonlinearSolveCache, fu) = (cache.fu1 = fu) get_u(cache::AbstractNonlinearSolveCache) = cache.u +set_u!(cache::AbstractNonlinearSolveCache, u) = (cache.u = u) function SciMLBase.solve!(cache::AbstractNonlinearSolveCache) while not_terminated(cache) diff --git a/src/dfsane.jl b/src/dfsane.jl index b0de39c49..f78d40411 100644 --- a/src/dfsane.jl +++ b/src/dfsane.jl @@ -98,6 +98,7 @@ end get_fu(cache::DFSaneCache) = cache.fuₙ set_fu!(cache::DFSaneCache, fu) = (cache.fuₙ = fu) get_u(cache::DFSaneCache) = cache.uₙ +set_u!(cache::DFSaneCache, u) = (cache.uₙ = u) function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::DFSane, args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, diff --git a/src/utils.jl b/src/utils.jl index 1977735f4..2777c93e4 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -230,8 +230,7 @@ function check_and_update!(tc_cache, cache, fu, u, uprev, if isinplace(cache) cache.prob.f(get_fu(cache), u, cache.prob.p) else - cache.u = u - set_fu!(cache, cache.prob.f(cache.u, cache.prob.p)) + set_fu!(cache, cache.prob.f(u, cache.prob.p)) end cache.force_stop = true end @@ -252,8 +251,7 @@ function check_and_update!(tc_cache, cache, fu, u, uprev, if isinplace(cache) cache.prob.f(get_fu(cache), u, cache.prob.p) else - cache.u = u - set_fu!(cache, cache.prob.f(cache.u, cache.prob.p)) + set_fu!(cache, cache.prob.f(u, cache.prob.p)) end cache.force_stop = true end @@ -271,11 +269,11 @@ function check_and_update!(tc_cache, cache, fu, u, uprev, cache.retcode = ReturnCode.Unstable end if isinplace(cache) - copyto!(u, tc_cache.u) - cache.prob.f(get_fu(cache), u, cache.prob.p) + copyto!(get_u(cache), tc_cache.u) + cache.prob.f(get_fu(cache), get_u(cache), cache.prob.p) else - cache.u = tc_cache.u - set_fu!(cache, cache.prob.f(cache.u, cache.prob.p)) + set_u!(cache, tc_cache.u) + set_fu!(cache, cache.prob.f(get_u(cache), cache.prob.p)) end cache.force_stop = true end diff --git a/test/basictests.jl b/test/basictests.jl index 6602edfb6..fafcb1453 100644 --- a/test/basictests.jl +++ b/test/basictests.jl @@ -453,7 +453,6 @@ end end @testset "[OOP] [Immutable AD]" begin - broken_forwarddiff = [3.0, 4.0, 81.0] for p in 1.1:0.1:100.0 res = abs.(benchmark_nlsolve_oop(quadratic_f, @SVector[1.0, 1.0], p).u) @@ -461,9 +460,6 @@ end @test_broken all(res .≈ sqrt(p)) @test_broken abs.(ForwardDiff.derivative(p -> benchmark_nlsolve_oop(quadratic_f, @SVector[1.0, 1.0], p).u[end], p)) ≈ 1 / (2 * sqrt(p)) - elseif p in broken_forwarddiff - @test_broken abs.(ForwardDiff.derivative(p -> benchmark_nlsolve_oop(quadratic_f, - @SVector[1.0, 1.0], p).u[end], p)) ≈ 1 / (2 * sqrt(p)) else @test all(res .≈ sqrt(p)) @test isapprox(abs.(ForwardDiff.derivative(p -> benchmark_nlsolve_oop(quadratic_f, @@ -473,7 +469,6 @@ end end @testset "[OOP] [Scalar AD]" begin - broken_forwarddiff = [3.0, 4.0, 81.0] for p in 1.1:0.1:100.0 res = abs(benchmark_nlsolve_oop(quadratic_f, 1.0, p).u) @@ -481,9 +476,6 @@ end @test_broken res ≈ sqrt(p) @test_broken abs.(ForwardDiff.derivative(p -> benchmark_nlsolve_oop(quadratic_f, 1.0, p).u, p)) ≈ 1 / (2 * sqrt(p)) - elseif p in broken_forwarddiff - @test_broken abs.(ForwardDiff.derivative(p -> benchmark_nlsolve_oop(quadratic_f, - 1.0, p).u, p)) ≈ 1 / (2 * sqrt(p)) else @test res ≈ sqrt(p) @test isapprox(abs.(ForwardDiff.derivative(p -> benchmark_nlsolve_oop(quadratic_f, @@ -549,7 +541,6 @@ end probN = NonlinearProblem{false}(quadratic_f, [1.0, 1.0], 2.0) sol = solve(probN, alg, abstol = 1e-11) - println(abs.(quadratic_f(sol.u, 2.0))) @test all(abs.(quadratic_f(sol.u, 2.0)) .< 1e-10) end end @@ -644,13 +635,11 @@ end function nlprob_iterator_interface(f, p_range, ::Val{iip}) where {iip} probN = NonlinearProblem{iip}(f, iip ? [0.5] : 0.5, p_range[begin]) - cache = init(probN, - PseudoTransient(alpha_initial = 10.0); - maxiters = 100, + cache = init(probN, PseudoTransient(alpha_initial = 10.0); maxiters = 100, abstol = 1e-10) sols = zeros(length(p_range)) for (i, p) in enumerate(p_range) - reinit!(cache, iip ? [cache.u[1]] : cache.u; p = p, alpha_new = 10.0) + reinit!(cache, iip ? [cache.u[1]] : cache.u; p = p, alpha = 10.0) sol = solve!(cache) sols[i] = iip ? sol.u[1] : sol.u end @@ -879,14 +868,18 @@ end # --- LimitedMemoryBroyden tests --- @testset "LimitedMemoryBroyden" begin - function benchmark_nlsolve_oop(f, u0, p = 2.0; linesearch = LineSearch()) + function benchmark_nlsolve_oop(f, u0, p = 2.0; linesearch = LineSearch(), + termination_condition = AbsNormTerminationMode()) prob = NonlinearProblem{false}(f, u0, p) - return solve(prob, LimitedMemoryBroyden(; linesearch), abstol = 1e-9) + return solve(prob, LimitedMemoryBroyden(; linesearch); abstol = 1e-9, + termination_condition) end - function benchmark_nlsolve_iip(f, u0, p = 2.0; linesearch = LineSearch()) + function benchmark_nlsolve_iip(f, u0, p = 2.0; linesearch = LineSearch(), + termination_condition = AbsNormTerminationMode()) prob = NonlinearProblem{true}(f, u0, p) - return solve(prob, LimitedMemoryBroyden(; linesearch), abstol = 1e-9) + return solve(prob, LimitedMemoryBroyden(; linesearch); abstol = 1e-9, + termination_condition) end @testset "LineSearch: $(_nameof(lsmethod)) LineSearch AD: $(_nameof(ad))" for lsmethod in (Static(), From 894af670775b84e97b97cbf2371af026a5f80227 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Mon, 30 Oct 2023 16:41:54 -0400 Subject: [PATCH 18/28] Docs --- Manifest.toml | 2 +- docs/pages.jl | 1 - docs/src/basics/TerminationCondition.md | 71 +++++++++++++++++++- docs/src/tutorials/termination_conditions.md | 3 - test/23_test_problems.jl | 3 +- test/basictests.jl | 16 +++-- test/polyalgs.jl | 6 +- 7 files changed, 86 insertions(+), 16 deletions(-) delete mode 100644 docs/src/tutorials/termination_conditions.md diff --git a/Manifest.toml b/Manifest.toml index 4fb69b6ae..e62925a59 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -164,7 +164,7 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" [[deps.DiffEqBase]] deps = ["ArrayInterface", "ChainRulesCore", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces", "ZygoteRules"] -git-tree-sha1 = "0ab52aef95c5cc71e9a8c9d26919ce1f7fb472fa" +git-tree-sha1 = "94384b09e50ea01819b6db01ac08403ebe09bf65" repo-rev = "ap/tstable_termination" repo-url = "https://github.com/SciML/DiffEqBase.jl" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" diff --git a/docs/pages.jl b/docs/pages.jl index f1b239bc9..a68b0f8e2 100644 --- a/docs/pages.jl +++ b/docs/pages.jl @@ -6,7 +6,6 @@ pages = ["index.md", "Handling Large Ill-Conditioned and Sparse Systems" => "tutorials/large_systems.md", "Symbolic System Definition and Acceleration via ModelingToolkit" => "tutorials/modelingtoolkit.md", "tutorials/small_compile.md", - "tutorials/termination_conditions.md", "tutorials/iterator_interface.md"], "Basics" => Any["basics/NonlinearProblem.md", "basics/NonlinearFunctions.md", diff --git a/docs/src/basics/TerminationCondition.md b/docs/src/basics/TerminationCondition.md index 97bec6d32..a4ff5272b 100644 --- a/docs/src/basics/TerminationCondition.md +++ b/docs/src/basics/TerminationCondition.md @@ -1,10 +1,75 @@ # [Termination Conditions](@id termination_condition) Provides a API to specify termination conditions for [`NonlinearProblem`](@ref) and -[`SteadyStateProblem`](@ref). For details on the various termination modes, i.e., -NLSolveTerminationMode, see the documentation for [`NLSolveTerminationCondition`](@ref). +[`SteadyStateProblem`](@ref). For details on the various termination modes: -## Termination Condition API +## Termination Conditions + +The termination condition is constructed as: + +```julia +cache = init(du, u, AbsNormTerminationMode(); abstol = 1e-9, reltol = 1e-9) +``` + +If `abstol` and `reltol` are not supplied, then we choose a default based on the element +types of `du` and `u`. + +We can query the `cache` using `DiffEqBase.get_termination_mode`, `DiffEqBase.get_abstol` +and `DiffEqBase.get_reltol`. + +To test for termination simply call the `cache`: + +```julia +terminated = cache(du, u, uprev) +``` + +!!! note + + The default for NonlinearSolve.jl is `AbsSafeBestTerminationMode`! + +### Absolute Tolerance + +```@docs +AbsTerminationMode +AbsNormTerminationMode +AbsSafeTerminationMode +AbsSafeBestTerminationMode +``` + +### Relative Tolerance + +```@docs +RelTerminationMode +RelNormTerminationMode +RelSafeTerminationMode +RelSafeBestTerminationMode +``` + +### Both Absolute and Relative Tolerance + +```@docs +NormTerminationMode +SteadyStateDiffEqTerminationMode +SimpleNonlinearSolveTerminationMode +``` + +### Return Codes + +```@docs +DiffEqBase.NonlinearSafeTerminationReturnCode +DiffEqBase.NonlinearSafeTerminationReturnCode.Success +DiffEqBase.NonlinearSafeTerminationReturnCode.Default +DiffEqBase.NonlinearSafeTerminationReturnCode.Failure +DiffEqBase.NonlinearSafeTerminationReturnCode.PatienceTermination +DiffEqBase.NonlinearSafeTerminationReturnCode.ProtectiveTermination +``` + +## [Deprecated] Termination Condition API + +!!! warning + + This is deprecated. Currently only parts of `SimpleNonlinearSolve` uses this API. That + will also be phased out soon! ```@docs NLSolveTerminationCondition diff --git a/docs/src/tutorials/termination_conditions.md b/docs/src/tutorials/termination_conditions.md deleted file mode 100644 index 6a7e8a3cd..000000000 --- a/docs/src/tutorials/termination_conditions.md +++ /dev/null @@ -1,3 +0,0 @@ -# [More Detailed Termination Conditions](@id termination_conditions_tutorial) - -This is a stub article to be completed soon. diff --git a/test/23_test_problems.jl b/test/23_test_problems.jl index 7a67d1a9f..5ec5e611f 100644 --- a/test/23_test_problems.jl +++ b/test/23_test_problems.jl @@ -11,7 +11,8 @@ function test_on_library(problems, dicts, alg_ops, broken_tests, ϵ = 1e-4) @testset "$idx: $(dict["title"])" begin for alg in alg_ops try - sol = solve(nlprob, alg; termination_condition = AbsNormTerminationMode()) + sol = solve(nlprob, alg; + termination_condition = AbsNormTerminationMode()) problem(res, sol.u, nothing) broken = idx in broken_tests[alg] ? true : false diff --git a/test/basictests.jl b/test/basictests.jl index fafcb1453..d9fc47a1e 100644 --- a/test/basictests.jl +++ b/test/basictests.jl @@ -22,7 +22,7 @@ const TERMINATION_CONDITIONS = [ SteadyStateDiffEqTerminationMode(), SimpleNonlinearSolveTerminationMode(), NormTerminationMode(), RelTerminationMode(), RelNormTerminationMode(), AbsTerminationMode(), AbsNormTerminationMode(), RelSafeTerminationMode(), - AbsSafeTerminationMode(), RelSafeBestTerminationMode(), AbsSafeBestTerminationMode() + AbsSafeTerminationMode(), RelSafeBestTerminationMode(), AbsSafeBestTerminationMode(), ] # --- NewtonRaphson tests --- @@ -133,6 +133,7 @@ const TERMINATION_CONDITIONS = [ @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) + probN = NonlinearProblem(quadratic_f, u0, 2.0) @test all(solve(probN, NewtonRaphson(); termination_condition).u .≈ sqrt(2.0)) end @@ -297,6 +298,7 @@ end @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) + probN = NonlinearProblem(quadratic_f, u0, 2.0) @test all(solve(probN, TrustRegion(); termination_condition).u .≈ sqrt(2.0)) end @@ -413,6 +415,7 @@ end @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) + probN = NonlinearProblem(quadratic_f, u0, 2.0) @test all(solve(probN, LevenbergMarquardt(); termination_condition).u .≈ sqrt(2.0)) end @@ -547,6 +550,7 @@ end @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) + probN = NonlinearProblem(quadratic_f, u0, 2.0) @test all(solve(probN, DFSane(); termination_condition).u .≈ sqrt(2.0)) end @@ -667,6 +671,7 @@ end @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) + probN = NonlinearProblem(quadratic_f, u0, 2.0) @test all(solve(probN, PseudoTransient(; alpha_initial = 10.0); termination_condition).u .≈ sqrt(2.0)) @@ -764,6 +769,7 @@ end @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) + probN = NonlinearProblem(quadratic_f, u0, 2.0) @test all(solve(probN, GeneralBroyden(); termination_condition).u .≈ sqrt(2.0)) end @@ -860,8 +866,9 @@ end @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) + probN = NonlinearProblem(quadratic_f, u0, 2.0) - @test all(solve(probN,GeneralKlement(); termination_condition).u .≈ sqrt(2.0)) + @test all(solve(probN, GeneralKlement(); termination_condition).u .≈ sqrt(2.0)) end end @@ -876,7 +883,7 @@ end end function benchmark_nlsolve_iip(f, u0, p = 2.0; linesearch = LineSearch(), - termination_condition = AbsNormTerminationMode()) + termination_condition = AbsNormTerminationMode()) prob = NonlinearProblem{true}(f, u0, p) return solve(prob, LimitedMemoryBroyden(; linesearch); abstol = 1e-9, termination_condition) @@ -960,8 +967,9 @@ end @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) + probN = NonlinearProblem(quadratic_f, u0, 2.0) - @test all(solve(probN, LimitedMemoryBroyden(); + @test all(solve(probN, LimitedMemoryBroyden(); termination_condition).u .≈ sqrt(2.0)) end end diff --git a/test/polyalgs.jl b/test/polyalgs.jl index 01fd011b6..4b5377159 100644 --- a/test/polyalgs.jl +++ b/test/polyalgs.jl @@ -34,7 +34,7 @@ function f(du, u, p) end prob = NonlinearProblem(f, [2.0, 2.0, 2.0], [1.0, 2.0, 2.5]) -sol = solve(prob; abstol=1e-9) +sol = solve(prob; abstol = 1e-9) @test SciMLBase.successful_retcode(sol) # https://github.com/SciML/NonlinearSolve.jl/issues/187 @@ -43,11 +43,11 @@ ff(u, p) = 0.5 / 1.5 * NaNMath.log.(u ./ (1.0 .- u)) .- 2.0 * u .+ 1.0 uspan = (0.02, 0.1) prob = IntervalNonlinearProblem(ff, uspan) -sol = solve(prob; abstol=1e-9) +sol = solve(prob; abstol = 1e-9) @test SciMLBase.successful_retcode(sol) u0 = 0.06 p = 2.0 prob = NonlinearProblem(ff, u0, p) -sol = solve(prob; abstol=1e-9) +sol = solve(prob; abstol = 1e-9) @test SciMLBase.successful_retcode(sol) From 131151964197564f75a27d61853f7990e2ee5f9a Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Mon, 30 Oct 2023 19:49:23 -0400 Subject: [PATCH 19/28] Cancel intermediate builds --- .github/workflows/CI.yml | 5 +++++ .github/workflows/Downstream.yml | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b8e0c0c0b..3bcd2581a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,6 +10,11 @@ on: - master paths-ignore: - 'docs/**' +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: only if it is a pull request build. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} jobs: test: runs-on: ubuntu-latest diff --git a/.github/workflows/Downstream.yml b/.github/workflows/Downstream.yml index f8110ab41..b977c8409 100644 --- a/.github/workflows/Downstream.yml +++ b/.github/workflows/Downstream.yml @@ -4,7 +4,11 @@ on: branches: [master] tags: [v*] pull_request: - +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: only if it is a pull request build. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} jobs: test: name: ${{ matrix.package.repo }}/${{ matrix.package.group }}/${{ matrix.julia-version }} From 8b12f2e8374fce6a57b781e3a56e8e6d5d8e9362 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Tue, 31 Oct 2023 10:34:31 -0400 Subject: [PATCH 20/28] Enable tag checking --- Manifest.toml | 18 +++++++++--------- src/utils.jl | 21 ++++++++------------- test/sparse.jl | 10 +++++++++- 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/Manifest.toml b/Manifest.toml index e62925a59..b4503615c 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -164,8 +164,8 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" [[deps.DiffEqBase]] deps = ["ArrayInterface", "ChainRulesCore", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces", "ZygoteRules"] -git-tree-sha1 = "94384b09e50ea01819b6db01ac08403ebe09bf65" -repo-rev = "ap/tstable_termination" +git-tree-sha1 = "53ad089996089756cae5a098b1a0542aeaab466f" +repo-rev = "master" repo-url = "https://github.com/SciML/DiffEqBase.jl" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" version = "6.136.0" @@ -425,9 +425,9 @@ uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.LinearSolve]] deps = ["ArrayInterface", "ConcreteStructs", "DocStringExtensions", "EnumX", "EnzymeCore", "FastLapackInterface", "GPUArraysCore", "InteractiveUtils", "KLU", "Krylov", "Libdl", "LinearAlgebra", "MKL_jll", "PrecompileTools", "Preferences", "RecursiveFactorization", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Sparspak", "SuiteSparse", "UnPack"] -git-tree-sha1 = "27732d23d88534a7b735dcf8f411daf34293a39e" +git-tree-sha1 = "9f807ca41005f9a8f092716e48022ee5b36cf5b1" uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "2.14.0" +version = "2.14.1" [deps.LinearSolve.extensions] LinearSolveBandedMatricesExt = "BandedMatrices" @@ -639,9 +639,9 @@ version = "1.3.4" [[deps.RecursiveArrayTools]] deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "Requires", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] -git-tree-sha1 = "d7087c013e8a496ff396bae843b1e16d9a30ede8" +git-tree-sha1 = "fa453b42ba1623bd2e70260bf44dac850a3430a7" uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" -version = "2.38.10" +version = "2.39.0" [deps.RecursiveArrayTools.extensions] RecursiveArrayToolsMeasurementsExt = "Measurements" @@ -689,9 +689,9 @@ version = "0.1.0" [[deps.SLEEFPirates]] deps = ["IfElse", "Static", "VectorizationBase"] -git-tree-sha1 = "f5c896d781486f1d67c8492f0e0ead2c3517208c" +git-tree-sha1 = "3aac6d68c5e57449f5b9b865c9ba50ac2970c4cf" uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" -version = "0.6.41" +version = "0.6.42" [[deps.SciMLBase]] deps = ["ADTypes", "ArrayInterface", "ChainRulesCore", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FillArrays", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables", "TruncatedStacktraces", "ZygoteRules"] @@ -766,7 +766,7 @@ version = "1.10.0" [[deps.SparseDiffTools]] deps = ["ADTypes", "Adapt", "ArrayInterface", "Compat", "DataStructures", "FiniteDiff", "ForwardDiff", "Graphs", "LinearAlgebra", "PackageExtensionCompat", "Random", "Reexport", "SciMLOperators", "Setfield", "SparseArrays", "StaticArrayInterface", "StaticArrays", "Tricks", "UnPack", "VertexSafeGraphs"] -git-tree-sha1 = "5188e5e415908a19a41cd90d8ab74a23affacba6" +git-tree-sha1 = "888937b8348e1e9ffae1c31efa61e693bc5463ba" repo-rev = "ap/tagging" repo-url = "https://github.com/avik-pal/SparseDiffTools.jl" uuid = "47a9eef4-7e08-11e9-0b38-333d64bd3804" diff --git a/src/utils.jl b/src/utils.jl index 2777c93e4..ba1230258 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -10,6 +10,11 @@ end struct NonlinearSolveTag end +function ForwardDiff.checktag(::Type{<:ForwardDiff.Tag{<:NonlinearSolveTag, <:T}}, f::F, + x::AbstractArray{T}) where {T, F} + return true +end + """ default_adargs_to_adtype(; chunk_size = Val{0}(), autodiff = Val{true}(), standardtag = Val{true}(), diff_type = Val{:forward}) @@ -43,7 +48,8 @@ function default_adargs_to_adtype(; chunk_size = missing, autodiff = nothing, ad = _unwrap_val(autodiff) # We don't really know the typeof the input yet, so we can't use the correct tag! - ad && return AutoForwardDiff{_unwrap_val(chunk_size), Nothing}(nothing) + ad && return AutoForwardDiff{_unwrap_val(chunk_size), NonlinearSolveTag}(; + tag = NonlinearSolveTag()) return AutoFiniteDiff(; fdtype = diff_type) end @@ -117,17 +123,6 @@ function wrapprecs(_Pl, _Pr, weight) return Pl, Pr end -function _nfcount(N, ::Type{diff_type}) where {diff_type} - if diff_type === Val{:complex} - tmp = N - elseif diff_type === Val{:forward} - tmp = N + 1 - else - tmp = 2N - end - return tmp -end - get_loss(fu) = norm(fu)^2 / 2 function rfunc(r::R, c2::R, M::R, γ1::R, γ2::R, β::R) where {R <: Real} # R-function for adaptive trust region method @@ -203,7 +198,7 @@ function __get_concrete_algorithm(alg, prob) use_sparse_ad ? AutoSparseFiniteDiff() : AutoFiniteDiff() else (use_sparse_ad ? AutoSparseForwardDiff : AutoForwardDiff)(; - tag = ForwardDiff.Tag(NonlinearSolveTag(), eltype(prob.u0))) + tag = NonlinearSolveTag()) end return set_ad(alg, ad) end diff --git a/test/sparse.jl b/test/sparse.jl index ce338489e..729629c38 100644 --- a/test/sparse.jl +++ b/test/sparse.jl @@ -41,6 +41,13 @@ end u0 = init_brusselator_2d(xyd_brusselator) prob_brusselator_2d = NonlinearProblem(brusselator_2d_loop, u0, p) sol = solve(prob_brusselator_2d, NewtonRaphson()) +@test norm(sol.resid) < 1e-8 + +sol = solve(prob_brusselator_2d, NewtonRaphson(autodiff = AutoSparseForwardDiff())) +@test norm(sol.resid) < 1e-8 + +sol = solve(prob_brusselator_2d, NewtonRaphson(autodiff = AutoSparseFiniteDiff())) +@test norm(sol.resid) < 1e-8 du0 = copy(u0) jac_sparsity = Symbolics.jacobian_sparsity((du, u) -> brusselator_2d_loop(du, u, p), du0, @@ -57,7 +64,8 @@ sol = solve(prob_brusselator_2d, NewtonRaphson()) @test !all(iszero, jac_prototype) sol = solve(prob_brusselator_2d, NewtonRaphson(autodiff = AutoSparseFiniteDiff())) -@test norm(sol.resid) < 1e-6 +@test norm(sol.resid) < 1e-8 cache = init(prob_brusselator_2d, NewtonRaphson(; autodiff = AutoSparseForwardDiff())); @test maximum(cache.jac_cache.coloring.colorvec) == 12 +@test cache.alg.ad isa AutoSparseForwardDiff From 85ad9fee5eb48fd940a8ee7e262fc9dc419fad10 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Tue, 31 Oct 2023 10:54:29 -0400 Subject: [PATCH 21/28] Add docs Manifest in as well --- docs/Manifest.toml | 1481 ++++++++++++++++++++++++++++++++++++++++++++ docs/Project.toml | 4 + docs/make.jl | 7 +- 3 files changed, 1488 insertions(+), 4 deletions(-) create mode 100644 docs/Manifest.toml diff --git a/docs/Manifest.toml b/docs/Manifest.toml new file mode 100644 index 000000000..ab4d8a728 --- /dev/null +++ b/docs/Manifest.toml @@ -0,0 +1,1481 @@ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.10.0-beta3" +manifest_format = "2.0" +project_hash = "1887df1ef21a133f9f1f8bd6a9ca9adda3fbb8bb" + +[[deps.ADTypes]] +git-tree-sha1 = "5d2e21d7b0d8c22f67483ef95ebdc39c0e6b6003" +uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" +version = "0.2.4" + +[[deps.ANSIColoredPrinters]] +git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c" +uuid = "a4c015fc-c6ff-483c-b24f-f7ea428134e9" +version = "0.0.1" + +[[deps.AbstractAlgebra]] +deps = ["GroupsCore", "InteractiveUtils", "LinearAlgebra", "MacroTools", "Preferences", "Random", "RandomExtensions", "SparseArrays", "Test"] +git-tree-sha1 = "c3c29bf6363b3ac3e421dc8b2ba8e33bdacbd245" +uuid = "c3fe647b-3220-5bb0-a1ea-a7954cac585d" +version = "0.32.5" + +[[deps.AbstractTrees]] +git-tree-sha1 = "faa260e4cb5aba097a73fab382dd4b5819d8ec8c" +uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" +version = "0.4.4" + +[[deps.Adapt]] +deps = ["LinearAlgebra", "Requires"] +git-tree-sha1 = "02f731463748db57cc2ebfbd9fbc9ce8280d3433" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "3.7.1" +weakdeps = ["StaticArrays"] + + [deps.Adapt.extensions] + AdaptStaticArraysExt = "StaticArrays" + +[[deps.AlgebraicMultigrid]] +deps = ["CommonSolve", "LinearAlgebra", "LinearSolve", "Printf", "Reexport", "SparseArrays"] +git-tree-sha1 = "eb3dbbca423d8e8a1d4061b890f775dcd31b8d7c" +uuid = "2169fc97-5a83-5252-b627-83903c6c433c" +version = "0.6.0" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +version = "1.1.1" + +[[deps.ArnoldiMethod]] +deps = ["LinearAlgebra", "Random", "StaticArrays"] +git-tree-sha1 = "62e51b39331de8911e4a7ff6f5aaf38a5f4cc0ae" +uuid = "ec485272-7323-5ecc-a04f-4719b315124d" +version = "0.2.0" + +[[deps.ArrayInterface]] +deps = ["Adapt", "LinearAlgebra", "Requires", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "eba0af42241f0cb648806604222bab1e064edb67" +uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" +version = "7.5.0" + + [deps.ArrayInterface.extensions] + ArrayInterfaceBandedMatricesExt = "BandedMatrices" + ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" + ArrayInterfaceCUDAExt = "CUDA" + ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" + ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" + ArrayInterfaceTrackerExt = "Tracker" + + [deps.ArrayInterface.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.ArrayInterfaceCore]] +deps = ["LinearAlgebra", "SnoopPrecompile", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "e5f08b5689b1aad068e01751889f2f615c7db36d" +uuid = "30b0a656-2188-435a-8636-2ec0e6a096e2" +version = "0.1.29" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[deps.BenchmarkTools]] +deps = ["JSON", "Logging", "Printf", "Profile", "Statistics", "UUIDs"] +git-tree-sha1 = "d9a9701b899b30332bbcb3e1679c41cce81fb0e8" +uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" +version = "1.3.2" + +[[deps.Bijections]] +git-tree-sha1 = "c9b163bd832e023571e86d0b90d9de92a9879088" +uuid = "e2ed5e7c-b2de-5872-ae92-c73ca462fb04" +version = "0.1.6" + +[[deps.BitTwiddlingConvenienceFunctions]] +deps = ["Static"] +git-tree-sha1 = "0c5f81f47bbbcf4aea7b2959135713459170798b" +uuid = "62783981-4cbd-42fc-bca8-16325de8dc4b" +version = "0.1.5" + +[[deps.CEnum]] +git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc" +uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" +version = "0.5.0" + +[[deps.CPUSummary]] +deps = ["CpuId", "IfElse", "PrecompileTools", "Static"] +git-tree-sha1 = "601f7e7b3d36f18790e2caf83a882d88e9b71ff1" +uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" +version = "0.2.4" + +[[deps.CSTParser]] +deps = ["Tokenize"] +git-tree-sha1 = "3ddd48d200eb8ddf9cb3e0189fc059fd49b97c1f" +uuid = "00ebfdb7-1f24-5e51-bd34-a7502290713f" +version = "3.3.6" + +[[deps.Calculus]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" +uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" +version = "0.5.1" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra"] +git-tree-sha1 = "e0af648f0692ec1691b5d094b8724ba1346281cf" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.18.0" +weakdeps = ["SparseArrays"] + + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" + +[[deps.CloseOpenIntervals]] +deps = ["Static", "StaticArrayInterface"] +git-tree-sha1 = "70232f82ffaab9dc52585e0dd043b5e0c6b714f1" +uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" +version = "0.1.12" + +[[deps.Combinatorics]] +git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" +uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" +version = "1.0.2" + +[[deps.CommonMark]] +deps = ["Crayons", "JSON", "PrecompileTools", "URIs"] +git-tree-sha1 = "532c4185d3c9037c0237546d817858b23cf9e071" +uuid = "a80b9123-70ca-4bc0-993e-6e3bcb318db6" +version = "0.8.12" + +[[deps.CommonSolve]] +git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" +uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" +version = "0.2.4" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools", "Test"] +git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.0" + +[[deps.Compat]] +deps = ["UUIDs"] +git-tree-sha1 = "8a62af3e248a8c4bad6b32cbbe663ae02275e32c" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.10.0" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "1.0.5+1" + +[[deps.CompositeTypes]] +git-tree-sha1 = "02d2316b7ffceff992f3096ae48c7829a8aa0638" +uuid = "b152e2b5-7a66-4b01-a709-34e65c35f657" +version = "0.1.3" + +[[deps.ConcreteStructs]] +git-tree-sha1 = "f749037478283d372048690eb3b5f92a79432b34" +uuid = "2569d6c7-a4a2-43d3-a901-331e8e4be471" +version = "0.2.3" + +[[deps.ConstructionBase]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.5.4" +weakdeps = ["IntervalSets", "StaticArrays"] + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseStaticArraysExt = "StaticArrays" + +[[deps.CpuId]] +deps = ["Markdown"] +git-tree-sha1 = "fcbb72b032692610bfbdb15018ac16a36cf2e406" +uuid = "adafc99b-e345-5852-983c-f28acb93d879" +version = "0.3.1" + +[[deps.Crayons]] +git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" +uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" +version = "4.1.1" + +[[deps.DataAPI]] +git-tree-sha1 = "8da84edb865b0b5b0100c0666a9bc9a0b71c553c" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.15.0" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "3dbd312d370723b6bb43ba9d02fc36abade4518d" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.15" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[deps.DiffEqBase]] +deps = ["ArrayInterface", "ChainRulesCore", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces", "ZygoteRules"] +git-tree-sha1 = "53ad089996089756cae5a098b1a0542aeaab466f" +repo-rev = "master" +repo-url = "https://github.com/SciML/DiffEqBase.jl.git" +uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" +version = "6.136.0" + + [deps.DiffEqBase.extensions] + DiffEqBaseDistributionsExt = "Distributions" + DiffEqBaseEnzymeExt = "Enzyme" + DiffEqBaseGeneralizedGeneratedExt = "GeneralizedGenerated" + DiffEqBaseMPIExt = "MPI" + DiffEqBaseMeasurementsExt = "Measurements" + DiffEqBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" + DiffEqBaseReverseDiffExt = "ReverseDiff" + DiffEqBaseTrackerExt = "Tracker" + DiffEqBaseUnitfulExt = "Unitful" + DiffEqBaseZygoteExt = "Zygote" + + [deps.DiffEqBase.weakdeps] + Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + GeneralizedGenerated = "6b9d7cbe-bcb9-11e9-073f-15a7a543e2eb" + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.DiffEqCallbacks]] +deps = ["DataStructures", "DiffEqBase", "ForwardDiff", "Functors", "LinearAlgebra", "Markdown", "NLsolve", "Parameters", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] +git-tree-sha1 = "6cb07ea2557f425a5464ab1bd21c50464368c1a2" +uuid = "459566f4-90b8-5000-8ac3-15dfb0a30def" +version = "2.33.1" +weakdeps = ["OrdinaryDiffEq", "Sundials"] + +[[deps.DiffResults]] +deps = ["StaticArraysCore"] +git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.1.0" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.15.1" + +[[deps.Distances]] +deps = ["LinearAlgebra", "Statistics"] +git-tree-sha1 = "a5b88815e6984e9f3256b6ca0dc63109b16a506f" +uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" +version = "0.9.2" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[deps.Distributions]] +deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns", "Test"] +git-tree-sha1 = "3d5873f811f582873bb9871fc9c451784d5dc8c7" +uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" +version = "0.25.102" + + [deps.Distributions.extensions] + DistributionsChainRulesCoreExt = "ChainRulesCore" + DistributionsDensityInterfaceExt = "DensityInterface" + + [deps.Distributions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DensityInterface = "b429d917-457f-4dbc-8f4c-0cc954292b1d" + +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.3" + +[[deps.Documenter]] +deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "Dates", "DocStringExtensions", "Downloads", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "Test", "Unicode"] +git-tree-sha1 = "662fb21ae7fad33e044c2b59ece832fdce32c171" +uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +version = "1.1.2" + +[[deps.DomainSets]] +deps = ["CompositeTypes", "IntervalSets", "LinearAlgebra", "Random", "StaticArrays", "Statistics"] +git-tree-sha1 = "51b4b84d33ec5e0955b55ff4b748b99ce2c3faa9" +uuid = "5b8099bc-c8ec-5219-889f-1d9e522a28bf" +version = "0.6.7" + +[[deps.Downloads]] +deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +version = "1.6.0" + +[[deps.DualNumbers]] +deps = ["Calculus", "NaNMath", "SpecialFunctions"] +git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" +uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" +version = "0.6.8" + +[[deps.DynamicPolynomials]] +deps = ["Future", "LinearAlgebra", "MultivariatePolynomials", "MutableArithmetics", "Pkg", "Reexport", "Test"] +git-tree-sha1 = "fea68c84ba262b121754539e6ea0546146515d4f" +uuid = "7c1d4256-1411-5781-91ec-d7bc3513ac07" +version = "0.5.3" + +[[deps.EnumX]] +git-tree-sha1 = "bdb1942cd4c45e3c678fd11569d5cccd80976237" +uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" +version = "1.0.4" + +[[deps.EnzymeCore]] +deps = ["Adapt"] +git-tree-sha1 = "ab81396e4e7b61f5590db02fa1c17fae4f16d7ab" +uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" +version = "0.6.3" + +[[deps.ExponentialUtilities]] +deps = ["Adapt", "ArrayInterface", "GPUArraysCore", "GenericSchur", "LinearAlgebra", "PrecompileTools", "Printf", "SparseArrays", "libblastrampoline_jll"] +git-tree-sha1 = "602e4585bcbd5a25bc06f514724593d13ff9e862" +uuid = "d4d017d3-3776-5f7e-afef-a10c40355c18" +version = "1.25.0" + +[[deps.ExprTools]] +git-tree-sha1 = "27415f162e6028e81c72b82ef756bf321213b6ec" +uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" +version = "0.1.10" + +[[deps.FastBroadcast]] +deps = ["ArrayInterface", "LinearAlgebra", "Polyester", "Static", "StaticArrayInterface", "StrideArraysCore"] +git-tree-sha1 = "9d77cb1caf03e67514ba60bcfc47c6e131b1950c" +uuid = "7034ab61-46d4-4ed7-9d0f-46aef9175898" +version = "0.2.7" + +[[deps.FastClosures]] +git-tree-sha1 = "acebe244d53ee1b461970f8910c235b259e772ef" +uuid = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a" +version = "0.3.2" + +[[deps.FastLapackInterface]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "b12f05108e405dadcc2aff0008db7f831374e051" +uuid = "29a986be-02c6-4525-aec4-84b980013641" +version = "2.0.0" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" + +[[deps.FillArrays]] +deps = ["LinearAlgebra", "Random"] +git-tree-sha1 = "35f0c0f345bff2c6d636f95fdb136323b5a796ef" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "1.7.0" +weakdeps = ["SparseArrays", "Statistics"] + + [deps.FillArrays.extensions] + FillArraysSparseArraysExt = "SparseArrays" + FillArraysStatisticsExt = "Statistics" + +[[deps.FiniteDiff]] +deps = ["ArrayInterface", "LinearAlgebra", "Requires", "Setfield", "SparseArrays"] +git-tree-sha1 = "c6e4a1fbe73b31a3dea94b1da449503b8830c306" +uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" +version = "2.21.1" + + [deps.FiniteDiff.extensions] + FiniteDiffBandedMatricesExt = "BandedMatrices" + FiniteDiffBlockBandedMatricesExt = "BlockBandedMatrices" + FiniteDiffStaticArraysExt = "StaticArrays" + + [deps.FiniteDiff.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.Formatting]] +deps = ["Printf"] +git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" +uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" +version = "0.4.2" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "0.10.36" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" + +[[deps.FunctionWrappers]] +git-tree-sha1 = "d62485945ce5ae9c0c48f124a84998d755bae00e" +uuid = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" +version = "1.1.3" + +[[deps.FunctionWrappersWrappers]] +deps = ["FunctionWrappers"] +git-tree-sha1 = "b104d487b34566608f8b4e1c39fb0b10aa279ff8" +uuid = "77dc65aa-8811-40c2-897b-53d922fa7daf" +version = "0.1.3" + +[[deps.Functors]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9a68d75d466ccc1218d0552a8e1631151c569545" +uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196" +version = "0.4.5" + +[[deps.Future]] +deps = ["Random"] +uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" + +[[deps.GPUArraysCore]] +deps = ["Adapt"] +git-tree-sha1 = "2d6ca471a6c7b536127afccfa7564b5b39227fe0" +uuid = "46192b85-c4d5-4398-a991-12ede77f4527" +version = "0.1.5" + +[[deps.GenericSchur]] +deps = ["LinearAlgebra", "Printf"] +git-tree-sha1 = "fb69b2a645fa69ba5f474af09221b9308b160ce6" +uuid = "c145ed77-6b09-5dd9-b285-bf645a82121e" +version = "0.5.3" + +[[deps.Glob]] +git-tree-sha1 = "97285bbd5230dd766e9ef6749b80fc617126d496" +uuid = "c27321d9-0574-5035-807b-f59d2c89b15c" +version = "1.3.1" + +[[deps.Graphs]] +deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] +git-tree-sha1 = "899050ace26649433ef1af25bc17a815b3db52b7" +uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" +version = "1.9.0" + +[[deps.Groebner]] +deps = ["AbstractAlgebra", "Combinatorics", "ExprTools", "Logging", "MultivariatePolynomials", "Primes", "Random", "SIMD", "SnoopPrecompile"] +git-tree-sha1 = "44f595de4f6485ab5ba71fe257b5eadaa3cf161e" +uuid = "0b43b601-686d-58a3-8a1c-6623616c7cd4" +version = "0.4.4" + +[[deps.GroupsCore]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "9e1a5e9f3b81ad6a5c613d181664a0efc6fe6dd7" +uuid = "d5909c97-4eac-4ecc-a3dc-fdd0858a4120" +version = "0.4.0" + +[[deps.HostCPUFeatures]] +deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] +git-tree-sha1 = "eb8fed28f4994600e29beef49744639d985a04b2" +uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" +version = "0.1.16" + +[[deps.HypergeometricFunctions]] +deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] +git-tree-sha1 = "f218fe3736ddf977e0e772bc9a586b2383da2685" +uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" +version = "0.3.23" + +[[deps.IOCapture]] +deps = ["Logging", "Random"] +git-tree-sha1 = "d75853a0bdbfb1ac815478bacd89cd27b550ace6" +uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" +version = "0.2.3" + +[[deps.IfElse]] +git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" +uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" +version = "0.1.1" + +[[deps.IncompleteLU]] +deps = ["LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "6c676e79f98abb6d33fa28122cad099f1e464afe" +uuid = "40713840-3770-5561-ab4c-a76e7d0d7895" +version = "0.2.1" + +[[deps.Inflate]] +git-tree-sha1 = "ea8031dea4aff6bd41f1df8f2fdfb25b33626381" +uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" +version = "0.1.4" + +[[deps.IntegerMathUtils]] +git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" +uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" +version = "0.1.2" + +[[deps.IntelOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "ad37c091f7d7daf900963171600d7c1c5c3ede32" +uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" +version = "2023.2.0+0" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[deps.IntervalSets]] +deps = ["Dates", "Random"] +git-tree-sha1 = "3d8866c029dd6b16e69e0d4a939c4dfcb98fac47" +uuid = "8197267c-284f-5f27-9208-e0e47529a953" +version = "0.7.8" +weakdeps = ["Statistics"] + + [deps.IntervalSets.extensions] + IntervalSetsStatisticsExt = "Statistics" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.2.2" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.5.0" + +[[deps.JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.4" + +[[deps.JuliaFormatter]] +deps = ["CSTParser", "CommonMark", "DataStructures", "Glob", "Pkg", "PrecompileTools", "Tokenize"] +git-tree-sha1 = "b11c259ae111b08aabdc2ff5186dad12a95fedca" +uuid = "98e50ef6-434e-11e9-1051-2b60c6c9e899" +version = "1.0.41" + +[[deps.JumpProcesses]] +deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "Markdown", "PoissonRandom", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "StaticArrays", "TreeViews", "UnPack"] +git-tree-sha1 = "3de1d557e382cad270d921fbc22351f5628e7b1f" +uuid = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5" +version = "9.8.0" +weakdeps = ["FastBroadcast"] + + [deps.JumpProcesses.extensions] + JumpProcessFastBroadcastExt = "FastBroadcast" + +[[deps.KLU]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse_jll"] +git-tree-sha1 = "884c2968c2e8e7e6bf5956af88cb46aa745c854b" +uuid = "ef3ab10e-7fda-4108-b977-705223b18434" +version = "0.4.1" + +[[deps.Krylov]] +deps = ["LinearAlgebra", "Printf", "SparseArrays"] +git-tree-sha1 = "17e462054b42dcdda73e9a9ba0c67754170c88ae" +uuid = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" +version = "0.9.4" + +[[deps.LaTeXStrings]] +git-tree-sha1 = "f2355693d6778a178ade15952b7ac47a4ff97996" +uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +version = "1.3.0" + +[[deps.LabelledArrays]] +deps = ["ArrayInterface", "ChainRulesCore", "ForwardDiff", "LinearAlgebra", "MacroTools", "PreallocationTools", "RecursiveArrayTools", "StaticArrays"] +git-tree-sha1 = "cd04158424635efd05ff38d5f55843397b7416a9" +uuid = "2ee39098-c373-598a-b85f-a56591580800" +version = "1.14.0" + +[[deps.LambertW]] +git-tree-sha1 = "c5ffc834de5d61d00d2b0e18c96267cffc21f648" +uuid = "984bce1d-4616-540c-a9ee-88d1112d94c9" +version = "0.4.6" + +[[deps.Latexify]] +deps = ["Formatting", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Printf", "Requires"] +git-tree-sha1 = "f428ae552340899a935973270b8d98e5a31c49fe" +uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" +version = "0.16.1" + + [deps.Latexify.extensions] + DataFramesExt = "DataFrames" + SymEngineExt = "SymEngine" + + [deps.Latexify.weakdeps] + DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" + SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" + +[[deps.LayoutPointers]] +deps = ["ArrayInterface", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface"] +git-tree-sha1 = "88b8f66b604da079a627b6fb2860d3704a6729a1" +uuid = "10f19ff3-798f-405d-979b-55457f8fc047" +version = "0.1.14" + +[[deps.LazilyInitializedFields]] +git-tree-sha1 = "410fe4739a4b092f2ffe36fcb0dcc3ab12648ce1" +uuid = "0e77f7df-68c5-4e49-93ce-4cd80f5598bf" +version = "1.2.1" + +[[deps.Lazy]] +deps = ["MacroTools"] +git-tree-sha1 = "1370f8202dac30758f3c345f9909b97f53d87d3f" +uuid = "50d2b5c4-7a5e-59d5-8109-a42b560f39c0" +version = "0.15.1" + +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" +version = "0.6.4" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +version = "8.0.1+1" + +[[deps.LibGit2]] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.11.0+1" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[deps.LineSearches]] +deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] +git-tree-sha1 = "7bbea35cec17305fc70a0e5b4641477dc0789d9d" +uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" +version = "7.2.0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[deps.LinearSolve]] +deps = ["ArrayInterface", "ConcreteStructs", "DocStringExtensions", "EnumX", "EnzymeCore", "FastLapackInterface", "GPUArraysCore", "InteractiveUtils", "KLU", "Krylov", "Libdl", "LinearAlgebra", "MKL_jll", "PrecompileTools", "Preferences", "RecursiveFactorization", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Sparspak", "SuiteSparse", "UnPack"] +git-tree-sha1 = "9f807ca41005f9a8f092716e48022ee5b36cf5b1" +uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" +version = "2.14.1" + + [deps.LinearSolve.extensions] + LinearSolveBandedMatricesExt = "BandedMatrices" + LinearSolveBlockDiagonalsExt = "BlockDiagonals" + LinearSolveCUDAExt = "CUDA" + LinearSolveEnzymeExt = "Enzyme" + LinearSolveHYPREExt = "HYPRE" + LinearSolveIterativeSolversExt = "IterativeSolvers" + LinearSolveKernelAbstractionsExt = "KernelAbstractions" + LinearSolveKrylovKitExt = "KrylovKit" + LinearSolveMetalExt = "Metal" + LinearSolvePardisoExt = "Pardiso" + LinearSolveRecursiveArrayToolsExt = "RecursiveArrayTools" + + [deps.LinearSolve.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockDiagonals = "0a1fb500-61f7-11e9-3c65-f5ef3456f9f0" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" + IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" + Metal = "dde4c033-4e86-420c-a63e-0dd931031962" + Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" + RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" + +[[deps.LogExpFunctions]] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "7d6dd4e9212aebaeed356de34ccf262a3cd415aa" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.26" + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" + + [deps.LogExpFunctions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[deps.LoopVectorization]] +deps = ["ArrayInterface", "ArrayInterfaceCore", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "PrecompileTools", "SIMDTypes", "SLEEFPirates", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"] +git-tree-sha1 = "c88a4afe1703d731b1c4fdf4e3c7e77e3b176ea2" +uuid = "bdcacae8-1622-11e9-2a5c-532679323890" +version = "0.12.165" +weakdeps = ["ChainRulesCore", "ForwardDiff", "SpecialFunctions"] + + [deps.LoopVectorization.extensions] + ForwardDiffExt = ["ChainRulesCore", "ForwardDiff"] + SpecialFunctionsExt = "SpecialFunctions" + +[[deps.MINPACK]] +deps = ["Distances", "LinearAlgebra", "Printf"] +git-tree-sha1 = "cd4878dae41b1d0d63adef75b417fdd3b4ed0dfb" +uuid = "4854310b-de5a-5eb6-a2a5-c1dee2bd17f9" +version = "1.1.1" + +[[deps.MKL_jll]] +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] +git-tree-sha1 = "eb006abbd7041c28e0d16260e50a24f8f9104913" +uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" +version = "2023.2.0+0" + +[[deps.MLStyle]] +git-tree-sha1 = "bc38dff0548128765760c79eb7388a4b37fae2c8" +uuid = "d8e11817-5142-5d16-987a-aa16d5891078" +version = "0.4.17" + +[[deps.MacroTools]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "9ee1618cbf5240e6d4e0371d6f24065083f60c48" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.11" + +[[deps.ManualMemory]] +git-tree-sha1 = "bcaef4fc7a0cfe2cba636d84cda54b5e4e4ca3cd" +uuid = "d125e4d3-2237-4719-b19c-fa641b8a4667" +version = "0.1.8" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[deps.MarkdownAST]] +deps = ["AbstractTrees", "Markdown"] +git-tree-sha1 = "465a70f0fc7d443a00dcdc3267a497397b8a3899" +uuid = "d0879d2d-cac2-40c8-9cee-1863dc0c7391" +version = "0.1.2" + +[[deps.MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +version = "2.28.2+1" + +[[deps.Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "f66bdc5de519e8f8ae43bdc598782d35a25b1272" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.1.0" + +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[deps.ModelingToolkit]] +deps = ["AbstractTrees", "ArrayInterface", "Combinatorics", "Compat", "ConstructionBase", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DiffRules", "Distributed", "Distributions", "DocStringExtensions", "DomainSets", "ForwardDiff", "FunctionWrappersWrappers", "Graphs", "IfElse", "InteractiveUtils", "JuliaFormatter", "JumpProcesses", "LabelledArrays", "Latexify", "Libdl", "LinearAlgebra", "MLStyle", "MacroTools", "NaNMath", "OrdinaryDiffEq", "PrecompileTools", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLBase", "Serialization", "Setfield", "SimpleNonlinearSolve", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "URIs", "UnPack", "Unitful"] +git-tree-sha1 = "90b0d8395c9a8d3fcb5838f7f4f54b3f26e6f17a" +uuid = "961ee093-0014-501f-94e3-6117800e7a78" +version = "8.72.2" + + [deps.ModelingToolkit.extensions] + MTKDeepDiffsExt = "DeepDiffs" + + [deps.ModelingToolkit.weakdeps] + DeepDiffs = "ab62b9b5-e342-54a8-a765-a90f495de1a6" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +version = "2023.1.10" + +[[deps.MuladdMacro]] +git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab" +uuid = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221" +version = "0.2.4" + +[[deps.MultivariatePolynomials]] +deps = ["ChainRulesCore", "DataStructures", "LinearAlgebra", "MutableArithmetics"] +git-tree-sha1 = "6c2e970692b6f4fed2508865c43a0f67f3820cf4" +uuid = "102ac46a-7ee4-5c85-9060-abc95bfdeaa3" +version = "0.5.2" + +[[deps.MutableArithmetics]] +deps = ["LinearAlgebra", "SparseArrays", "Test"] +git-tree-sha1 = "6985021d02ab8c509c841bb8b2becd3145a7b490" +uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" +version = "1.3.3" + +[[deps.NLSolversBase]] +deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"] +git-tree-sha1 = "a0b464d183da839699f4c79e7606d9d186ec172c" +uuid = "d41bc354-129a-5804-8e4c-c37616107c6c" +version = "7.8.3" + +[[deps.NLsolve]] +deps = ["Distances", "LineSearches", "LinearAlgebra", "NLSolversBase", "Printf", "Reexport"] +git-tree-sha1 = "019f12e9a1a7880459d0173c182e6a99365d7ac1" +uuid = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" +version = "4.5.1" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "0877504529a3e5c3343c6f8b4c0381e57e4387e4" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.0.2" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.2.0" + +[[deps.NonlinearSolve]] +deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "DiffEqBase", "EnumX", "FiniteDiff", "ForwardDiff", "LineSearches", "LinearAlgebra", "LinearSolve", "PrecompileTools", "RecursiveArrayTools", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SparseArrays", "SparseDiffTools", "StaticArraysCore", "UnPack"] +path = ".." +uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" +version = "2.5.0" + + [deps.NonlinearSolve.extensions] + NonlinearSolveBandedMatricesExt = "BandedMatrices" + NonlinearSolveFastLevenbergMarquardtExt = "FastLevenbergMarquardt" + NonlinearSolveLeastSquaresOptimExt = "LeastSquaresOptim" + + [deps.NonlinearSolve.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + FastLevenbergMarquardt = "7a0df574-e128-4d35-8cbd-3d84502bf7ce" + LeastSquaresOptim = "0fc2ff8b-aaa3-5acd-a817-1944a5e08891" + +[[deps.NonlinearSolveMINPACK]] +deps = ["MINPACK", "Reexport", "SciMLBase"] +git-tree-sha1 = "9a21689b2dadbe0eee95730f6248b164aa657685" +uuid = "c100e077-885d-495a-a2ea-599e143bf69d" +version = "0.1.4" + +[[deps.OffsetArrays]] +deps = ["Adapt"] +git-tree-sha1 = "2ac17d29c523ce1cd38e27785a7d23024853a4bb" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.12.10" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.23+2" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+2" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.5+0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "2e73fe17cac3c62ad1aebe70d44c963c3cfdc3e3" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.6.2" + +[[deps.OrdinaryDiffEq]] +deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "IfElse", "InteractiveUtils", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "LoopVectorization", "MacroTools", "MuladdMacro", "NLsolve", "NonlinearSolve", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLNLSolve", "SciMLOperators", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "SparseDiffTools", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] +git-tree-sha1 = "def999a7447854f0e9ca9fdda235e04a65916b76" +uuid = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" +version = "6.58.0" + +[[deps.PDMats]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "66b2fcd977db5329aa35cac121e5b94dd6472198" +uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" +version = "0.11.28" + +[[deps.PackageExtensionCompat]] +git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" +uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" +version = "1.0.2" +weakdeps = ["Requires", "TOML"] + +[[deps.Parameters]] +deps = ["OrderedCollections", "UnPack"] +git-tree-sha1 = "34c0e9ad262e5f7fc75b10a9952ca7692cfc5fbe" +uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a" +version = "0.12.3" + +[[deps.Parsers]] +deps = ["Dates", "PrecompileTools", "UUIDs"] +git-tree-sha1 = "716e24b21538abc91f6205fd1d8363f39b442851" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "2.7.2" + +[[deps.Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +version = "1.10.0" + +[[deps.PoissonRandom]] +deps = ["Random"] +git-tree-sha1 = "a0f1159c33f846aa77c3f30ebbc69795e5327152" +uuid = "e409e4f3-bfea-5376-8464-e040bb5c01ab" +version = "0.4.4" + +[[deps.Polyester]] +deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Requires", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] +git-tree-sha1 = "398f91235beaac50445557c937ecb0145d171842" +uuid = "f517fe37-dbe3-4b94-8317-1923a5111588" +version = "0.7.8" + +[[deps.PolyesterWeave]] +deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"] +git-tree-sha1 = "240d7170f5ffdb285f9427b92333c3463bf65bf6" +uuid = "1d0040c9-8b98-4ee7-8388-3f51789ca0ad" +version = "0.2.1" + +[[deps.PreallocationTools]] +deps = ["Adapt", "ArrayInterface", "ForwardDiff", "Requires"] +git-tree-sha1 = "f739b1b3cc7b9949af3b35089931f2b58c289163" +uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46" +version = "0.4.12" + + [deps.PreallocationTools.extensions] + PreallocationToolsReverseDiffExt = "ReverseDiff" + + [deps.PreallocationTools.weakdeps] + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "03b4c25b43cb84cee5c90aa9b5ea0a78fd848d2f" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.2.0" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "00805cd429dcb4870060ff49ef443486c262e38e" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.4.1" + +[[deps.Primes]] +deps = ["IntegerMathUtils"] +git-tree-sha1 = "4c9f306e5d6603ae203c2000dd460d81a5251489" +uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" +version = "0.5.4" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[deps.Profile]] +deps = ["Printf"] +uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" + +[[deps.QuadGK]] +deps = ["DataStructures", "LinearAlgebra"] +git-tree-sha1 = "9ebcd48c498668c7fa0e97a9cae873fbee7bfee1" +uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +version = "2.9.1" + +[[deps.REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[deps.Random]] +deps = ["SHA"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[deps.RandomExtensions]] +deps = ["Random", "SparseArrays"] +git-tree-sha1 = "b8a399e95663485820000f26b6a43c794e166a49" +uuid = "fb686558-2515-59ef-acaa-46db3789a887" +version = "0.4.4" + +[[deps.RandomNumbers]] +deps = ["Random", "Requires"] +git-tree-sha1 = "043da614cc7e95c703498a491e2c21f58a2b8111" +uuid = "e6cf234a-135c-5ec9-84dd-332b85af5143" +version = "1.5.3" + +[[deps.RecipesBase]] +deps = ["PrecompileTools"] +git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.4" + +[[deps.RecursiveArrayTools]] +deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "Requires", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] +git-tree-sha1 = "fa453b42ba1623bd2e70260bf44dac850a3430a7" +uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" +version = "2.39.0" + + [deps.RecursiveArrayTools.extensions] + RecursiveArrayToolsMeasurementsExt = "Measurements" + RecursiveArrayToolsMonteCarloMeasurementsExt = "MonteCarloMeasurements" + RecursiveArrayToolsTrackerExt = "Tracker" + RecursiveArrayToolsZygoteExt = "Zygote" + + [deps.RecursiveArrayTools.weakdeps] + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.RecursiveFactorization]] +deps = ["LinearAlgebra", "LoopVectorization", "Polyester", "PrecompileTools", "StrideArraysCore", "TriangularSolve"] +git-tree-sha1 = "2b6d4a40339aa02655b1743f4cd7c03109f520c1" +uuid = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" +version = "0.2.20" + +[[deps.Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[deps.RegistryInstances]] +deps = ["LazilyInitializedFields", "Pkg", "TOML", "Tar"] +git-tree-sha1 = "ffd19052caf598b8653b99404058fce14828be51" +uuid = "2792f1a3-b283-48e8-9a74-f99dce5104f3" +version = "0.1.0" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.0" + +[[deps.Rmath]] +deps = ["Random", "Rmath_jll"] +git-tree-sha1 = "f65dcb5fa46aee0cf9ed6274ccbd597adc49aa7b" +uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" +version = "0.7.1" + +[[deps.Rmath_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "6ed52fdd3382cf21947b15e8870ac0ddbff736da" +uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" +version = "0.4.0+0" + +[[deps.RuntimeGeneratedFunctions]] +deps = ["ExprTools", "SHA", "Serialization"] +git-tree-sha1 = "6aacc5eefe8415f47b3e34214c1d79d2674a0ba2" +uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" +version = "0.5.12" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.SIMD]] +deps = ["PrecompileTools"] +git-tree-sha1 = "0e270732477b9e551d884e6b07e23bb2ec947790" +uuid = "fdea26ae-647d-5447-a871-4b548cad5224" +version = "3.4.5" + +[[deps.SIMDTypes]] +git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" +uuid = "94e857df-77ce-4151-89e5-788b33177be4" +version = "0.1.0" + +[[deps.SLEEFPirates]] +deps = ["IfElse", "Static", "VectorizationBase"] +git-tree-sha1 = "3aac6d68c5e57449f5b9b865c9ba50ac2970c4cf" +uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" +version = "0.6.42" + +[[deps.SciMLBase]] +deps = ["ADTypes", "ArrayInterface", "ChainRulesCore", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FillArrays", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables", "TruncatedStacktraces", "ZygoteRules"] +git-tree-sha1 = "1c2a4e245744dd76b2eb677d3535ffad16d8b989" +uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" +version = "2.5.0" + + [deps.SciMLBase.extensions] + SciMLBasePartialFunctionsExt = "PartialFunctions" + SciMLBasePyCallExt = "PyCall" + SciMLBasePythonCallExt = "PythonCall" + SciMLBaseRCallExt = "RCall" + SciMLBaseZygoteExt = "Zygote" + + [deps.SciMLBase.weakdeps] + PartialFunctions = "570af359-4316-4cb7-8c74-252c00c2016b" + PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" + PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" + RCall = "6f49c342-dc21-5d91-9882-a32aef131414" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.SciMLNLSolve]] +deps = ["DiffEqBase", "LineSearches", "NLsolve", "Reexport", "SciMLBase"] +git-tree-sha1 = "765b788339abd7d983618c09cfc0192e2b6b15fd" +uuid = "e9a6253c-8580-4d32-9898-8661bb511710" +version = "0.1.9" + +[[deps.SciMLOperators]] +deps = ["ArrayInterface", "DocStringExtensions", "Lazy", "LinearAlgebra", "Setfield", "SparseArrays", "StaticArraysCore", "Tricks"] +git-tree-sha1 = "65c2e6ced6f62ea796af251eb292a0e131a3613b" +uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" +version = "0.3.6" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[deps.Setfield]] +deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] +git-tree-sha1 = "e2cc6d8c88613c05e1defb55170bf5ff211fbeac" +uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" +version = "1.1.1" + +[[deps.SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[deps.SimpleNonlinearSolve]] +deps = ["ArrayInterface", "DiffEqBase", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Reexport", "SciMLBase", "StaticArraysCore"] +git-tree-sha1 = "15ff97fa4881133caa324dacafe28b5ac47ad8a2" +uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" +version = "0.1.23" + + [deps.SimpleNonlinearSolve.extensions] + SimpleNonlinearSolveNNlibExt = "NNlib" + + [deps.SimpleNonlinearSolve.weakdeps] + NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" + +[[deps.SimpleTraits]] +deps = ["InteractiveUtils", "MacroTools"] +git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" +uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d" +version = "0.9.4" + +[[deps.SimpleUnPack]] +git-tree-sha1 = "58e6353e72cde29b90a69527e56df1b5c3d8c437" +uuid = "ce78b400-467f-4804-87d8-8f486da07d0a" +version = "1.1.0" + +[[deps.SnoopPrecompile]] +deps = ["Preferences"] +git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c" +uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" +version = "1.0.3" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[deps.SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "5165dfb9fd131cf0c6957a3a7605dede376e7b63" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.2.0" + +[[deps.SparseArrays]] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" + +[[deps.SparseDiffTools]] +deps = ["ADTypes", "Adapt", "ArrayInterface", "Compat", "DataStructures", "FiniteDiff", "ForwardDiff", "Graphs", "LinearAlgebra", "PackageExtensionCompat", "Random", "Reexport", "SciMLOperators", "Setfield", "SparseArrays", "StaticArrayInterface", "StaticArrays", "Tricks", "UnPack", "VertexSafeGraphs"] +git-tree-sha1 = "590acc2c3baf98aaff7d2f1990a6f1de6138361e" +uuid = "47a9eef4-7e08-11e9-0b38-333d64bd3804" +version = "2.9.1" + + [deps.SparseDiffTools.extensions] + SparseDiffToolsEnzymeExt = "Enzyme" + SparseDiffToolsSymbolicsExt = "Symbolics" + SparseDiffToolsZygoteExt = "Zygote" + + [deps.SparseDiffTools.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.Sparspak]] +deps = ["Libdl", "LinearAlgebra", "Logging", "OffsetArrays", "Printf", "SparseArrays", "Test"] +git-tree-sha1 = "342cf4b449c299d8d1ceaf00b7a49f4fbc7940e7" +uuid = "e56a9233-b9d6-4f03-8d0f-1825330902ac" +version = "0.3.9" + +[[deps.SpecialFunctions]] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.3.1" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" + +[[deps.Static]] +deps = ["IfElse"] +git-tree-sha1 = "f295e0a1da4ca425659c57441bcb59abb035a4bc" +uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" +version = "0.8.8" + +[[deps.StaticArrayInterface]] +deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "Requires", "SparseArrays", "Static", "SuiteSparse"] +git-tree-sha1 = "03fec6800a986d191f64f5c0996b59ed526eda25" +uuid = "0d7ed370-da01-4f52-bd93-41d350b8b718" +version = "1.4.1" +weakdeps = ["OffsetArrays", "StaticArrays"] + + [deps.StaticArrayInterface.extensions] + StaticArrayInterfaceOffsetArraysExt = "OffsetArrays" + StaticArrayInterfaceStaticArraysExt = "StaticArrays" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "Random", "StaticArraysCore"] +git-tree-sha1 = "0adf069a2a490c47273727e029371b31d44b72b2" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.6.5" +weakdeps = ["Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysStatisticsExt = "Statistics" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.4.2" + +[[deps.Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.10.0" + +[[deps.StatsAPI]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "1ff449ad350c9c4cbc756624d6f8a8c3ef56d3ed" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.7.0" + +[[deps.StatsBase]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "1d77abd07f617c4868c33d4f5b9e1dbb2643c9cf" +uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +version = "0.34.2" + +[[deps.StatsFuns]] +deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] +git-tree-sha1 = "f625d686d5a88bcd2b15cd81f18f98186fdc0c9a" +uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" +version = "1.3.0" + + [deps.StatsFuns.extensions] + StatsFunsChainRulesCoreExt = "ChainRulesCore" + StatsFunsInverseFunctionsExt = "InverseFunctions" + + [deps.StatsFuns.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + +[[deps.SteadyStateDiffEq]] +deps = ["DiffEqBase", "DiffEqCallbacks", "LinearAlgebra", "NLsolve", "Reexport", "SciMLBase"] +git-tree-sha1 = "2ca69f4be3294e4cd987d83d6019037d420d9fc1" +uuid = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f" +version = "1.16.1" + +[[deps.StrideArraysCore]] +deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface", "ThreadingUtilities"] +git-tree-sha1 = "f02eb61eb5c97b48c153861c72fbbfdddc607e06" +uuid = "7792a7ef-975c-4747-a70f-980b88e8d1da" +version = "0.4.17" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "7.2.0+1" + +[[deps.Sundials]] +deps = ["CEnum", "DataStructures", "DiffEqBase", "Libdl", "LinearAlgebra", "Logging", "PrecompileTools", "Reexport", "SciMLBase", "SparseArrays", "Sundials_jll"] +git-tree-sha1 = "71dc65a2d7decdde5500299c9b04309e0138d1b4" +uuid = "c3572dad-4567-51f8-b174-8c6c989267f4" +version = "4.20.1" + +[[deps.Sundials_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "SuiteSparse_jll", "libblastrampoline_jll"] +git-tree-sha1 = "ba4d38faeb62de7ef47155ed321dce40a549c305" +uuid = "fb77eaff-e24c-56d4-86b1-d163f2edb164" +version = "5.2.2+0" + +[[deps.SymbolicIndexingInterface]] +deps = ["DocStringExtensions"] +git-tree-sha1 = "f8ab052bfcbdb9b48fad2c80c873aa0d0344dfe5" +uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" +version = "0.2.2" + +[[deps.SymbolicUtils]] +deps = ["AbstractTrees", "Bijections", "ChainRulesCore", "Combinatorics", "ConstructionBase", "DataStructures", "DocStringExtensions", "DynamicPolynomials", "IfElse", "LabelledArrays", "LinearAlgebra", "MultivariatePolynomials", "NaNMath", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArrays", "TimerOutputs", "Unityper"] +git-tree-sha1 = "2f3fa844bcd33e40d8c29de5ee8dded7a0a70422" +uuid = "d1185830-fcd6-423d-90d6-eec64667417b" +version = "1.4.0" + +[[deps.Symbolics]] +deps = ["ArrayInterface", "Bijections", "ConstructionBase", "DataStructures", "DiffRules", "Distributions", "DocStringExtensions", "DomainSets", "DynamicPolynomials", "Groebner", "IfElse", "LaTeXStrings", "LambertW", "Latexify", "Libdl", "LinearAlgebra", "LogExpFunctions", "MacroTools", "Markdown", "NaNMath", "PrecompileTools", "RecipesBase", "RecursiveArrayTools", "Reexport", "Requires", "RuntimeGeneratedFunctions", "SciMLBase", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicUtils", "TreeViews"] +git-tree-sha1 = "4d4e922e160827388c003a9a088a4c63f339f6c0" +uuid = "0c5d862f-8b57-4792-8d23-62f2024744c7" +version = "5.10.0" + + [deps.Symbolics.extensions] + SymbolicsSymPyExt = "SymPy" + + [deps.Symbolics.weakdeps] + SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.3" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "cb76cf677714c095e535e3501ac7954732aeea2d" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.11.1" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" +version = "1.10.0" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.ThreadingUtilities]] +deps = ["ManualMemory"] +git-tree-sha1 = "eda08f7e9818eb53661b3deb74e3159460dfbc27" +uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5" +version = "0.5.2" + +[[deps.TimerOutputs]] +deps = ["ExprTools", "Printf"] +git-tree-sha1 = "f548a9e9c490030e545f72074a41edfd0e5bcdd7" +uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" +version = "0.5.23" + +[[deps.Tokenize]] +git-tree-sha1 = "90538bf898832b6ebd900fa40f223e695970e3a5" +uuid = "0796e94c-ce3b-5d07-9a54-7f471281c624" +version = "0.5.25" + +[[deps.TreeViews]] +deps = ["Test"] +git-tree-sha1 = "8d0d7a3fe2f30d6a7f833a5f19f7c7a5b396eae6" +uuid = "a2a6695c-b41b-5b7d-aed9-dbfdeacea5d7" +version = "0.3.0" + +[[deps.TriangularSolve]] +deps = ["CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "LoopVectorization", "Polyester", "Static", "VectorizationBase"] +git-tree-sha1 = "31eedbc0b6d07c08a700e26d31298ac27ef330eb" +uuid = "d5829a12-d9aa-46ab-831f-fb7c9ab06edf" +version = "0.1.19" + +[[deps.Tricks]] +git-tree-sha1 = "eae1bb484cd63b36999ee58be2de6c178105112f" +uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" +version = "0.1.8" + +[[deps.TruncatedStacktraces]] +deps = ["InteractiveUtils", "MacroTools", "Preferences"] +git-tree-sha1 = "ea3e54c2bdde39062abf5a9758a23735558705e1" +uuid = "781d530d-4396-4725-bb49-402e4bee1e77" +version = "1.4.0" + +[[deps.URIs]] +git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" +uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" +version = "1.5.1" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[deps.UnPack]] +git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" +uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" +version = "1.0.2" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[deps.Unitful]] +deps = ["Dates", "LinearAlgebra", "Random"] +git-tree-sha1 = "a72d22c7e13fe2de562feda8645aa134712a87ee" +uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" +version = "1.17.0" + + [deps.Unitful.extensions] + ConstructionBaseUnitfulExt = "ConstructionBase" + InverseFunctionsUnitfulExt = "InverseFunctions" + + [deps.Unitful.weakdeps] + ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + +[[deps.Unityper]] +deps = ["ConstructionBase"] +git-tree-sha1 = "21c8fc7cd598ef49f11bc9e94871f5d7740e34b9" +uuid = "a7c27f48-0311-42f6-a7f8-2c11e75eb415" +version = "0.1.5" + +[[deps.VectorizationBase]] +deps = ["ArrayInterface", "CPUSummary", "HostCPUFeatures", "IfElse", "LayoutPointers", "Libdl", "LinearAlgebra", "SIMDTypes", "Static", "StaticArrayInterface"] +git-tree-sha1 = "b182207d4af54ac64cbc71797765068fdeff475d" +uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f" +version = "0.21.64" + +[[deps.VertexSafeGraphs]] +deps = ["Graphs"] +git-tree-sha1 = "8351f8d73d7e880bfc042a8b6922684ebeafb35c" +uuid = "19fa3120-7c27-5ec5-8db8-b0b0aa330d6f" +version = "0.2.0" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.13+1" + +[[deps.ZygoteRules]] +deps = ["ChainRulesCore", "MacroTools"] +git-tree-sha1 = "9d749cd449fb448aeca4feee9a2f4186dbb5d184" +uuid = "700de1a5-db45-46bc-99cf-38207098b444" +version = "0.2.4" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.8.0+1" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.52.0+1" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.4.0+2" diff --git a/docs/Project.toml b/docs/Project.toml index d240bb245..9507a2966 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -2,12 +2,14 @@ AlgebraicMultigrid = "2169fc97-5a83-5252-b627-83903c6c433c" ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" +DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" IncompleteLU = "40713840-3770-5561-ab4c-a76e7d0d7895" LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" NonlinearSolveMINPACK = "c100e077-885d-495a-a2ea-599e143bf69d" +SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" SciMLNLSolve = "e9a6253c-8580-4d32-9898-8661bb511710" SimpleNonlinearSolve = "727e6d20-b764-4bd8-a329-72de5adea6c7" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" @@ -19,12 +21,14 @@ Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" AlgebraicMultigrid = "0.5, 0.6" ArrayInterface = "6, 7" BenchmarkTools = "1" +DiffEqBase = "6.136" Documenter = "1" IncompleteLU = "0.2" LinearSolve = "2" ModelingToolkit = "8" NonlinearSolve = "1, 2" NonlinearSolveMINPACK = "0.1" +SciMLBase = "2.4" SciMLNLSolve = "0.1" SimpleNonlinearSolve = "0.1.5" StaticArrays = "1" diff --git a/docs/make.jl b/docs/make.jl index 8f895b0b4..9a063bf47 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,5 +1,5 @@ using Documenter, NonlinearSolve, SimpleNonlinearSolve, Sundials, SciMLNLSolve, - NonlinearSolveMINPACK, SteadyStateDiffEq + NonlinearSolveMINPACK, SteadyStateDiffEq, SciMLBase, DiffEqBase cp("./docs/Manifest.toml", "./docs/src/assets/Manifest.toml", force = true) cp("./docs/Project.toml", "./docs/src/assets/Project.toml", force = true) @@ -8,9 +8,8 @@ include("pages.jl") makedocs(sitename = "NonlinearSolve.jl", authors = "Chris Rackauckas", - modules = [NonlinearSolve, NonlinearSolve.SciMLBase, NonlinearSolve.DiffEqBase, - SimpleNonlinearSolve, Sundials, SciMLNLSolve, NonlinearSolveMINPACK, - SteadyStateDiffEq], + modules = [NonlinearSolve, SciMLBase, DiffEqBase, SimpleNonlinearSolve, Sundials, + SciMLNLSolve, NonlinearSolveMINPACK, SteadyStateDiffEq], clean = true, doctest = false, linkcheck = true, linkcheck_ignore = ["https://twitter.com/ChrisRackauckas/status/1544743542094020615"], warnonly = [:missing_docs, :cross_references], From 512baf1db3190104e9d0a27e8bf7c063872b3cd8 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Tue, 31 Oct 2023 11:34:47 -0400 Subject: [PATCH 22/28] Proper dispatch --- src/linesearch.jl | 8 ++++---- src/utils.jl | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/linesearch.jl b/src/linesearch.jl index 272d8b7cf..760f67769 100644 --- a/src/linesearch.jl +++ b/src/linesearch.jl @@ -26,22 +26,22 @@ function LineSearch(; method = nothing, autodiff = AutoFiniteDiff(), alpha = tru return LineSearch(method, autodiff, alpha) end -@inline function init_linesearch_cache(ls::LineSearch, args...) - return init_linesearch_cache(ls.method, ls, args...) +@inline function init_linesearch_cache(ls::LineSearch, f::F, u, p, fu, iip) where {F} + return init_linesearch_cache(ls.method, ls, f, u, p, fu, iip) end @concrete struct NoLineSearchCache α end -function init_linesearch_cache(::Nothing, ls, f::F, u, p, fu, iip) where {F} +function init_linesearch_cache(::Nothing, ls::LineSearch, f::F, u, p, fu, iip) where {F} return NoLineSearchCache(convert(eltype(u), ls.α)) end perform_linesearch!(cache::NoLineSearchCache, u, du) = cache.α # LineSearches.jl doesn't have a supertype so default to that -function init_linesearch_cache(_, ls, f::F, u, p, fu, iip) where {F} +function init_linesearch_cache(_, ls::LineSearch, f::F, u, p, fu, iip) where {F} return LineSearchesJLCache(ls, f, u, p, fu, iip) end diff --git a/src/utils.jl b/src/utils.jl index ba1230258..949583095 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -48,8 +48,8 @@ function default_adargs_to_adtype(; chunk_size = missing, autodiff = nothing, ad = _unwrap_val(autodiff) # We don't really know the typeof the input yet, so we can't use the correct tag! - ad && return AutoForwardDiff{_unwrap_val(chunk_size), NonlinearSolveTag}(; - tag = NonlinearSolveTag()) + ad && return AutoForwardDiff{_unwrap_val(chunk_size), NonlinearSolveTag}( + NonlinearSolveTag()) return AutoFiniteDiff(; fdtype = diff_type) end From 338d6443f3f26f0d4e753d7feddac53b43d23a97 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Tue, 31 Oct 2023 11:45:56 -0400 Subject: [PATCH 23/28] Up Manifest --- Manifest.toml | 4 +- docs/Manifest.toml | 1481 -------------------------------------------- 2 files changed, 1 insertion(+), 1484 deletions(-) delete mode 100644 docs/Manifest.toml diff --git a/Manifest.toml b/Manifest.toml index b4503615c..5e19bf9ef 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -164,9 +164,7 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" [[deps.DiffEqBase]] deps = ["ArrayInterface", "ChainRulesCore", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces", "ZygoteRules"] -git-tree-sha1 = "53ad089996089756cae5a098b1a0542aeaab466f" -repo-rev = "master" -repo-url = "https://github.com/SciML/DiffEqBase.jl" +git-tree-sha1 = "c8bc8487a7987c13576f25959ac11b25d5da84e2" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" version = "6.136.0" diff --git a/docs/Manifest.toml b/docs/Manifest.toml deleted file mode 100644 index ab4d8a728..000000000 --- a/docs/Manifest.toml +++ /dev/null @@ -1,1481 +0,0 @@ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.10.0-beta3" -manifest_format = "2.0" -project_hash = "1887df1ef21a133f9f1f8bd6a9ca9adda3fbb8bb" - -[[deps.ADTypes]] -git-tree-sha1 = "5d2e21d7b0d8c22f67483ef95ebdc39c0e6b6003" -uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -version = "0.2.4" - -[[deps.ANSIColoredPrinters]] -git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c" -uuid = "a4c015fc-c6ff-483c-b24f-f7ea428134e9" -version = "0.0.1" - -[[deps.AbstractAlgebra]] -deps = ["GroupsCore", "InteractiveUtils", "LinearAlgebra", "MacroTools", "Preferences", "Random", "RandomExtensions", "SparseArrays", "Test"] -git-tree-sha1 = "c3c29bf6363b3ac3e421dc8b2ba8e33bdacbd245" -uuid = "c3fe647b-3220-5bb0-a1ea-a7954cac585d" -version = "0.32.5" - -[[deps.AbstractTrees]] -git-tree-sha1 = "faa260e4cb5aba097a73fab382dd4b5819d8ec8c" -uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" -version = "0.4.4" - -[[deps.Adapt]] -deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "02f731463748db57cc2ebfbd9fbc9ce8280d3433" -uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "3.7.1" -weakdeps = ["StaticArrays"] - - [deps.Adapt.extensions] - AdaptStaticArraysExt = "StaticArrays" - -[[deps.AlgebraicMultigrid]] -deps = ["CommonSolve", "LinearAlgebra", "LinearSolve", "Printf", "Reexport", "SparseArrays"] -git-tree-sha1 = "eb3dbbca423d8e8a1d4061b890f775dcd31b8d7c" -uuid = "2169fc97-5a83-5252-b627-83903c6c433c" -version = "0.6.0" - -[[deps.ArgTools]] -uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.1" - -[[deps.ArnoldiMethod]] -deps = ["LinearAlgebra", "Random", "StaticArrays"] -git-tree-sha1 = "62e51b39331de8911e4a7ff6f5aaf38a5f4cc0ae" -uuid = "ec485272-7323-5ecc-a04f-4719b315124d" -version = "0.2.0" - -[[deps.ArrayInterface]] -deps = ["Adapt", "LinearAlgebra", "Requires", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "eba0af42241f0cb648806604222bab1e064edb67" -uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.5.0" - - [deps.ArrayInterface.extensions] - ArrayInterfaceBandedMatricesExt = "BandedMatrices" - ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" - ArrayInterfaceCUDAExt = "CUDA" - ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" - ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" - ArrayInterfaceTrackerExt = "Tracker" - - [deps.ArrayInterface.weakdeps] - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" - StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - -[[deps.ArrayInterfaceCore]] -deps = ["LinearAlgebra", "SnoopPrecompile", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "e5f08b5689b1aad068e01751889f2f615c7db36d" -uuid = "30b0a656-2188-435a-8636-2ec0e6a096e2" -version = "0.1.29" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" - -[[deps.BenchmarkTools]] -deps = ["JSON", "Logging", "Printf", "Profile", "Statistics", "UUIDs"] -git-tree-sha1 = "d9a9701b899b30332bbcb3e1679c41cce81fb0e8" -uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" -version = "1.3.2" - -[[deps.Bijections]] -git-tree-sha1 = "c9b163bd832e023571e86d0b90d9de92a9879088" -uuid = "e2ed5e7c-b2de-5872-ae92-c73ca462fb04" -version = "0.1.6" - -[[deps.BitTwiddlingConvenienceFunctions]] -deps = ["Static"] -git-tree-sha1 = "0c5f81f47bbbcf4aea7b2959135713459170798b" -uuid = "62783981-4cbd-42fc-bca8-16325de8dc4b" -version = "0.1.5" - -[[deps.CEnum]] -git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc" -uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" -version = "0.5.0" - -[[deps.CPUSummary]] -deps = ["CpuId", "IfElse", "PrecompileTools", "Static"] -git-tree-sha1 = "601f7e7b3d36f18790e2caf83a882d88e9b71ff1" -uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" -version = "0.2.4" - -[[deps.CSTParser]] -deps = ["Tokenize"] -git-tree-sha1 = "3ddd48d200eb8ddf9cb3e0189fc059fd49b97c1f" -uuid = "00ebfdb7-1f24-5e51-bd34-a7502290713f" -version = "3.3.6" - -[[deps.Calculus]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" -uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" -version = "0.5.1" - -[[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "e0af648f0692ec1691b5d094b8724ba1346281cf" -uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.18.0" -weakdeps = ["SparseArrays"] - - [deps.ChainRulesCore.extensions] - ChainRulesCoreSparseArraysExt = "SparseArrays" - -[[deps.CloseOpenIntervals]] -deps = ["Static", "StaticArrayInterface"] -git-tree-sha1 = "70232f82ffaab9dc52585e0dd043b5e0c6b714f1" -uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" -version = "0.1.12" - -[[deps.Combinatorics]] -git-tree-sha1 = "08c8b6831dc00bfea825826be0bc8336fc369860" -uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" -version = "1.0.2" - -[[deps.CommonMark]] -deps = ["Crayons", "JSON", "PrecompileTools", "URIs"] -git-tree-sha1 = "532c4185d3c9037c0237546d817858b23cf9e071" -uuid = "a80b9123-70ca-4bc0-993e-6e3bcb318db6" -version = "0.8.12" - -[[deps.CommonSolve]] -git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" -uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" -version = "0.2.4" - -[[deps.CommonSubexpressions]] -deps = ["MacroTools", "Test"] -git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" -uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.0" - -[[deps.Compat]] -deps = ["UUIDs"] -git-tree-sha1 = "8a62af3e248a8c4bad6b32cbbe663ae02275e32c" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.10.0" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.5+1" - -[[deps.CompositeTypes]] -git-tree-sha1 = "02d2316b7ffceff992f3096ae48c7829a8aa0638" -uuid = "b152e2b5-7a66-4b01-a709-34e65c35f657" -version = "0.1.3" - -[[deps.ConcreteStructs]] -git-tree-sha1 = "f749037478283d372048690eb3b5f92a79432b34" -uuid = "2569d6c7-a4a2-43d3-a901-331e8e4be471" -version = "0.2.3" - -[[deps.ConstructionBase]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" -uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.4" -weakdeps = ["IntervalSets", "StaticArrays"] - - [deps.ConstructionBase.extensions] - ConstructionBaseIntervalSetsExt = "IntervalSets" - ConstructionBaseStaticArraysExt = "StaticArrays" - -[[deps.CpuId]] -deps = ["Markdown"] -git-tree-sha1 = "fcbb72b032692610bfbdb15018ac16a36cf2e406" -uuid = "adafc99b-e345-5852-983c-f28acb93d879" -version = "0.3.1" - -[[deps.Crayons]] -git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" -uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" -version = "4.1.1" - -[[deps.DataAPI]] -git-tree-sha1 = "8da84edb865b0b5b0100c0666a9bc9a0b71c553c" -uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.15.0" - -[[deps.DataStructures]] -deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "3dbd312d370723b6bb43ba9d02fc36abade4518d" -uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.15" - -[[deps.DataValueInterfaces]] -git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" -uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" -version = "1.0.0" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" - -[[deps.DiffEqBase]] -deps = ["ArrayInterface", "ChainRulesCore", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces", "ZygoteRules"] -git-tree-sha1 = "53ad089996089756cae5a098b1a0542aeaab466f" -repo-rev = "master" -repo-url = "https://github.com/SciML/DiffEqBase.jl.git" -uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" -version = "6.136.0" - - [deps.DiffEqBase.extensions] - DiffEqBaseDistributionsExt = "Distributions" - DiffEqBaseEnzymeExt = "Enzyme" - DiffEqBaseGeneralizedGeneratedExt = "GeneralizedGenerated" - DiffEqBaseMPIExt = "MPI" - DiffEqBaseMeasurementsExt = "Measurements" - DiffEqBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" - DiffEqBaseReverseDiffExt = "ReverseDiff" - DiffEqBaseTrackerExt = "Tracker" - DiffEqBaseUnitfulExt = "Unitful" - DiffEqBaseZygoteExt = "Zygote" - - [deps.DiffEqBase.weakdeps] - Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - GeneralizedGenerated = "6b9d7cbe-bcb9-11e9-073f-15a7a543e2eb" - MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" - Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" - MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" - -[[deps.DiffEqCallbacks]] -deps = ["DataStructures", "DiffEqBase", "ForwardDiff", "Functors", "LinearAlgebra", "Markdown", "NLsolve", "Parameters", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] -git-tree-sha1 = "6cb07ea2557f425a5464ab1bd21c50464368c1a2" -uuid = "459566f4-90b8-5000-8ac3-15dfb0a30def" -version = "2.33.1" -weakdeps = ["OrdinaryDiffEq", "Sundials"] - -[[deps.DiffResults]] -deps = ["StaticArraysCore"] -git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" -uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" -version = "1.1.0" - -[[deps.DiffRules]] -deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] -git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" -uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.15.1" - -[[deps.Distances]] -deps = ["LinearAlgebra", "Statistics"] -git-tree-sha1 = "a5b88815e6984e9f3256b6ca0dc63109b16a506f" -uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" -version = "0.9.2" - -[[deps.Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" - -[[deps.Distributions]] -deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns", "Test"] -git-tree-sha1 = "3d5873f811f582873bb9871fc9c451784d5dc8c7" -uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.102" - - [deps.Distributions.extensions] - DistributionsChainRulesCoreExt = "ChainRulesCore" - DistributionsDensityInterfaceExt = "DensityInterface" - - [deps.Distributions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - DensityInterface = "b429d917-457f-4dbc-8f4c-0cc954292b1d" - -[[deps.DocStringExtensions]] -deps = ["LibGit2"] -git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.3" - -[[deps.Documenter]] -deps = ["ANSIColoredPrinters", "AbstractTrees", "Base64", "Dates", "DocStringExtensions", "Downloads", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "MarkdownAST", "Pkg", "PrecompileTools", "REPL", "RegistryInstances", "SHA", "Test", "Unicode"] -git-tree-sha1 = "662fb21ae7fad33e044c2b59ece832fdce32c171" -uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -version = "1.1.2" - -[[deps.DomainSets]] -deps = ["CompositeTypes", "IntervalSets", "LinearAlgebra", "Random", "StaticArrays", "Statistics"] -git-tree-sha1 = "51b4b84d33ec5e0955b55ff4b748b99ce2c3faa9" -uuid = "5b8099bc-c8ec-5219-889f-1d9e522a28bf" -version = "0.6.7" - -[[deps.Downloads]] -deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] -uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -version = "1.6.0" - -[[deps.DualNumbers]] -deps = ["Calculus", "NaNMath", "SpecialFunctions"] -git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" -uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" -version = "0.6.8" - -[[deps.DynamicPolynomials]] -deps = ["Future", "LinearAlgebra", "MultivariatePolynomials", "MutableArithmetics", "Pkg", "Reexport", "Test"] -git-tree-sha1 = "fea68c84ba262b121754539e6ea0546146515d4f" -uuid = "7c1d4256-1411-5781-91ec-d7bc3513ac07" -version = "0.5.3" - -[[deps.EnumX]] -git-tree-sha1 = "bdb1942cd4c45e3c678fd11569d5cccd80976237" -uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" -version = "1.0.4" - -[[deps.EnzymeCore]] -deps = ["Adapt"] -git-tree-sha1 = "ab81396e4e7b61f5590db02fa1c17fae4f16d7ab" -uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" -version = "0.6.3" - -[[deps.ExponentialUtilities]] -deps = ["Adapt", "ArrayInterface", "GPUArraysCore", "GenericSchur", "LinearAlgebra", "PrecompileTools", "Printf", "SparseArrays", "libblastrampoline_jll"] -git-tree-sha1 = "602e4585bcbd5a25bc06f514724593d13ff9e862" -uuid = "d4d017d3-3776-5f7e-afef-a10c40355c18" -version = "1.25.0" - -[[deps.ExprTools]] -git-tree-sha1 = "27415f162e6028e81c72b82ef756bf321213b6ec" -uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" -version = "0.1.10" - -[[deps.FastBroadcast]] -deps = ["ArrayInterface", "LinearAlgebra", "Polyester", "Static", "StaticArrayInterface", "StrideArraysCore"] -git-tree-sha1 = "9d77cb1caf03e67514ba60bcfc47c6e131b1950c" -uuid = "7034ab61-46d4-4ed7-9d0f-46aef9175898" -version = "0.2.7" - -[[deps.FastClosures]] -git-tree-sha1 = "acebe244d53ee1b461970f8910c235b259e772ef" -uuid = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a" -version = "0.3.2" - -[[deps.FastLapackInterface]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "b12f05108e405dadcc2aff0008db7f831374e051" -uuid = "29a986be-02c6-4525-aec4-84b980013641" -version = "2.0.0" - -[[deps.FileWatching]] -uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" - -[[deps.FillArrays]] -deps = ["LinearAlgebra", "Random"] -git-tree-sha1 = "35f0c0f345bff2c6d636f95fdb136323b5a796ef" -uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.7.0" -weakdeps = ["SparseArrays", "Statistics"] - - [deps.FillArrays.extensions] - FillArraysSparseArraysExt = "SparseArrays" - FillArraysStatisticsExt = "Statistics" - -[[deps.FiniteDiff]] -deps = ["ArrayInterface", "LinearAlgebra", "Requires", "Setfield", "SparseArrays"] -git-tree-sha1 = "c6e4a1fbe73b31a3dea94b1da449503b8830c306" -uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" -version = "2.21.1" - - [deps.FiniteDiff.extensions] - FiniteDiffBandedMatricesExt = "BandedMatrices" - FiniteDiffBlockBandedMatricesExt = "BlockBandedMatrices" - FiniteDiffStaticArraysExt = "StaticArrays" - - [deps.FiniteDiff.weakdeps] - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.Formatting]] -deps = ["Printf"] -git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" -uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" -version = "0.4.2" - -[[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] -git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" -uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "0.10.36" -weakdeps = ["StaticArrays"] - - [deps.ForwardDiff.extensions] - ForwardDiffStaticArraysExt = "StaticArrays" - -[[deps.FunctionWrappers]] -git-tree-sha1 = "d62485945ce5ae9c0c48f124a84998d755bae00e" -uuid = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" -version = "1.1.3" - -[[deps.FunctionWrappersWrappers]] -deps = ["FunctionWrappers"] -git-tree-sha1 = "b104d487b34566608f8b4e1c39fb0b10aa279ff8" -uuid = "77dc65aa-8811-40c2-897b-53d922fa7daf" -version = "0.1.3" - -[[deps.Functors]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9a68d75d466ccc1218d0552a8e1631151c569545" -uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196" -version = "0.4.5" - -[[deps.Future]] -deps = ["Random"] -uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" - -[[deps.GPUArraysCore]] -deps = ["Adapt"] -git-tree-sha1 = "2d6ca471a6c7b536127afccfa7564b5b39227fe0" -uuid = "46192b85-c4d5-4398-a991-12ede77f4527" -version = "0.1.5" - -[[deps.GenericSchur]] -deps = ["LinearAlgebra", "Printf"] -git-tree-sha1 = "fb69b2a645fa69ba5f474af09221b9308b160ce6" -uuid = "c145ed77-6b09-5dd9-b285-bf645a82121e" -version = "0.5.3" - -[[deps.Glob]] -git-tree-sha1 = "97285bbd5230dd766e9ef6749b80fc617126d496" -uuid = "c27321d9-0574-5035-807b-f59d2c89b15c" -version = "1.3.1" - -[[deps.Graphs]] -deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "899050ace26649433ef1af25bc17a815b3db52b7" -uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.9.0" - -[[deps.Groebner]] -deps = ["AbstractAlgebra", "Combinatorics", "ExprTools", "Logging", "MultivariatePolynomials", "Primes", "Random", "SIMD", "SnoopPrecompile"] -git-tree-sha1 = "44f595de4f6485ab5ba71fe257b5eadaa3cf161e" -uuid = "0b43b601-686d-58a3-8a1c-6623616c7cd4" -version = "0.4.4" - -[[deps.GroupsCore]] -deps = ["Markdown", "Random"] -git-tree-sha1 = "9e1a5e9f3b81ad6a5c613d181664a0efc6fe6dd7" -uuid = "d5909c97-4eac-4ecc-a3dc-fdd0858a4120" -version = "0.4.0" - -[[deps.HostCPUFeatures]] -deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] -git-tree-sha1 = "eb8fed28f4994600e29beef49744639d985a04b2" -uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" -version = "0.1.16" - -[[deps.HypergeometricFunctions]] -deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] -git-tree-sha1 = "f218fe3736ddf977e0e772bc9a586b2383da2685" -uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" -version = "0.3.23" - -[[deps.IOCapture]] -deps = ["Logging", "Random"] -git-tree-sha1 = "d75853a0bdbfb1ac815478bacd89cd27b550ace6" -uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89" -version = "0.2.3" - -[[deps.IfElse]] -git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" -uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" -version = "0.1.1" - -[[deps.IncompleteLU]] -deps = ["LinearAlgebra", "SparseArrays"] -git-tree-sha1 = "6c676e79f98abb6d33fa28122cad099f1e464afe" -uuid = "40713840-3770-5561-ab4c-a76e7d0d7895" -version = "0.2.1" - -[[deps.Inflate]] -git-tree-sha1 = "ea8031dea4aff6bd41f1df8f2fdfb25b33626381" -uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" -version = "0.1.4" - -[[deps.IntegerMathUtils]] -git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" -uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" -version = "0.1.2" - -[[deps.IntelOpenMP_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "ad37c091f7d7daf900963171600d7c1c5c3ede32" -uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" -version = "2023.2.0+0" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" - -[[deps.IntervalSets]] -deps = ["Dates", "Random"] -git-tree-sha1 = "3d8866c029dd6b16e69e0d4a939c4dfcb98fac47" -uuid = "8197267c-284f-5f27-9208-e0e47529a953" -version = "0.7.8" -weakdeps = ["Statistics"] - - [deps.IntervalSets.extensions] - IntervalSetsStatisticsExt = "Statistics" - -[[deps.IrrationalConstants]] -git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" -uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.2" - -[[deps.IteratorInterfaceExtensions]] -git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" -uuid = "82899510-4779-5014-852e-03e436cf321d" -version = "1.0.0" - -[[deps.JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.5.0" - -[[deps.JSON]] -deps = ["Dates", "Mmap", "Parsers", "Unicode"] -git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" -uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.21.4" - -[[deps.JuliaFormatter]] -deps = ["CSTParser", "CommonMark", "DataStructures", "Glob", "Pkg", "PrecompileTools", "Tokenize"] -git-tree-sha1 = "b11c259ae111b08aabdc2ff5186dad12a95fedca" -uuid = "98e50ef6-434e-11e9-1051-2b60c6c9e899" -version = "1.0.41" - -[[deps.JumpProcesses]] -deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "Markdown", "PoissonRandom", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "StaticArrays", "TreeViews", "UnPack"] -git-tree-sha1 = "3de1d557e382cad270d921fbc22351f5628e7b1f" -uuid = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5" -version = "9.8.0" -weakdeps = ["FastBroadcast"] - - [deps.JumpProcesses.extensions] - JumpProcessFastBroadcastExt = "FastBroadcast" - -[[deps.KLU]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse_jll"] -git-tree-sha1 = "884c2968c2e8e7e6bf5956af88cb46aa745c854b" -uuid = "ef3ab10e-7fda-4108-b977-705223b18434" -version = "0.4.1" - -[[deps.Krylov]] -deps = ["LinearAlgebra", "Printf", "SparseArrays"] -git-tree-sha1 = "17e462054b42dcdda73e9a9ba0c67754170c88ae" -uuid = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" -version = "0.9.4" - -[[deps.LaTeXStrings]] -git-tree-sha1 = "f2355693d6778a178ade15952b7ac47a4ff97996" -uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" -version = "1.3.0" - -[[deps.LabelledArrays]] -deps = ["ArrayInterface", "ChainRulesCore", "ForwardDiff", "LinearAlgebra", "MacroTools", "PreallocationTools", "RecursiveArrayTools", "StaticArrays"] -git-tree-sha1 = "cd04158424635efd05ff38d5f55843397b7416a9" -uuid = "2ee39098-c373-598a-b85f-a56591580800" -version = "1.14.0" - -[[deps.LambertW]] -git-tree-sha1 = "c5ffc834de5d61d00d2b0e18c96267cffc21f648" -uuid = "984bce1d-4616-540c-a9ee-88d1112d94c9" -version = "0.4.6" - -[[deps.Latexify]] -deps = ["Formatting", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Printf", "Requires"] -git-tree-sha1 = "f428ae552340899a935973270b8d98e5a31c49fe" -uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" -version = "0.16.1" - - [deps.Latexify.extensions] - DataFramesExt = "DataFrames" - SymEngineExt = "SymEngine" - - [deps.Latexify.weakdeps] - DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" - SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" - -[[deps.LayoutPointers]] -deps = ["ArrayInterface", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface"] -git-tree-sha1 = "88b8f66b604da079a627b6fb2860d3704a6729a1" -uuid = "10f19ff3-798f-405d-979b-55457f8fc047" -version = "0.1.14" - -[[deps.LazilyInitializedFields]] -git-tree-sha1 = "410fe4739a4b092f2ffe36fcb0dcc3ab12648ce1" -uuid = "0e77f7df-68c5-4e49-93ce-4cd80f5598bf" -version = "1.2.1" - -[[deps.Lazy]] -deps = ["MacroTools"] -git-tree-sha1 = "1370f8202dac30758f3c345f9909b97f53d87d3f" -uuid = "50d2b5c4-7a5e-59d5-8109-a42b560f39c0" -version = "0.15.1" - -[[deps.LazyArtifacts]] -deps = ["Artifacts", "Pkg"] -uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" - -[[deps.LibCURL]] -deps = ["LibCURL_jll", "MozillaCACerts_jll"] -uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.4" - -[[deps.LibCURL_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] -uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.0.1+1" - -[[deps.LibGit2]] -deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" - -[[deps.LibGit2_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] -uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.6.4+0" - -[[deps.LibSSH2_jll]] -deps = ["Artifacts", "Libdl", "MbedTLS_jll"] -uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.11.0+1" - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" - -[[deps.LineSearches]] -deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] -git-tree-sha1 = "7bbea35cec17305fc70a0e5b4641477dc0789d9d" -uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" -version = "7.2.0" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - -[[deps.LinearSolve]] -deps = ["ArrayInterface", "ConcreteStructs", "DocStringExtensions", "EnumX", "EnzymeCore", "FastLapackInterface", "GPUArraysCore", "InteractiveUtils", "KLU", "Krylov", "Libdl", "LinearAlgebra", "MKL_jll", "PrecompileTools", "Preferences", "RecursiveFactorization", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Sparspak", "SuiteSparse", "UnPack"] -git-tree-sha1 = "9f807ca41005f9a8f092716e48022ee5b36cf5b1" -uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "2.14.1" - - [deps.LinearSolve.extensions] - LinearSolveBandedMatricesExt = "BandedMatrices" - LinearSolveBlockDiagonalsExt = "BlockDiagonals" - LinearSolveCUDAExt = "CUDA" - LinearSolveEnzymeExt = "Enzyme" - LinearSolveHYPREExt = "HYPRE" - LinearSolveIterativeSolversExt = "IterativeSolvers" - LinearSolveKernelAbstractionsExt = "KernelAbstractions" - LinearSolveKrylovKitExt = "KrylovKit" - LinearSolveMetalExt = "Metal" - LinearSolvePardisoExt = "Pardiso" - LinearSolveRecursiveArrayToolsExt = "RecursiveArrayTools" - - [deps.LinearSolve.weakdeps] - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - BlockDiagonals = "0a1fb500-61f7-11e9-3c65-f5ef3456f9f0" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" - IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153" - KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" - KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" - Metal = "dde4c033-4e86-420c-a63e-0dd931031962" - Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" - RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" - -[[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "7d6dd4e9212aebaeed356de34ccf262a3cd415aa" -uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.26" - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" - - [deps.LogExpFunctions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" - -[[deps.LoopVectorization]] -deps = ["ArrayInterface", "ArrayInterfaceCore", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "PrecompileTools", "SIMDTypes", "SLEEFPirates", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"] -git-tree-sha1 = "c88a4afe1703d731b1c4fdf4e3c7e77e3b176ea2" -uuid = "bdcacae8-1622-11e9-2a5c-532679323890" -version = "0.12.165" -weakdeps = ["ChainRulesCore", "ForwardDiff", "SpecialFunctions"] - - [deps.LoopVectorization.extensions] - ForwardDiffExt = ["ChainRulesCore", "ForwardDiff"] - SpecialFunctionsExt = "SpecialFunctions" - -[[deps.MINPACK]] -deps = ["Distances", "LinearAlgebra", "Printf"] -git-tree-sha1 = "cd4878dae41b1d0d63adef75b417fdd3b4ed0dfb" -uuid = "4854310b-de5a-5eb6-a2a5-c1dee2bd17f9" -version = "1.1.1" - -[[deps.MKL_jll]] -deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] -git-tree-sha1 = "eb006abbd7041c28e0d16260e50a24f8f9104913" -uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" -version = "2023.2.0+0" - -[[deps.MLStyle]] -git-tree-sha1 = "bc38dff0548128765760c79eb7388a4b37fae2c8" -uuid = "d8e11817-5142-5d16-987a-aa16d5891078" -version = "0.4.17" - -[[deps.MacroTools]] -deps = ["Markdown", "Random"] -git-tree-sha1 = "9ee1618cbf5240e6d4e0371d6f24065083f60c48" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.11" - -[[deps.ManualMemory]] -git-tree-sha1 = "bcaef4fc7a0cfe2cba636d84cda54b5e4e4ca3cd" -uuid = "d125e4d3-2237-4719-b19c-fa641b8a4667" -version = "0.1.8" - -[[deps.Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" - -[[deps.MarkdownAST]] -deps = ["AbstractTrees", "Markdown"] -git-tree-sha1 = "465a70f0fc7d443a00dcdc3267a497397b8a3899" -uuid = "d0879d2d-cac2-40c8-9cee-1863dc0c7391" -version = "0.1.2" - -[[deps.MbedTLS_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+1" - -[[deps.Missings]] -deps = ["DataAPI"] -git-tree-sha1 = "f66bdc5de519e8f8ae43bdc598782d35a25b1272" -uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" -version = "1.1.0" - -[[deps.Mmap]] -uuid = "a63ad114-7e13-5084-954f-fe012c677804" - -[[deps.ModelingToolkit]] -deps = ["AbstractTrees", "ArrayInterface", "Combinatorics", "Compat", "ConstructionBase", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DiffRules", "Distributed", "Distributions", "DocStringExtensions", "DomainSets", "ForwardDiff", "FunctionWrappersWrappers", "Graphs", "IfElse", "InteractiveUtils", "JuliaFormatter", "JumpProcesses", "LabelledArrays", "Latexify", "Libdl", "LinearAlgebra", "MLStyle", "MacroTools", "NaNMath", "OrdinaryDiffEq", "PrecompileTools", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLBase", "Serialization", "Setfield", "SimpleNonlinearSolve", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicIndexingInterface", "SymbolicUtils", "Symbolics", "URIs", "UnPack", "Unitful"] -git-tree-sha1 = "90b0d8395c9a8d3fcb5838f7f4f54b3f26e6f17a" -uuid = "961ee093-0014-501f-94e3-6117800e7a78" -version = "8.72.2" - - [deps.ModelingToolkit.extensions] - MTKDeepDiffsExt = "DeepDiffs" - - [deps.ModelingToolkit.weakdeps] - DeepDiffs = "ab62b9b5-e342-54a8-a765-a90f495de1a6" - -[[deps.MozillaCACerts_jll]] -uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.1.10" - -[[deps.MuladdMacro]] -git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab" -uuid = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221" -version = "0.2.4" - -[[deps.MultivariatePolynomials]] -deps = ["ChainRulesCore", "DataStructures", "LinearAlgebra", "MutableArithmetics"] -git-tree-sha1 = "6c2e970692b6f4fed2508865c43a0f67f3820cf4" -uuid = "102ac46a-7ee4-5c85-9060-abc95bfdeaa3" -version = "0.5.2" - -[[deps.MutableArithmetics]] -deps = ["LinearAlgebra", "SparseArrays", "Test"] -git-tree-sha1 = "6985021d02ab8c509c841bb8b2becd3145a7b490" -uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0" -version = "1.3.3" - -[[deps.NLSolversBase]] -deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"] -git-tree-sha1 = "a0b464d183da839699f4c79e7606d9d186ec172c" -uuid = "d41bc354-129a-5804-8e4c-c37616107c6c" -version = "7.8.3" - -[[deps.NLsolve]] -deps = ["Distances", "LineSearches", "LinearAlgebra", "NLSolversBase", "Printf", "Reexport"] -git-tree-sha1 = "019f12e9a1a7880459d0173c182e6a99365d7ac1" -uuid = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" -version = "4.5.1" - -[[deps.NaNMath]] -deps = ["OpenLibm_jll"] -git-tree-sha1 = "0877504529a3e5c3343c6f8b4c0381e57e4387e4" -uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.0.2" - -[[deps.NetworkOptions]] -uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -version = "1.2.0" - -[[deps.NonlinearSolve]] -deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "DiffEqBase", "EnumX", "FiniteDiff", "ForwardDiff", "LineSearches", "LinearAlgebra", "LinearSolve", "PrecompileTools", "RecursiveArrayTools", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SparseArrays", "SparseDiffTools", "StaticArraysCore", "UnPack"] -path = ".." -uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" -version = "2.5.0" - - [deps.NonlinearSolve.extensions] - NonlinearSolveBandedMatricesExt = "BandedMatrices" - NonlinearSolveFastLevenbergMarquardtExt = "FastLevenbergMarquardt" - NonlinearSolveLeastSquaresOptimExt = "LeastSquaresOptim" - - [deps.NonlinearSolve.weakdeps] - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - FastLevenbergMarquardt = "7a0df574-e128-4d35-8cbd-3d84502bf7ce" - LeastSquaresOptim = "0fc2ff8b-aaa3-5acd-a817-1944a5e08891" - -[[deps.NonlinearSolveMINPACK]] -deps = ["MINPACK", "Reexport", "SciMLBase"] -git-tree-sha1 = "9a21689b2dadbe0eee95730f6248b164aa657685" -uuid = "c100e077-885d-495a-a2ea-599e143bf69d" -version = "0.1.4" - -[[deps.OffsetArrays]] -deps = ["Adapt"] -git-tree-sha1 = "2ac17d29c523ce1cd38e27785a7d23024853a4bb" -uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" -version = "1.12.10" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.23+2" - -[[deps.OpenLibm_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+2" - -[[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" -uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.5+0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "2e73fe17cac3c62ad1aebe70d44c963c3cfdc3e3" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.6.2" - -[[deps.OrdinaryDiffEq]] -deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "IfElse", "InteractiveUtils", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "LoopVectorization", "MacroTools", "MuladdMacro", "NLsolve", "NonlinearSolve", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLNLSolve", "SciMLOperators", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "SparseDiffTools", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] -git-tree-sha1 = "def999a7447854f0e9ca9fdda235e04a65916b76" -uuid = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" -version = "6.58.0" - -[[deps.PDMats]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "66b2fcd977db5329aa35cac121e5b94dd6472198" -uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" -version = "0.11.28" - -[[deps.PackageExtensionCompat]] -git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" -uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" -version = "1.0.2" -weakdeps = ["Requires", "TOML"] - -[[deps.Parameters]] -deps = ["OrderedCollections", "UnPack"] -git-tree-sha1 = "34c0e9ad262e5f7fc75b10a9952ca7692cfc5fbe" -uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a" -version = "0.12.3" - -[[deps.Parsers]] -deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "716e24b21538abc91f6205fd1d8363f39b442851" -uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.7.2" - -[[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.10.0" - -[[deps.PoissonRandom]] -deps = ["Random"] -git-tree-sha1 = "a0f1159c33f846aa77c3f30ebbc69795e5327152" -uuid = "e409e4f3-bfea-5376-8464-e040bb5c01ab" -version = "0.4.4" - -[[deps.Polyester]] -deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Requires", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] -git-tree-sha1 = "398f91235beaac50445557c937ecb0145d171842" -uuid = "f517fe37-dbe3-4b94-8317-1923a5111588" -version = "0.7.8" - -[[deps.PolyesterWeave]] -deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"] -git-tree-sha1 = "240d7170f5ffdb285f9427b92333c3463bf65bf6" -uuid = "1d0040c9-8b98-4ee7-8388-3f51789ca0ad" -version = "0.2.1" - -[[deps.PreallocationTools]] -deps = ["Adapt", "ArrayInterface", "ForwardDiff", "Requires"] -git-tree-sha1 = "f739b1b3cc7b9949af3b35089931f2b58c289163" -uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46" -version = "0.4.12" - - [deps.PreallocationTools.extensions] - PreallocationToolsReverseDiffExt = "ReverseDiff" - - [deps.PreallocationTools.weakdeps] - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "03b4c25b43cb84cee5c90aa9b5ea0a78fd848d2f" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.2.0" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "00805cd429dcb4870060ff49ef443486c262e38e" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.4.1" - -[[deps.Primes]] -deps = ["IntegerMathUtils"] -git-tree-sha1 = "4c9f306e5d6603ae203c2000dd460d81a5251489" -uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" -version = "0.5.4" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[deps.Profile]] -deps = ["Printf"] -uuid = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79" - -[[deps.QuadGK]] -deps = ["DataStructures", "LinearAlgebra"] -git-tree-sha1 = "9ebcd48c498668c7fa0e97a9cae873fbee7bfee1" -uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" -version = "2.9.1" - -[[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" - -[[deps.Random]] -deps = ["SHA"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - -[[deps.RandomExtensions]] -deps = ["Random", "SparseArrays"] -git-tree-sha1 = "b8a399e95663485820000f26b6a43c794e166a49" -uuid = "fb686558-2515-59ef-acaa-46db3789a887" -version = "0.4.4" - -[[deps.RandomNumbers]] -deps = ["Random", "Requires"] -git-tree-sha1 = "043da614cc7e95c703498a491e2c21f58a2b8111" -uuid = "e6cf234a-135c-5ec9-84dd-332b85af5143" -version = "1.5.3" - -[[deps.RecipesBase]] -deps = ["PrecompileTools"] -git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "1.3.4" - -[[deps.RecursiveArrayTools]] -deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "Requires", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] -git-tree-sha1 = "fa453b42ba1623bd2e70260bf44dac850a3430a7" -uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" -version = "2.39.0" - - [deps.RecursiveArrayTools.extensions] - RecursiveArrayToolsMeasurementsExt = "Measurements" - RecursiveArrayToolsMonteCarloMeasurementsExt = "MonteCarloMeasurements" - RecursiveArrayToolsTrackerExt = "Tracker" - RecursiveArrayToolsZygoteExt = "Zygote" - - [deps.RecursiveArrayTools.weakdeps] - Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" - MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" - -[[deps.RecursiveFactorization]] -deps = ["LinearAlgebra", "LoopVectorization", "Polyester", "PrecompileTools", "StrideArraysCore", "TriangularSolve"] -git-tree-sha1 = "2b6d4a40339aa02655b1743f4cd7c03109f520c1" -uuid = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" -version = "0.2.20" - -[[deps.Reexport]] -git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" -uuid = "189a3867-3050-52da-a836-e630ba90ab69" -version = "1.2.2" - -[[deps.RegistryInstances]] -deps = ["LazilyInitializedFields", "Pkg", "TOML", "Tar"] -git-tree-sha1 = "ffd19052caf598b8653b99404058fce14828be51" -uuid = "2792f1a3-b283-48e8-9a74-f99dce5104f3" -version = "0.1.0" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.0" - -[[deps.Rmath]] -deps = ["Random", "Rmath_jll"] -git-tree-sha1 = "f65dcb5fa46aee0cf9ed6274ccbd597adc49aa7b" -uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" -version = "0.7.1" - -[[deps.Rmath_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "6ed52fdd3382cf21947b15e8870ac0ddbff736da" -uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" -version = "0.4.0+0" - -[[deps.RuntimeGeneratedFunctions]] -deps = ["ExprTools", "SHA", "Serialization"] -git-tree-sha1 = "6aacc5eefe8415f47b3e34214c1d79d2674a0ba2" -uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" -version = "0.5.12" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.SIMD]] -deps = ["PrecompileTools"] -git-tree-sha1 = "0e270732477b9e551d884e6b07e23bb2ec947790" -uuid = "fdea26ae-647d-5447-a871-4b548cad5224" -version = "3.4.5" - -[[deps.SIMDTypes]] -git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" -uuid = "94e857df-77ce-4151-89e5-788b33177be4" -version = "0.1.0" - -[[deps.SLEEFPirates]] -deps = ["IfElse", "Static", "VectorizationBase"] -git-tree-sha1 = "3aac6d68c5e57449f5b9b865c9ba50ac2970c4cf" -uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" -version = "0.6.42" - -[[deps.SciMLBase]] -deps = ["ADTypes", "ArrayInterface", "ChainRulesCore", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FillArrays", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables", "TruncatedStacktraces", "ZygoteRules"] -git-tree-sha1 = "1c2a4e245744dd76b2eb677d3535ffad16d8b989" -uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "2.5.0" - - [deps.SciMLBase.extensions] - SciMLBasePartialFunctionsExt = "PartialFunctions" - SciMLBasePyCallExt = "PyCall" - SciMLBasePythonCallExt = "PythonCall" - SciMLBaseRCallExt = "RCall" - SciMLBaseZygoteExt = "Zygote" - - [deps.SciMLBase.weakdeps] - PartialFunctions = "570af359-4316-4cb7-8c74-252c00c2016b" - PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" - PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" - RCall = "6f49c342-dc21-5d91-9882-a32aef131414" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" - -[[deps.SciMLNLSolve]] -deps = ["DiffEqBase", "LineSearches", "NLsolve", "Reexport", "SciMLBase"] -git-tree-sha1 = "765b788339abd7d983618c09cfc0192e2b6b15fd" -uuid = "e9a6253c-8580-4d32-9898-8661bb511710" -version = "0.1.9" - -[[deps.SciMLOperators]] -deps = ["ArrayInterface", "DocStringExtensions", "Lazy", "LinearAlgebra", "Setfield", "SparseArrays", "StaticArraysCore", "Tricks"] -git-tree-sha1 = "65c2e6ced6f62ea796af251eb292a0e131a3613b" -uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" -version = "0.3.6" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" - -[[deps.Setfield]] -deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] -git-tree-sha1 = "e2cc6d8c88613c05e1defb55170bf5ff211fbeac" -uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" -version = "1.1.1" - -[[deps.SharedArrays]] -deps = ["Distributed", "Mmap", "Random", "Serialization"] -uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" - -[[deps.SimpleNonlinearSolve]] -deps = ["ArrayInterface", "DiffEqBase", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Reexport", "SciMLBase", "StaticArraysCore"] -git-tree-sha1 = "15ff97fa4881133caa324dacafe28b5ac47ad8a2" -uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" -version = "0.1.23" - - [deps.SimpleNonlinearSolve.extensions] - SimpleNonlinearSolveNNlibExt = "NNlib" - - [deps.SimpleNonlinearSolve.weakdeps] - NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" - -[[deps.SimpleTraits]] -deps = ["InteractiveUtils", "MacroTools"] -git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" -uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d" -version = "0.9.4" - -[[deps.SimpleUnPack]] -git-tree-sha1 = "58e6353e72cde29b90a69527e56df1b5c3d8c437" -uuid = "ce78b400-467f-4804-87d8-8f486da07d0a" -version = "1.1.0" - -[[deps.SnoopPrecompile]] -deps = ["Preferences"] -git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c" -uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" -version = "1.0.3" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" - -[[deps.SortingAlgorithms]] -deps = ["DataStructures"] -git-tree-sha1 = "5165dfb9fd131cf0c6957a3a7605dede376e7b63" -uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "1.2.0" - -[[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.10.0" - -[[deps.SparseDiffTools]] -deps = ["ADTypes", "Adapt", "ArrayInterface", "Compat", "DataStructures", "FiniteDiff", "ForwardDiff", "Graphs", "LinearAlgebra", "PackageExtensionCompat", "Random", "Reexport", "SciMLOperators", "Setfield", "SparseArrays", "StaticArrayInterface", "StaticArrays", "Tricks", "UnPack", "VertexSafeGraphs"] -git-tree-sha1 = "590acc2c3baf98aaff7d2f1990a6f1de6138361e" -uuid = "47a9eef4-7e08-11e9-0b38-333d64bd3804" -version = "2.9.1" - - [deps.SparseDiffTools.extensions] - SparseDiffToolsEnzymeExt = "Enzyme" - SparseDiffToolsSymbolicsExt = "Symbolics" - SparseDiffToolsZygoteExt = "Zygote" - - [deps.SparseDiffTools.weakdeps] - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" - -[[deps.Sparspak]] -deps = ["Libdl", "LinearAlgebra", "Logging", "OffsetArrays", "Printf", "SparseArrays", "Test"] -git-tree-sha1 = "342cf4b449c299d8d1ceaf00b7a49f4fbc7940e7" -uuid = "e56a9233-b9d6-4f03-8d0f-1825330902ac" -version = "0.3.9" - -[[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" -uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.3.1" -weakdeps = ["ChainRulesCore"] - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" - -[[deps.Static]] -deps = ["IfElse"] -git-tree-sha1 = "f295e0a1da4ca425659c57441bcb59abb035a4bc" -uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" -version = "0.8.8" - -[[deps.StaticArrayInterface]] -deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "Requires", "SparseArrays", "Static", "SuiteSparse"] -git-tree-sha1 = "03fec6800a986d191f64f5c0996b59ed526eda25" -uuid = "0d7ed370-da01-4f52-bd93-41d350b8b718" -version = "1.4.1" -weakdeps = ["OffsetArrays", "StaticArrays"] - - [deps.StaticArrayInterface.extensions] - StaticArrayInterfaceOffsetArraysExt = "OffsetArrays" - StaticArrayInterfaceStaticArraysExt = "StaticArrays" - -[[deps.StaticArrays]] -deps = ["LinearAlgebra", "Random", "StaticArraysCore"] -git-tree-sha1 = "0adf069a2a490c47273727e029371b31d44b72b2" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.6.5" -weakdeps = ["Statistics"] - - [deps.StaticArrays.extensions] - StaticArraysStatisticsExt = "Statistics" - -[[deps.StaticArraysCore]] -git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" -uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.2" - -[[deps.Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.10.0" - -[[deps.StatsAPI]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "1ff449ad350c9c4cbc756624d6f8a8c3ef56d3ed" -uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" -version = "1.7.0" - -[[deps.StatsBase]] -deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "1d77abd07f617c4868c33d4f5b9e1dbb2643c9cf" -uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.34.2" - -[[deps.StatsFuns]] -deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] -git-tree-sha1 = "f625d686d5a88bcd2b15cd81f18f98186fdc0c9a" -uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" -version = "1.3.0" - - [deps.StatsFuns.extensions] - StatsFunsChainRulesCoreExt = "ChainRulesCore" - StatsFunsInverseFunctionsExt = "InverseFunctions" - - [deps.StatsFuns.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.SteadyStateDiffEq]] -deps = ["DiffEqBase", "DiffEqCallbacks", "LinearAlgebra", "NLsolve", "Reexport", "SciMLBase"] -git-tree-sha1 = "2ca69f4be3294e4cd987d83d6019037d420d9fc1" -uuid = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f" -version = "1.16.1" - -[[deps.StrideArraysCore]] -deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface", "ThreadingUtilities"] -git-tree-sha1 = "f02eb61eb5c97b48c153861c72fbbfdddc607e06" -uuid = "7792a7ef-975c-4747-a70f-980b88e8d1da" -version = "0.4.17" - -[[deps.SuiteSparse]] -deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] -uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" - -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.2.0+1" - -[[deps.Sundials]] -deps = ["CEnum", "DataStructures", "DiffEqBase", "Libdl", "LinearAlgebra", "Logging", "PrecompileTools", "Reexport", "SciMLBase", "SparseArrays", "Sundials_jll"] -git-tree-sha1 = "71dc65a2d7decdde5500299c9b04309e0138d1b4" -uuid = "c3572dad-4567-51f8-b174-8c6c989267f4" -version = "4.20.1" - -[[deps.Sundials_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "SuiteSparse_jll", "libblastrampoline_jll"] -git-tree-sha1 = "ba4d38faeb62de7ef47155ed321dce40a549c305" -uuid = "fb77eaff-e24c-56d4-86b1-d163f2edb164" -version = "5.2.2+0" - -[[deps.SymbolicIndexingInterface]] -deps = ["DocStringExtensions"] -git-tree-sha1 = "f8ab052bfcbdb9b48fad2c80c873aa0d0344dfe5" -uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" -version = "0.2.2" - -[[deps.SymbolicUtils]] -deps = ["AbstractTrees", "Bijections", "ChainRulesCore", "Combinatorics", "ConstructionBase", "DataStructures", "DocStringExtensions", "DynamicPolynomials", "IfElse", "LabelledArrays", "LinearAlgebra", "MultivariatePolynomials", "NaNMath", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArrays", "TimerOutputs", "Unityper"] -git-tree-sha1 = "2f3fa844bcd33e40d8c29de5ee8dded7a0a70422" -uuid = "d1185830-fcd6-423d-90d6-eec64667417b" -version = "1.4.0" - -[[deps.Symbolics]] -deps = ["ArrayInterface", "Bijections", "ConstructionBase", "DataStructures", "DiffRules", "Distributions", "DocStringExtensions", "DomainSets", "DynamicPolynomials", "Groebner", "IfElse", "LaTeXStrings", "LambertW", "Latexify", "Libdl", "LinearAlgebra", "LogExpFunctions", "MacroTools", "Markdown", "NaNMath", "PrecompileTools", "RecipesBase", "RecursiveArrayTools", "Reexport", "Requires", "RuntimeGeneratedFunctions", "SciMLBase", "Setfield", "SparseArrays", "SpecialFunctions", "StaticArrays", "SymbolicUtils", "TreeViews"] -git-tree-sha1 = "4d4e922e160827388c003a9a088a4c63f339f6c0" -uuid = "0c5d862f-8b57-4792-8d23-62f2024744c7" -version = "5.10.0" - - [deps.Symbolics.extensions] - SymbolicsSymPyExt = "SymPy" - - [deps.Symbolics.weakdeps] - SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[deps.TableTraits]] -deps = ["IteratorInterfaceExtensions"] -git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" -uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" -version = "1.0.1" - -[[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits"] -git-tree-sha1 = "cb76cf677714c095e535e3501ac7954732aeea2d" -uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.11.1" - -[[deps.Tar]] -deps = ["ArgTools", "SHA"] -uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.0" - -[[deps.Test]] -deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] -uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.ThreadingUtilities]] -deps = ["ManualMemory"] -git-tree-sha1 = "eda08f7e9818eb53661b3deb74e3159460dfbc27" -uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5" -version = "0.5.2" - -[[deps.TimerOutputs]] -deps = ["ExprTools", "Printf"] -git-tree-sha1 = "f548a9e9c490030e545f72074a41edfd0e5bcdd7" -uuid = "a759f4b9-e2f1-59dc-863e-4aeb61b1ea8f" -version = "0.5.23" - -[[deps.Tokenize]] -git-tree-sha1 = "90538bf898832b6ebd900fa40f223e695970e3a5" -uuid = "0796e94c-ce3b-5d07-9a54-7f471281c624" -version = "0.5.25" - -[[deps.TreeViews]] -deps = ["Test"] -git-tree-sha1 = "8d0d7a3fe2f30d6a7f833a5f19f7c7a5b396eae6" -uuid = "a2a6695c-b41b-5b7d-aed9-dbfdeacea5d7" -version = "0.3.0" - -[[deps.TriangularSolve]] -deps = ["CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "LoopVectorization", "Polyester", "Static", "VectorizationBase"] -git-tree-sha1 = "31eedbc0b6d07c08a700e26d31298ac27ef330eb" -uuid = "d5829a12-d9aa-46ab-831f-fb7c9ab06edf" -version = "0.1.19" - -[[deps.Tricks]] -git-tree-sha1 = "eae1bb484cd63b36999ee58be2de6c178105112f" -uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" -version = "0.1.8" - -[[deps.TruncatedStacktraces]] -deps = ["InteractiveUtils", "MacroTools", "Preferences"] -git-tree-sha1 = "ea3e54c2bdde39062abf5a9758a23735558705e1" -uuid = "781d530d-4396-4725-bb49-402e4bee1e77" -version = "1.4.0" - -[[deps.URIs]] -git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" -uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -version = "1.5.1" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" - -[[deps.UnPack]] -git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" -uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" -version = "1.0.2" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" - -[[deps.Unitful]] -deps = ["Dates", "LinearAlgebra", "Random"] -git-tree-sha1 = "a72d22c7e13fe2de562feda8645aa134712a87ee" -uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" -version = "1.17.0" - - [deps.Unitful.extensions] - ConstructionBaseUnitfulExt = "ConstructionBase" - InverseFunctionsUnitfulExt = "InverseFunctions" - - [deps.Unitful.weakdeps] - ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.Unityper]] -deps = ["ConstructionBase"] -git-tree-sha1 = "21c8fc7cd598ef49f11bc9e94871f5d7740e34b9" -uuid = "a7c27f48-0311-42f6-a7f8-2c11e75eb415" -version = "0.1.5" - -[[deps.VectorizationBase]] -deps = ["ArrayInterface", "CPUSummary", "HostCPUFeatures", "IfElse", "LayoutPointers", "Libdl", "LinearAlgebra", "SIMDTypes", "Static", "StaticArrayInterface"] -git-tree-sha1 = "b182207d4af54ac64cbc71797765068fdeff475d" -uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f" -version = "0.21.64" - -[[deps.VertexSafeGraphs]] -deps = ["Graphs"] -git-tree-sha1 = "8351f8d73d7e880bfc042a8b6922684ebeafb35c" -uuid = "19fa3120-7c27-5ec5-8db8-b0b0aa330d6f" -version = "0.2.0" - -[[deps.Zlib_jll]] -deps = ["Libdl"] -uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+1" - -[[deps.ZygoteRules]] -deps = ["ChainRulesCore", "MacroTools"] -git-tree-sha1 = "9d749cd449fb448aeca4feee9a2f4186dbb5d184" -uuid = "700de1a5-db45-46bc-99cf-38207098b444" -version = "0.2.4" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+1" - -[[deps.nghttp2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.52.0+1" - -[[deps.p7zip_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+2" From b4869d8e90ddddb8d88c6da51cfae30920d98964 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Tue, 31 Oct 2023 11:58:45 -0400 Subject: [PATCH 24/28] Accidental shadowing --- src/NonlinearSolve.jl | 2 +- src/dfsane.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NonlinearSolve.jl b/src/NonlinearSolve.jl index d7219ae9b..ff429f0d6 100644 --- a/src/NonlinearSolve.jl +++ b/src/NonlinearSolve.jl @@ -58,7 +58,7 @@ end get_fu(cache::AbstractNonlinearSolveCache) = cache.fu1 set_fu!(cache::AbstractNonlinearSolveCache, fu) = (cache.fu1 = fu) get_u(cache::AbstractNonlinearSolveCache) = cache.u -set_u!(cache::AbstractNonlinearSolveCache, u) = (cache.u = u) +SciMLBase.set_u!(cache::AbstractNonlinearSolveCache, u) = (cache.u = u) function SciMLBase.solve!(cache::AbstractNonlinearSolveCache) while not_terminated(cache) diff --git a/src/dfsane.jl b/src/dfsane.jl index f78d40411..53fdda8ce 100644 --- a/src/dfsane.jl +++ b/src/dfsane.jl @@ -98,7 +98,7 @@ end get_fu(cache::DFSaneCache) = cache.fuₙ set_fu!(cache::DFSaneCache, fu) = (cache.fuₙ = fu) get_u(cache::DFSaneCache) = cache.uₙ -set_u!(cache::DFSaneCache, u) = (cache.uₙ = u) +SciMLBase.set_u!(cache::DFSaneCache, u) = (cache.uₙ = u) function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::DFSane, args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, From 54860655d78d7ad87faaf5dc21e09a54f5c366c0 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Tue, 31 Oct 2023 12:59:23 -0400 Subject: [PATCH 25/28] Formatting --- src/utils.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.jl b/src/utils.jl index 949583095..0b0447772 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -48,8 +48,8 @@ function default_adargs_to_adtype(; chunk_size = missing, autodiff = nothing, ad = _unwrap_val(autodiff) # We don't really know the typeof the input yet, so we can't use the correct tag! - ad && return AutoForwardDiff{_unwrap_val(chunk_size), NonlinearSolveTag}( - NonlinearSolveTag()) + ad && + return AutoForwardDiff{_unwrap_val(chunk_size), NonlinearSolveTag}(NonlinearSolveTag()) return AutoFiniteDiff(; fdtype = diff_type) end From c47db0a97d9bf69dfa84511148703b08b80e5404 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Wed, 1 Nov 2023 12:12:53 -0400 Subject: [PATCH 26/28] Make the DFSane code sane again :P --- Manifest.toml | 954 ------------------------------------------ src/NonlinearSolve.jl | 2 +- src/ad.jl | 6 +- src/dfsane.jl | 357 ++++++++-------- 4 files changed, 173 insertions(+), 1146 deletions(-) delete mode 100644 Manifest.toml diff --git a/Manifest.toml b/Manifest.toml deleted file mode 100644 index 5e19bf9ef..000000000 --- a/Manifest.toml +++ /dev/null @@ -1,954 +0,0 @@ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.10.0-beta3" -manifest_format = "2.0" -project_hash = "1ed626bd8f3bd27c54d2cbbee8b7f3b485bdc0ba" - -[[deps.ADTypes]] -git-tree-sha1 = "5d2e21d7b0d8c22f67483ef95ebdc39c0e6b6003" -uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" -version = "0.2.4" - -[[deps.Adapt]] -deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "02f731463748db57cc2ebfbd9fbc9ce8280d3433" -uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "3.7.1" -weakdeps = ["StaticArrays"] - - [deps.Adapt.extensions] - AdaptStaticArraysExt = "StaticArrays" - -[[deps.ArgTools]] -uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.1" - -[[deps.ArnoldiMethod]] -deps = ["LinearAlgebra", "Random", "StaticArrays"] -git-tree-sha1 = "62e51b39331de8911e4a7ff6f5aaf38a5f4cc0ae" -uuid = "ec485272-7323-5ecc-a04f-4719b315124d" -version = "0.2.0" - -[[deps.ArrayInterface]] -deps = ["Adapt", "LinearAlgebra", "Requires", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "eba0af42241f0cb648806604222bab1e064edb67" -uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" -version = "7.5.0" - - [deps.ArrayInterface.extensions] - ArrayInterfaceBandedMatricesExt = "BandedMatrices" - ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" - ArrayInterfaceCUDAExt = "CUDA" - ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" - ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" - ArrayInterfaceTrackerExt = "Tracker" - - [deps.ArrayInterface.weakdeps] - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" - StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - -[[deps.ArrayInterfaceCore]] -deps = ["LinearAlgebra", "SnoopPrecompile", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "e5f08b5689b1aad068e01751889f2f615c7db36d" -uuid = "30b0a656-2188-435a-8636-2ec0e6a096e2" -version = "0.1.29" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" - -[[deps.BitTwiddlingConvenienceFunctions]] -deps = ["Static"] -git-tree-sha1 = "0c5f81f47bbbcf4aea7b2959135713459170798b" -uuid = "62783981-4cbd-42fc-bca8-16325de8dc4b" -version = "0.1.5" - -[[deps.CPUSummary]] -deps = ["CpuId", "IfElse", "PrecompileTools", "Static"] -git-tree-sha1 = "601f7e7b3d36f18790e2caf83a882d88e9b71ff1" -uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" -version = "0.2.4" - -[[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "e0af648f0692ec1691b5d094b8724ba1346281cf" -uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.18.0" -weakdeps = ["SparseArrays"] - - [deps.ChainRulesCore.extensions] - ChainRulesCoreSparseArraysExt = "SparseArrays" - -[[deps.CloseOpenIntervals]] -deps = ["Static", "StaticArrayInterface"] -git-tree-sha1 = "70232f82ffaab9dc52585e0dd043b5e0c6b714f1" -uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" -version = "0.1.12" - -[[deps.CommonSolve]] -git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" -uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" -version = "0.2.4" - -[[deps.CommonSubexpressions]] -deps = ["MacroTools", "Test"] -git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" -uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.0" - -[[deps.Compat]] -deps = ["UUIDs"] -git-tree-sha1 = "8a62af3e248a8c4bad6b32cbbe663ae02275e32c" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.10.0" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.5+1" - -[[deps.ConcreteStructs]] -git-tree-sha1 = "f749037478283d372048690eb3b5f92a79432b34" -uuid = "2569d6c7-a4a2-43d3-a901-331e8e4be471" -version = "0.2.3" - -[[deps.ConstructionBase]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" -uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" -version = "1.5.4" - - [deps.ConstructionBase.extensions] - ConstructionBaseIntervalSetsExt = "IntervalSets" - ConstructionBaseStaticArraysExt = "StaticArrays" - - [deps.ConstructionBase.weakdeps] - IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.CpuId]] -deps = ["Markdown"] -git-tree-sha1 = "fcbb72b032692610bfbdb15018ac16a36cf2e406" -uuid = "adafc99b-e345-5852-983c-f28acb93d879" -version = "0.3.1" - -[[deps.DataAPI]] -git-tree-sha1 = "8da84edb865b0b5b0100c0666a9bc9a0b71c553c" -uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.15.0" - -[[deps.DataStructures]] -deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "3dbd312d370723b6bb43ba9d02fc36abade4518d" -uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.15" - -[[deps.DataValueInterfaces]] -git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" -uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" -version = "1.0.0" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" - -[[deps.DiffEqBase]] -deps = ["ArrayInterface", "ChainRulesCore", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces", "ZygoteRules"] -git-tree-sha1 = "c8bc8487a7987c13576f25959ac11b25d5da84e2" -uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" -version = "6.136.0" - - [deps.DiffEqBase.extensions] - DiffEqBaseDistributionsExt = "Distributions" - DiffEqBaseEnzymeExt = "Enzyme" - DiffEqBaseGeneralizedGeneratedExt = "GeneralizedGenerated" - DiffEqBaseMPIExt = "MPI" - DiffEqBaseMeasurementsExt = "Measurements" - DiffEqBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" - DiffEqBaseReverseDiffExt = "ReverseDiff" - DiffEqBaseTrackerExt = "Tracker" - DiffEqBaseUnitfulExt = "Unitful" - DiffEqBaseZygoteExt = "Zygote" - - [deps.DiffEqBase.weakdeps] - Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - GeneralizedGenerated = "6b9d7cbe-bcb9-11e9-073f-15a7a543e2eb" - MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" - Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" - MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" - -[[deps.DiffResults]] -deps = ["StaticArraysCore"] -git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" -uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" -version = "1.1.0" - -[[deps.DiffRules]] -deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] -git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" -uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.15.1" - -[[deps.Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" - -[[deps.DocStringExtensions]] -deps = ["LibGit2"] -git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.3" - -[[deps.Downloads]] -deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] -uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -version = "1.6.0" - -[[deps.EnumX]] -git-tree-sha1 = "bdb1942cd4c45e3c678fd11569d5cccd80976237" -uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" -version = "1.0.4" - -[[deps.EnzymeCore]] -deps = ["Adapt"] -git-tree-sha1 = "ab81396e4e7b61f5590db02fa1c17fae4f16d7ab" -uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" -version = "0.6.3" - -[[deps.ExprTools]] -git-tree-sha1 = "27415f162e6028e81c72b82ef756bf321213b6ec" -uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" -version = "0.1.10" - -[[deps.FastBroadcast]] -deps = ["ArrayInterface", "LinearAlgebra", "Polyester", "Static", "StaticArrayInterface", "StrideArraysCore"] -git-tree-sha1 = "9d77cb1caf03e67514ba60bcfc47c6e131b1950c" -uuid = "7034ab61-46d4-4ed7-9d0f-46aef9175898" -version = "0.2.7" - -[[deps.FastLapackInterface]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "b12f05108e405dadcc2aff0008db7f831374e051" -uuid = "29a986be-02c6-4525-aec4-84b980013641" -version = "2.0.0" - -[[deps.FileWatching]] -uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" - -[[deps.FillArrays]] -deps = ["LinearAlgebra", "Random"] -git-tree-sha1 = "35f0c0f345bff2c6d636f95fdb136323b5a796ef" -uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.7.0" -weakdeps = ["SparseArrays", "Statistics"] - - [deps.FillArrays.extensions] - FillArraysSparseArraysExt = "SparseArrays" - FillArraysStatisticsExt = "Statistics" - -[[deps.FiniteDiff]] -deps = ["ArrayInterface", "LinearAlgebra", "Requires", "Setfield", "SparseArrays"] -git-tree-sha1 = "c6e4a1fbe73b31a3dea94b1da449503b8830c306" -uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" -version = "2.21.1" - - [deps.FiniteDiff.extensions] - FiniteDiffBandedMatricesExt = "BandedMatrices" - FiniteDiffBlockBandedMatricesExt = "BlockBandedMatrices" - FiniteDiffStaticArraysExt = "StaticArrays" - - [deps.FiniteDiff.weakdeps] - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" - StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" - -[[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] -git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" -uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "0.10.36" -weakdeps = ["StaticArrays"] - - [deps.ForwardDiff.extensions] - ForwardDiffStaticArraysExt = "StaticArrays" - -[[deps.FunctionWrappers]] -git-tree-sha1 = "d62485945ce5ae9c0c48f124a84998d755bae00e" -uuid = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" -version = "1.1.3" - -[[deps.FunctionWrappersWrappers]] -deps = ["FunctionWrappers"] -git-tree-sha1 = "b104d487b34566608f8b4e1c39fb0b10aa279ff8" -uuid = "77dc65aa-8811-40c2-897b-53d922fa7daf" -version = "0.1.3" - -[[deps.Future]] -deps = ["Random"] -uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" - -[[deps.GPUArraysCore]] -deps = ["Adapt"] -git-tree-sha1 = "2d6ca471a6c7b536127afccfa7564b5b39227fe0" -uuid = "46192b85-c4d5-4398-a991-12ede77f4527" -version = "0.1.5" - -[[deps.Graphs]] -deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] -git-tree-sha1 = "899050ace26649433ef1af25bc17a815b3db52b7" -uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" -version = "1.9.0" - -[[deps.HostCPUFeatures]] -deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] -git-tree-sha1 = "eb8fed28f4994600e29beef49744639d985a04b2" -uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" -version = "0.1.16" - -[[deps.IfElse]] -git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" -uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" -version = "0.1.1" - -[[deps.Inflate]] -git-tree-sha1 = "ea8031dea4aff6bd41f1df8f2fdfb25b33626381" -uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" -version = "0.1.4" - -[[deps.IntelOpenMP_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "ad37c091f7d7daf900963171600d7c1c5c3ede32" -uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" -version = "2023.2.0+0" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" - -[[deps.IrrationalConstants]] -git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" -uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.2" - -[[deps.IteratorInterfaceExtensions]] -git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" -uuid = "82899510-4779-5014-852e-03e436cf321d" -version = "1.0.0" - -[[deps.JLLWrappers]] -deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.5.0" - -[[deps.KLU]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse_jll"] -git-tree-sha1 = "884c2968c2e8e7e6bf5956af88cb46aa745c854b" -uuid = "ef3ab10e-7fda-4108-b977-705223b18434" -version = "0.4.1" - -[[deps.Krylov]] -deps = ["LinearAlgebra", "Printf", "SparseArrays"] -git-tree-sha1 = "17e462054b42dcdda73e9a9ba0c67754170c88ae" -uuid = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" -version = "0.9.4" - -[[deps.LayoutPointers]] -deps = ["ArrayInterface", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface"] -git-tree-sha1 = "88b8f66b604da079a627b6fb2860d3704a6729a1" -uuid = "10f19ff3-798f-405d-979b-55457f8fc047" -version = "0.1.14" - -[[deps.Lazy]] -deps = ["MacroTools"] -git-tree-sha1 = "1370f8202dac30758f3c345f9909b97f53d87d3f" -uuid = "50d2b5c4-7a5e-59d5-8109-a42b560f39c0" -version = "0.15.1" - -[[deps.LazyArtifacts]] -deps = ["Artifacts", "Pkg"] -uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" - -[[deps.LibCURL]] -deps = ["LibCURL_jll", "MozillaCACerts_jll"] -uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.4" - -[[deps.LibCURL_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] -uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "8.0.1+1" - -[[deps.LibGit2]] -deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" - -[[deps.LibGit2_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] -uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" -version = "1.6.4+0" - -[[deps.LibSSH2_jll]] -deps = ["Artifacts", "Libdl", "MbedTLS_jll"] -uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.11.0+1" - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" - -[[deps.LineSearches]] -deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] -git-tree-sha1 = "7bbea35cec17305fc70a0e5b4641477dc0789d9d" -uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" -version = "7.2.0" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - -[[deps.LinearSolve]] -deps = ["ArrayInterface", "ConcreteStructs", "DocStringExtensions", "EnumX", "EnzymeCore", "FastLapackInterface", "GPUArraysCore", "InteractiveUtils", "KLU", "Krylov", "Libdl", "LinearAlgebra", "MKL_jll", "PrecompileTools", "Preferences", "RecursiveFactorization", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Sparspak", "SuiteSparse", "UnPack"] -git-tree-sha1 = "9f807ca41005f9a8f092716e48022ee5b36cf5b1" -uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" -version = "2.14.1" - - [deps.LinearSolve.extensions] - LinearSolveBandedMatricesExt = "BandedMatrices" - LinearSolveBlockDiagonalsExt = "BlockDiagonals" - LinearSolveCUDAExt = "CUDA" - LinearSolveEnzymeExt = "Enzyme" - LinearSolveHYPREExt = "HYPRE" - LinearSolveIterativeSolversExt = "IterativeSolvers" - LinearSolveKernelAbstractionsExt = "KernelAbstractions" - LinearSolveKrylovKitExt = "KrylovKit" - LinearSolveMetalExt = "Metal" - LinearSolvePardisoExt = "Pardiso" - LinearSolveRecursiveArrayToolsExt = "RecursiveArrayTools" - - [deps.LinearSolve.weakdeps] - BandedMatrices = "aae01518-5342-5314-be14-df237901396f" - BlockDiagonals = "0a1fb500-61f7-11e9-3c65-f5ef3456f9f0" - CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" - IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153" - KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" - KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" - Metal = "dde4c033-4e86-420c-a63e-0dd931031962" - Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" - RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" - -[[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "7d6dd4e9212aebaeed356de34ccf262a3cd415aa" -uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.26" - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" - - [deps.LogExpFunctions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" - -[[deps.LoopVectorization]] -deps = ["ArrayInterface", "ArrayInterfaceCore", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "PrecompileTools", "SIMDTypes", "SLEEFPirates", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"] -git-tree-sha1 = "c88a4afe1703d731b1c4fdf4e3c7e77e3b176ea2" -uuid = "bdcacae8-1622-11e9-2a5c-532679323890" -version = "0.12.165" -weakdeps = ["ChainRulesCore", "ForwardDiff", "SpecialFunctions"] - - [deps.LoopVectorization.extensions] - ForwardDiffExt = ["ChainRulesCore", "ForwardDiff"] - SpecialFunctionsExt = "SpecialFunctions" - -[[deps.MKL_jll]] -deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "Pkg"] -git-tree-sha1 = "eb006abbd7041c28e0d16260e50a24f8f9104913" -uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" -version = "2023.2.0+0" - -[[deps.MacroTools]] -deps = ["Markdown", "Random"] -git-tree-sha1 = "9ee1618cbf5240e6d4e0371d6f24065083f60c48" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.11" - -[[deps.ManualMemory]] -git-tree-sha1 = "bcaef4fc7a0cfe2cba636d84cda54b5e4e4ca3cd" -uuid = "d125e4d3-2237-4719-b19c-fa641b8a4667" -version = "0.1.8" - -[[deps.Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" - -[[deps.MbedTLS_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+1" - -[[deps.Mmap]] -uuid = "a63ad114-7e13-5084-954f-fe012c677804" - -[[deps.MozillaCACerts_jll]] -uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2023.1.10" - -[[deps.MuladdMacro]] -git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab" -uuid = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221" -version = "0.2.4" - -[[deps.NLSolversBase]] -deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"] -git-tree-sha1 = "a0b464d183da839699f4c79e7606d9d186ec172c" -uuid = "d41bc354-129a-5804-8e4c-c37616107c6c" -version = "7.8.3" - -[[deps.NaNMath]] -deps = ["OpenLibm_jll"] -git-tree-sha1 = "0877504529a3e5c3343c6f8b4c0381e57e4387e4" -uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.0.2" - -[[deps.NetworkOptions]] -uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -version = "1.2.0" - -[[deps.OffsetArrays]] -deps = ["Adapt"] -git-tree-sha1 = "2ac17d29c523ce1cd38e27785a7d23024853a4bb" -uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" -version = "1.12.10" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.23+2" - -[[deps.OpenLibm_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+2" - -[[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" -uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.5+0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "2e73fe17cac3c62ad1aebe70d44c963c3cfdc3e3" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.6.2" - -[[deps.PackageExtensionCompat]] -git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" -uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" -version = "1.0.2" -weakdeps = ["Requires", "TOML"] - -[[deps.Parameters]] -deps = ["OrderedCollections", "UnPack"] -git-tree-sha1 = "34c0e9ad262e5f7fc75b10a9952ca7692cfc5fbe" -uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a" -version = "0.12.3" - -[[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.10.0" - -[[deps.Polyester]] -deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Requires", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] -git-tree-sha1 = "398f91235beaac50445557c937ecb0145d171842" -uuid = "f517fe37-dbe3-4b94-8317-1923a5111588" -version = "0.7.8" - -[[deps.PolyesterWeave]] -deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"] -git-tree-sha1 = "240d7170f5ffdb285f9427b92333c3463bf65bf6" -uuid = "1d0040c9-8b98-4ee7-8388-3f51789ca0ad" -version = "0.2.1" - -[[deps.PreallocationTools]] -deps = ["Adapt", "ArrayInterface", "ForwardDiff", "Requires"] -git-tree-sha1 = "f739b1b3cc7b9949af3b35089931f2b58c289163" -uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46" -version = "0.4.12" - - [deps.PreallocationTools.extensions] - PreallocationToolsReverseDiffExt = "ReverseDiff" - - [deps.PreallocationTools.weakdeps] - ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" - -[[deps.PrecompileTools]] -deps = ["Preferences"] -git-tree-sha1 = "03b4c25b43cb84cee5c90aa9b5ea0a78fd848d2f" -uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" -version = "1.2.0" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "00805cd429dcb4870060ff49ef443486c262e38e" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.4.1" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" - -[[deps.Random]] -deps = ["SHA"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - -[[deps.RecipesBase]] -deps = ["PrecompileTools"] -git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "1.3.4" - -[[deps.RecursiveArrayTools]] -deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "Requires", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] -git-tree-sha1 = "fa453b42ba1623bd2e70260bf44dac850a3430a7" -uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" -version = "2.39.0" - - [deps.RecursiveArrayTools.extensions] - RecursiveArrayToolsMeasurementsExt = "Measurements" - RecursiveArrayToolsMonteCarloMeasurementsExt = "MonteCarloMeasurements" - RecursiveArrayToolsTrackerExt = "Tracker" - RecursiveArrayToolsZygoteExt = "Zygote" - - [deps.RecursiveArrayTools.weakdeps] - Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" - MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" - -[[deps.RecursiveFactorization]] -deps = ["LinearAlgebra", "LoopVectorization", "Polyester", "PrecompileTools", "StrideArraysCore", "TriangularSolve"] -git-tree-sha1 = "2b6d4a40339aa02655b1743f4cd7c03109f520c1" -uuid = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" -version = "0.2.20" - -[[deps.Reexport]] -git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" -uuid = "189a3867-3050-52da-a836-e630ba90ab69" -version = "1.2.2" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.0" - -[[deps.RuntimeGeneratedFunctions]] -deps = ["ExprTools", "SHA", "Serialization"] -git-tree-sha1 = "6aacc5eefe8415f47b3e34214c1d79d2674a0ba2" -uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" -version = "0.5.12" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.SIMDTypes]] -git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" -uuid = "94e857df-77ce-4151-89e5-788b33177be4" -version = "0.1.0" - -[[deps.SLEEFPirates]] -deps = ["IfElse", "Static", "VectorizationBase"] -git-tree-sha1 = "3aac6d68c5e57449f5b9b865c9ba50ac2970c4cf" -uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" -version = "0.6.42" - -[[deps.SciMLBase]] -deps = ["ADTypes", "ArrayInterface", "ChainRulesCore", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FillArrays", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables", "TruncatedStacktraces", "ZygoteRules"] -git-tree-sha1 = "1c2a4e245744dd76b2eb677d3535ffad16d8b989" -uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" -version = "2.5.0" - - [deps.SciMLBase.extensions] - SciMLBasePartialFunctionsExt = "PartialFunctions" - SciMLBasePyCallExt = "PyCall" - SciMLBasePythonCallExt = "PythonCall" - SciMLBaseRCallExt = "RCall" - SciMLBaseZygoteExt = "Zygote" - - [deps.SciMLBase.weakdeps] - PartialFunctions = "570af359-4316-4cb7-8c74-252c00c2016b" - PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" - PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" - RCall = "6f49c342-dc21-5d91-9882-a32aef131414" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" - -[[deps.SciMLOperators]] -deps = ["ArrayInterface", "DocStringExtensions", "Lazy", "LinearAlgebra", "Setfield", "SparseArrays", "StaticArraysCore", "Tricks"] -git-tree-sha1 = "65c2e6ced6f62ea796af251eb292a0e131a3613b" -uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" -version = "0.3.6" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" - -[[deps.Setfield]] -deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] -git-tree-sha1 = "e2cc6d8c88613c05e1defb55170bf5ff211fbeac" -uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" -version = "1.1.1" - -[[deps.SharedArrays]] -deps = ["Distributed", "Mmap", "Random", "Serialization"] -uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" - -[[deps.SimpleNonlinearSolve]] -deps = ["ArrayInterface", "DiffEqBase", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "PackageExtensionCompat", "PrecompileTools", "Reexport", "SciMLBase", "StaticArraysCore"] -git-tree-sha1 = "15ff97fa4881133caa324dacafe28b5ac47ad8a2" -uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" -version = "0.1.23" - - [deps.SimpleNonlinearSolve.extensions] - SimpleNonlinearSolveNNlibExt = "NNlib" - - [deps.SimpleNonlinearSolve.weakdeps] - NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" - -[[deps.SimpleTraits]] -deps = ["InteractiveUtils", "MacroTools"] -git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" -uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d" -version = "0.9.4" - -[[deps.SnoopPrecompile]] -deps = ["Preferences"] -git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c" -uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" -version = "1.0.3" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" - -[[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -version = "1.10.0" - -[[deps.SparseDiffTools]] -deps = ["ADTypes", "Adapt", "ArrayInterface", "Compat", "DataStructures", "FiniteDiff", "ForwardDiff", "Graphs", "LinearAlgebra", "PackageExtensionCompat", "Random", "Reexport", "SciMLOperators", "Setfield", "SparseArrays", "StaticArrayInterface", "StaticArrays", "Tricks", "UnPack", "VertexSafeGraphs"] -git-tree-sha1 = "888937b8348e1e9ffae1c31efa61e693bc5463ba" -repo-rev = "ap/tagging" -repo-url = "https://github.com/avik-pal/SparseDiffTools.jl" -uuid = "47a9eef4-7e08-11e9-0b38-333d64bd3804" -version = "2.9.2" - - [deps.SparseDiffTools.extensions] - SparseDiffToolsEnzymeExt = "Enzyme" - SparseDiffToolsSymbolicsExt = "Symbolics" - SparseDiffToolsZygoteExt = "Zygote" - - [deps.SparseDiffTools.weakdeps] - Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" - Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" - Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" - -[[deps.Sparspak]] -deps = ["Libdl", "LinearAlgebra", "Logging", "OffsetArrays", "Printf", "SparseArrays", "Test"] -git-tree-sha1 = "342cf4b449c299d8d1ceaf00b7a49f4fbc7940e7" -uuid = "e56a9233-b9d6-4f03-8d0f-1825330902ac" -version = "0.3.9" - -[[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" -uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.3.1" -weakdeps = ["ChainRulesCore"] - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" - -[[deps.Static]] -deps = ["IfElse"] -git-tree-sha1 = "f295e0a1da4ca425659c57441bcb59abb035a4bc" -uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" -version = "0.8.8" - -[[deps.StaticArrayInterface]] -deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "Requires", "SparseArrays", "Static", "SuiteSparse"] -git-tree-sha1 = "03fec6800a986d191f64f5c0996b59ed526eda25" -uuid = "0d7ed370-da01-4f52-bd93-41d350b8b718" -version = "1.4.1" -weakdeps = ["OffsetArrays", "StaticArrays"] - - [deps.StaticArrayInterface.extensions] - StaticArrayInterfaceOffsetArraysExt = "OffsetArrays" - StaticArrayInterfaceStaticArraysExt = "StaticArrays" - -[[deps.StaticArrays]] -deps = ["LinearAlgebra", "Random", "StaticArraysCore"] -git-tree-sha1 = "0adf069a2a490c47273727e029371b31d44b72b2" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.6.5" -weakdeps = ["Statistics"] - - [deps.StaticArrays.extensions] - StaticArraysStatisticsExt = "Statistics" - -[[deps.StaticArraysCore]] -git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" -uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.2" - -[[deps.Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.10.0" - -[[deps.StrideArraysCore]] -deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface", "ThreadingUtilities"] -git-tree-sha1 = "f02eb61eb5c97b48c153861c72fbbfdddc607e06" -uuid = "7792a7ef-975c-4747-a70f-980b88e8d1da" -version = "0.4.17" - -[[deps.SuiteSparse]] -deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] -uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" - -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "7.2.0+1" - -[[deps.SymbolicIndexingInterface]] -deps = ["DocStringExtensions"] -git-tree-sha1 = "f8ab052bfcbdb9b48fad2c80c873aa0d0344dfe5" -uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" -version = "0.2.2" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[deps.TableTraits]] -deps = ["IteratorInterfaceExtensions"] -git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" -uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" -version = "1.0.1" - -[[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits"] -git-tree-sha1 = "cb76cf677714c095e535e3501ac7954732aeea2d" -uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.11.1" - -[[deps.Tar]] -deps = ["ArgTools", "SHA"] -uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.0" - -[[deps.Test]] -deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] -uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.ThreadingUtilities]] -deps = ["ManualMemory"] -git-tree-sha1 = "eda08f7e9818eb53661b3deb74e3159460dfbc27" -uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5" -version = "0.5.2" - -[[deps.TriangularSolve]] -deps = ["CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "LoopVectorization", "Polyester", "Static", "VectorizationBase"] -git-tree-sha1 = "31eedbc0b6d07c08a700e26d31298ac27ef330eb" -uuid = "d5829a12-d9aa-46ab-831f-fb7c9ab06edf" -version = "0.1.19" - -[[deps.Tricks]] -git-tree-sha1 = "eae1bb484cd63b36999ee58be2de6c178105112f" -uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" -version = "0.1.8" - -[[deps.TruncatedStacktraces]] -deps = ["InteractiveUtils", "MacroTools", "Preferences"] -git-tree-sha1 = "ea3e54c2bdde39062abf5a9758a23735558705e1" -uuid = "781d530d-4396-4725-bb49-402e4bee1e77" -version = "1.4.0" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" - -[[deps.UnPack]] -git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" -uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" -version = "1.0.2" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" - -[[deps.VectorizationBase]] -deps = ["ArrayInterface", "CPUSummary", "HostCPUFeatures", "IfElse", "LayoutPointers", "Libdl", "LinearAlgebra", "SIMDTypes", "Static", "StaticArrayInterface"] -git-tree-sha1 = "b182207d4af54ac64cbc71797765068fdeff475d" -uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f" -version = "0.21.64" - -[[deps.VertexSafeGraphs]] -deps = ["Graphs"] -git-tree-sha1 = "8351f8d73d7e880bfc042a8b6922684ebeafb35c" -uuid = "19fa3120-7c27-5ec5-8db8-b0b0aa330d6f" -version = "0.2.0" - -[[deps.Zlib_jll]] -deps = ["Libdl"] -uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+1" - -[[deps.ZygoteRules]] -deps = ["ChainRulesCore", "MacroTools"] -git-tree-sha1 = "9d749cd449fb448aeca4feee9a2f4186dbb5d184" -uuid = "700de1a5-db45-46bc-99cf-38207098b444" -version = "0.2.4" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+1" - -[[deps.nghttp2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.52.0+1" - -[[deps.p7zip_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+2" diff --git a/src/NonlinearSolve.jl b/src/NonlinearSolve.jl index ff429f0d6..a3b887cac 100644 --- a/src/NonlinearSolve.jl +++ b/src/NonlinearSolve.jl @@ -102,7 +102,7 @@ PrecompileTools.@compile_workload begin NonlinearProblem{true}((du, u, p) -> du .= u .* u .- p, T[0.1], T[2])) precompile_algs = (NewtonRaphson(), TrustRegion(), LevenbergMarquardt(), - PseudoTransient(), GeneralBroyden(), GeneralKlement(), nothing) + PseudoTransient(), GeneralBroyden(), GeneralKlement(), DFSane(), nothing) for prob in probs, alg in precompile_algs solve(prob, alg, abstol = T(1e-2)) diff --git a/src/ad.jl b/src/ad.jl index c54daa939..73ea45fab 100644 --- a/src/ad.jl +++ b/src/ad.jl @@ -26,7 +26,7 @@ function scalar_nlsolve_ad(prob, alg, args...; kwargs...) end function SciMLBase.solve(prob::NonlinearProblem{<:Union{Number, SVector, <:AbstractArray}, - false, <:Dual{T, V, P}}, alg::AbstractNewtonAlgorithm, args...; + false, <:Dual{T, V, P}}, alg::AbstractNonlinearSolveAlgorithm, args...; kwargs...) where {T, V, P} sol, partials = scalar_nlsolve_ad(prob, alg, args...; kwargs...) dual_soln = scalar_nlsolve_dual_soln(sol.u, partials, prob.p) @@ -34,8 +34,8 @@ function SciMLBase.solve(prob::NonlinearProblem{<:Union{Number, SVector, <:Abstr end function SciMLBase.solve(prob::NonlinearProblem{<:Union{Number, SVector, <:AbstractArray}, - false, <:AbstractArray{<:Dual{T, V, P}}}, alg::AbstractNewtonAlgorithm, args...; - kwargs...) where {T, V, P} + false, <:AbstractArray{<:Dual{T, V, P}}}, alg::AbstractNonlinearSolveAlgorithm, + args...; kwargs...) where {T, V, P} sol, partials = scalar_nlsolve_ad(prob, alg, args...; kwargs...) dual_soln = scalar_nlsolve_dual_soln(sol.u, partials, prob.p) return SciMLBase.build_solution(prob, alg, dual_soln, sol.resid; sol.retcode) diff --git a/src/dfsane.jl b/src/dfsane.jl index 53fdda8ce..e158b61c6 100644 --- a/src/dfsane.jl +++ b/src/dfsane.jl @@ -10,79 +10,76 @@ see the paper: [W LaCruz, JM Martinez, and M Raydan (2006), Spectral residual ma gradient information for solving large-scale nonlinear systems of equations, Mathematics of Computation, 75, 1429-1448.](https://www.researchgate.net/publication/220576479_Spectral_Residual_Method_without_Gradient_Information_for_Solving_Large-Scale_Nonlinear_Systems_of_Equations) -See also the implementation in [SimpleNonlinearSolve.jl](https://github.com/SciML/SimpleNonlinearSolve.jl/blob/main/src/dfsane.jl) - ### Keyword Arguments -- `σ_min`: the minimum value of the spectral coefficient `σₙ` which is related to the step - size in the algorithm. Defaults to `1e-10`. -- `σ_max`: the maximum value of the spectral coefficient `σₙ` which is related to the step - size in the algorithm. Defaults to `1e10`. -- `σ_1`: the initial value of the spectral coefficient `σₙ` which is related to the step - size in the algorithm.. Defaults to `1.0`. -- `M`: The monotonicity of the algorithm is determined by a this positive integer. - A value of 1 for `M` would result in strict monotonicity in the decrease of the L2-norm - of the function `f`. However, higher values allow for more flexibility in this reduction. - Despite this, the algorithm still ensures global convergence through the use of a - non-monotone line-search algorithm that adheres to the Grippo-Lampariello-Lucidi - condition. Values in the range of 5 to 20 are usually sufficient, but some cases may call - for a higher value of `M`. The default setting is 10. -- `γ`: a parameter that influences if a proposed step will be accepted. Higher value of `γ` - will make the algorithm more restrictive in accepting steps. Defaults to `1e-4`. -- `τ_min`: if a step is rejected the new step size will get multiplied by factor, and this - parameter is the minimum value of that factor. Defaults to `0.1`. -- `τ_max`: if a step is rejected the new step size will get multiplied by factor, and this - parameter is the maximum value of that factor. Defaults to `0.5`. -- `n_exp`: the exponent of the loss, i.e. ``f_n=||F(x_n)||^{n_exp}``. The paper uses - `n_exp ∈ {1,2}`. Defaults to `2`. -- `η_strategy`: function to determine the parameter `η`, which enables growth - of ``||f_n||^2``. Called as ``η = η_strategy(fn_1, n, x_n, f_n)`` with `fn_1` initialized as - ``fn_1=||f(x_1)||^{n_exp}``, `n` is the iteration number, `x_n` is the current `x`-value and - `f_n` the current residual. Should satisfy ``η > 0`` and ``∑ₖ ηₖ < ∞``. Defaults to - ``fn_1 / n^2``. -- `max_inner_iterations`: the maximum number of iterations allowed for the inner loop of the - algorithm. Defaults to `1000`. + - `σ_min`: the minimum value of the spectral coefficient `σₙ` which is related to the step + size in the algorithm. Defaults to `1e-10`. + - `σ_max`: the maximum value of the spectral coefficient `σₙ` which is related to the step + size in the algorithm. Defaults to `1e10`. + - `σ_1`: the initial value of the spectral coefficient `σₙ` which is related to the step + size in the algorithm.. Defaults to `1.0`. + - `M`: The monotonicity of the algorithm is determined by a this positive integer. + A value of 1 for `M` would result in strict monotonicity in the decrease of the L2-norm + of the function `f`. However, higher values allow for more flexibility in this reduction. + Despite this, the algorithm still ensures global convergence through the use of a + non-monotone line-search algorithm that adheres to the Grippo-Lampariello-Lucidi + condition. Values in the range of 5 to 20 are usually sufficient, but some cases may call + for a higher value of `M`. The default setting is 10. + - `γ`: a parameter that influences if a proposed step will be accepted. Higher value of `γ` + will make the algorithm more restrictive in accepting steps. Defaults to `1e-4`. + - `τ_min`: if a step is rejected the new step size will get multiplied by factor, and this + parameter is the minimum value of that factor. Defaults to `0.1`. + - `τ_max`: if a step is rejected the new step size will get multiplied by factor, and this + parameter is the maximum value of that factor. Defaults to `0.5`. + - `n_exp`: the exponent of the loss, i.e. ``f_n=||F(x_n)||^{n_exp}``. The paper uses + `n_exp ∈ {1,2}`. Defaults to `2`. + - `η_strategy`: function to determine the parameter `η`, which enables growth + of ``||f_n||^2``. Called as ``η = η_strategy(fn_1, n, x_n, f_n)`` with `fn_1` initialized as + ``fn_1=||f(x_1)||^{n_exp}``, `n` is the iteration number, `x_n` is the current `x`-value and + `f_n` the current residual. Should satisfy ``η > 0`` and ``∑ₖ ηₖ < ∞``. Defaults to + ``fn_1 / n^2``. + - `max_inner_iterations`: the maximum number of iterations allowed for the inner loop of the + algorithm. Defaults to `1000`. """ -struct DFSane{T, F} <: AbstractNonlinearSolveAlgorithm - σ_min::T - σ_max::T - σ_1::T +@concrete struct DFSane <: AbstractNonlinearSolveAlgorithm + σ_min + σ_max + σ_1 M::Int - γ::T - τ_min::T - τ_max::T + γ + τ_min + τ_max n_exp::Int - η_strategy::F + η_strategy max_inner_iterations::Int end function DFSane(; σ_min = 1e-10, σ_max = 1e+10, σ_1 = 1.0, M = 10, γ = 1e-4, τ_min = 0.1, - τ_max = 0.5, n_exp = 2, η_strategy = (fn_1, n, x_n, f_n) -> fn_1 / n^2, - max_inner_iterations = 1000) - return DFSane{typeof(σ_min), typeof(η_strategy)}(σ_min, σ_max, σ_1, M, γ, τ_min, τ_max, - n_exp, η_strategy, max_inner_iterations) + τ_max = 0.5, n_exp = 2, η_strategy::F = (fn_1, n, x_n, f_n) -> fn_1 / n^2, + max_inner_iterations = 1000) where {F} + return DFSane(σ_min, σ_max, σ_1, M, γ, τ_min, τ_max, n_exp, η_strategy, + max_inner_iterations) end -# FIXME: Someone please make this code conform to the style of the remaining solvers @concrete mutable struct DFSaneCache{iip} <: AbstractNonlinearSolveCache{iip} alg - uₙ - uₙ₋₁ - fuₙ - fuₙ₋₁ - 𝒹 - ℋ - f₍ₙₒᵣₘ₎ₙ₋₁ - f₍ₙₒᵣₘ₎₀ + u + uprev + fu + fuprev + du + history + f_norm + f_norm_0 M - σₙ - σₘᵢₙ - σₘₐₓ - α₁ + σ_n + σ_min + σ_max + α_1 γ - τₘᵢₙ - τₘₐₓ - nₑₓₚ::Int + τ_min + τ_max + n_exp::Int p force_stop::Bool maxiters::Int @@ -95,219 +92,203 @@ end tc_cache end -get_fu(cache::DFSaneCache) = cache.fuₙ -set_fu!(cache::DFSaneCache, fu) = (cache.fuₙ = fu) -get_u(cache::DFSaneCache) = cache.uₙ -SciMLBase.set_u!(cache::DFSaneCache, u) = (cache.uₙ = u) +get_fu(cache::DFSaneCache) = cache.fu +set_fu!(cache::DFSaneCache, fu) = (cache.fu = fu) function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::DFSane, args...; alias_u0 = false, maxiters = 1000, abstol = nothing, reltol = nothing, termination_condition = nothing, internalnorm::F = DEFAULT_NORM, kwargs...) where {uType, iip, F} - uₙ = alias_u0 ? prob.u0 : deepcopy(prob.u0) - - p = prob.p - T = eltype(uₙ) - σₘᵢₙ, σₘₐₓ, γ, τₘᵢₙ, τₘₐₓ = T(alg.σ_min), T(alg.σ_max), T(alg.γ), T(alg.τ_min), - T(alg.τ_max) - α₁ = one(T) - γ = T(alg.γ) - f₍ₙₒᵣₘ₎ₙ₋₁ = α₁ - σₙ = T(alg.σ_1) - M = alg.M - nₑₓₚ = alg.n_exp - 𝒹, uₙ₋₁, fuₙ, fuₙ₋₁ = copy(uₙ), copy(uₙ), copy(uₙ), copy(uₙ) + u = alias_u0 ? prob.u0 : deepcopy(prob.u0) + T = eltype(u) - if iip - prob.f(fuₙ₋₁, uₙ₋₁, p) - else - fuₙ₋₁ = prob.f(uₙ₋₁, p) - end + du, uprev = copy(u), copy(u) + fu = evaluate_f(prob, u) + fuprev = copy(fu) - f₍ₙₒᵣₘ₎ₙ₋₁ = norm(fuₙ₋₁)^nₑₓₚ - f₍ₙₒᵣₘ₎₀ = f₍ₙₒᵣₘ₎ₙ₋₁ + f_norm = internalnorm(fu)^alg.n_exp + f_norm_0 = f_norm - ℋ = fill(f₍ₙₒᵣₘ₎ₙ₋₁, M) + history = fill(f_norm, alg.M) - abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, fuₙ₋₁, uₙ₋₁, + abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, fu, uprev, termination_condition) - return DFSaneCache{iip}(alg, uₙ, uₙ₋₁, fuₙ, fuₙ₋₁, 𝒹, ℋ, f₍ₙₒᵣₘ₎ₙ₋₁, f₍ₙₒᵣₘ₎₀, - M, σₙ, σₘᵢₙ, σₘₐₓ, α₁, γ, τₘᵢₙ, τₘₐₓ, nₑₓₚ, p, false, maxiters, - internalnorm, ReturnCode.Default, abstol, reltol, prob, NLStats(1, 0, 0, 0, 0), - tc_cache) + return DFSaneCache{iip}(alg, u, uprev, fu, fuprev, du, history, f_norm, f_norm_0, alg.M, + T(alg.σ_1), T(alg.σ_min), T(alg.σ_max), one(T), T(alg.γ), T(alg.τ_min), + T(alg.τ_max), alg.n_exp, prob.p, false, maxiters, internalnorm, ReturnCode.Default, + abstol, reltol, prob, NLStats(1, 0, 0, 0, 0), tc_cache) end function perform_step!(cache::DFSaneCache{true}) - @unpack alg, f₍ₙₒᵣₘ₎ₙ₋₁, f₍ₙₒᵣₘ₎₀, σₙ, σₘᵢₙ, σₘₐₓ, α₁, γ, τₘᵢₙ, τₘₐₓ, nₑₓₚ, M = cache - - f = (dx, x) -> cache.prob.f(dx, x, cache.p) - - T = eltype(cache.uₙ) - n = cache.stats.nsteps + @unpack alg, f_norm, σ_n, σ_min, σ_max, α_1, γ, τ_min, τ_max, n_exp, M, prob = cache + T = eltype(cache.u) + f_norm_old = f_norm # Spectral parameter range check - σₙ = sign(σₙ) * clamp(abs(σₙ), σₘᵢₙ, σₘₐₓ) + σ_n = sign(σ_n) * clamp(abs(σ_n), σ_min, σ_max) # Line search direction - @. cache.𝒹 = -σₙ * cache.fuₙ₋₁ + @. cache.du = -σ_n * cache.fuprev + + η = alg.η_strategy(cache.f_norm_0, cache.stats.nsteps, cache.u, cache.fu) - η = alg.η_strategy(f₍ₙₒᵣₘ₎₀, n, cache.uₙ₋₁, cache.fuₙ₋₁) + f_bar = maximum(cache.history) + α₊ = α_1 + α₋ = α_1 + _axpy!(α₊, cache.du, cache.u) - f̄ = maximum(cache.ℋ) - α₊ = α₁ - α₋ = α₁ - @. cache.uₙ = cache.uₙ₋₁ + α₊ * cache.𝒹 + prob.f(cache.fu, cache.u, cache.p) + f_norm = cache.internalnorm(cache.fu)^n_exp - f(cache.fuₙ, cache.uₙ) - f₍ₙₒᵣₘ₎ₙ = norm(cache.fuₙ)^nₑₓₚ - for jjj in 1:(cache.alg.max_inner_iterations) - 𝒸 = f̄ + η - γ * α₊^2 * f₍ₙₒᵣₘ₎ₙ₋₁ + # TODO: Failure mode with inner line search failed? + for _ in 1:(cache.alg.max_inner_iterations) + c = f_bar + η - γ * α₊^2 * f_norm_old - f₍ₙₒᵣₘ₎ₙ ≤ 𝒸 && break + f_norm ≤ c && break - α₊ = clamp(α₊^2 * f₍ₙₒᵣₘ₎ₙ₋₁ / (f₍ₙₒᵣₘ₎ₙ + (T(2) * α₊ - T(1)) * f₍ₙₒᵣₘ₎ₙ₋₁), - τₘᵢₙ * α₊, τₘₐₓ * α₊) - @. cache.uₙ = cache.uₙ₋₁ - α₋ * cache.𝒹 + α₊ = α₊ * clamp(α₊ * f_norm_old / (f_norm + (T(2) * α₊ - T(1)) * f_norm_old), + τ_min, τ_max) + @. cache.u = cache.uprev - α₋ * cache.du - f(cache.fuₙ, cache.uₙ) - f₍ₙₒᵣₘ₎ₙ = norm(cache.fuₙ)^nₑₓₚ + prob.f(cache.fu, cache.u, cache.p) + f_norm = cache.internalnorm(cache.fu)^n_exp - f₍ₙₒᵣₘ₎ₙ .≤ 𝒸 && break + f_norm ≤ c && break - α₋ = clamp(α₋^2 * f₍ₙₒᵣₘ₎ₙ₋₁ / (f₍ₙₒᵣₘ₎ₙ + (T(2) * α₋ - T(1)) * f₍ₙₒᵣₘ₎ₙ₋₁), - τₘᵢₙ * α₋, τₘₐₓ * α₋) + α₋ = α₋ * clamp(α₋ * f_norm_old / (f_norm + (T(2) * α₋ - T(1)) * f_norm_old), + τ_min, τ_max) + @. cache.u = cache.uprev + α₊ * cache.du - @. cache.uₙ = cache.uₙ₋₁ + α₊ * cache.𝒹 - f(cache.fuₙ, cache.uₙ) - f₍ₙₒᵣₘ₎ₙ = norm(cache.fuₙ)^nₑₓₚ + prob.f(cache.fu, cache.u, cache.p) + f_norm = cache.internalnorm(cache.fu)^n_exp end - check_and_update!(cache, cache.fuₙ, cache.uₙ, cache.uₙ₋₁) + check_and_update!(cache, cache.fu, cache.u, cache.uprev) # Update spectral parameter - @. cache.uₙ₋₁ = cache.uₙ - cache.uₙ₋₁ - @. cache.fuₙ₋₁ = cache.fuₙ - cache.fuₙ₋₁ + @. cache.uprev = cache.u - cache.uprev + @. cache.fuprev = cache.fu - cache.fuprev - α₊ = sum(abs2, cache.uₙ₋₁) - @. cache.uₙ₋₁ = cache.uₙ₋₁ * cache.fuₙ₋₁ - α₋ = sum(cache.uₙ₋₁) - cache.σₙ = α₊ / α₋ + α₊ = sum(abs2, cache.uprev) + @. cache.uprev *= cache.fuprev + α₋ = sum(cache.uprev) + cache.σ_n = α₊ / α₋ # Spectral parameter bounds check - if abs(cache.σₙ) > σₘₐₓ || abs(cache.σₙ) < σₘᵢₙ - test_norm = sqrt(sum(abs2, cache.fuₙ₋₁)) - cache.σₙ = clamp(T(1) / test_norm, T(1), T(1e5)) + if !(σ_min ≤ abs(cache.σ_n) ≤ σ_max) + test_norm = sqrt(sum(abs2, cache.fuprev)) + cache.σ_n = clamp(inv(test_norm), T(1), T(1e5)) end # Take step - @. cache.uₙ₋₁ = cache.uₙ - @. cache.fuₙ₋₁ = cache.fuₙ - cache.f₍ₙₒᵣₘ₎ₙ₋₁ = f₍ₙₒᵣₘ₎ₙ + @. cache.uprev = cache.u + @. cache.fuprev = cache.fu + cache.f_norm = f_norm # Update history - cache.ℋ[n % M + 1] = f₍ₙₒᵣₘ₎ₙ + cache.history[cache.stats.nsteps % M + 1] = f_norm cache.stats.nf += 1 return nothing end function perform_step!(cache::DFSaneCache{false}) - @unpack alg, f₍ₙₒᵣₘ₎ₙ₋₁, f₍ₙₒᵣₘ₎₀, σₙ, σₘᵢₙ, σₘₐₓ, α₁, γ, τₘᵢₙ, τₘₐₓ, nₑₓₚ, M = cache - - f = x -> cache.prob.f(x, cache.p) - - T = eltype(cache.uₙ) - n = cache.stats.nsteps + @unpack alg, f_norm, σ_n, σ_min, σ_max, α_1, γ, τ_min, τ_max, n_exp, M, prob = cache + T = eltype(cache.u) + f_norm_old = f_norm # Spectral parameter range check - σₙ = sign(σₙ) * clamp(abs(σₙ), σₘᵢₙ, σₘₐₓ) + σ_n = sign(σ_n) * clamp(abs(σ_n), σ_min, σ_max) # Line search direction - cache.𝒹 = -σₙ * cache.fuₙ₋₁ + cache.du = @. -σ_n * cache.fuprev + + η = alg.η_strategy(cache.f_norm_0, cache.stats.nsteps, cache.u, cache.fu) - η = alg.η_strategy(f₍ₙₒᵣₘ₎₀, n, cache.uₙ₋₁, cache.fuₙ₋₁) + f_bar = maximum(cache.history) + α₊ = α_1 + α₋ = α_1 + cache.u = @. cache.uprev + α₊ * cache.du - f̄ = maximum(cache.ℋ) - α₊ = α₁ - α₋ = α₁ - cache.uₙ = cache.uₙ₋₁ + α₊ * cache.𝒹 + cache.fu = prob.f(cache.u, cache.p) + f_norm = cache.internalnorm(cache.fu)^n_exp - cache.fuₙ = f(cache.uₙ) - f₍ₙₒᵣₘ₎ₙ = norm(cache.fuₙ)^nₑₓₚ + # TODO: Failure mode with inner line search failed? for _ in 1:(cache.alg.max_inner_iterations) - 𝒸 = f̄ + η - γ * α₊^2 * f₍ₙₒᵣₘ₎ₙ₋₁ + c = f_bar + η - γ * α₊^2 * f_norm_old - f₍ₙₒᵣₘ₎ₙ ≤ 𝒸 && break + f_norm ≤ c && break - α₊ = clamp(α₊^2 * f₍ₙₒᵣₘ₎ₙ₋₁ / (f₍ₙₒᵣₘ₎ₙ + (T(2) * α₊ - T(1)) * f₍ₙₒᵣₘ₎ₙ₋₁), - τₘᵢₙ * α₊, τₘₐₓ * α₊) - cache.uₙ = @. cache.uₙ₋₁ - α₋ * cache.𝒹 + α₊ = α₊ * clamp(α₊ * f_norm_old / (f_norm + (T(2) * α₊ - T(1)) * f_norm_old), + τ_min, τ_max) + cache.u = @. cache.uprev - α₋ * cache.du - cache.fuₙ = f(cache.uₙ) - f₍ₙₒᵣₘ₎ₙ = norm(cache.fuₙ)^nₑₓₚ + cache.fu = prob.f(cache.u, cache.p) + f_norm = cache.internalnorm(cache.fu)^n_exp - f₍ₙₒᵣₘ₎ₙ .≤ 𝒸 && break + f_norm ≤ c && break - α₋ = clamp(α₋^2 * f₍ₙₒᵣₘ₎ₙ₋₁ / (f₍ₙₒᵣₘ₎ₙ + (T(2) * α₋ - T(1)) * f₍ₙₒᵣₘ₎ₙ₋₁), - τₘᵢₙ * α₋, τₘₐₓ * α₋) + α₋ = α₋ * clamp(α₋ * f_norm_old / (f_norm + (T(2) * α₋ - T(1)) * f_norm_old), + τ_min, τ_max) + cache.u = @. cache.uprev + α₊ * cache.du - cache.uₙ = @. cache.uₙ₋₁ + α₊ * cache.𝒹 - cache.fuₙ = f(cache.uₙ) - f₍ₙₒᵣₘ₎ₙ = norm(cache.fuₙ)^nₑₓₚ + cache.fu = prob.f(cache.u, cache.p) + f_norm = cache.internalnorm(cache.fu)^n_exp end - check_and_update!(cache, cache.fuₙ, cache.uₙ, cache.uₙ₋₁) + check_and_update!(cache, cache.fu, cache.u, cache.uprev) # Update spectral parameter - cache.uₙ₋₁ = @. cache.uₙ - cache.uₙ₋₁ - cache.fuₙ₋₁ = @. cache.fuₙ - cache.fuₙ₋₁ + cache.uprev = @. cache.u - cache.uprev + cache.fuprev = @. cache.fu - cache.fuprev - α₊ = sum(abs2, cache.uₙ₋₁) - cache.uₙ₋₁ = @. cache.uₙ₋₁ * cache.fuₙ₋₁ - α₋ = sum(cache.uₙ₋₁) - cache.σₙ = α₊ / α₋ + α₊ = sum(abs2, cache.uprev) + cache.uprev = @. cache.uprev * cache.fuprev + α₋ = sum(cache.uprev) + cache.σ_n = α₊ / α₋ # Spectral parameter bounds check - if abs(cache.σₙ) > σₘₐₓ || abs(cache.σₙ) < σₘᵢₙ - test_norm = sqrt(sum(abs2, cache.fuₙ₋₁)) - cache.σₙ = clamp(T(1) / test_norm, T(1), T(1e5)) + if !(σ_min ≤ abs(cache.σ_n) ≤ σ_max) + test_norm = sqrt(sum(abs2, cache.fuprev)) + cache.σ_n = clamp(inv(test_norm), T(1), T(1e5)) end # Take step - cache.uₙ₋₁ = cache.uₙ - cache.fuₙ₋₁ = cache.fuₙ - cache.f₍ₙₒᵣₘ₎ₙ₋₁ = f₍ₙₒᵣₘ₎ₙ + cache.uprev = cache.u + cache.fuprev = cache.fu + cache.f_norm = f_norm # Update history - cache.ℋ[n % M + 1] = f₍ₙₒᵣₘ₎ₙ + cache.history[cache.stats.nsteps % M + 1] = f_norm cache.stats.nf += 1 return nothing end -function SciMLBase.reinit!(cache::DFSaneCache{iip}, u0 = cache.uₙ; p = cache.p, +function SciMLBase.reinit!(cache::DFSaneCache{iip}, u0 = cache.u; p = cache.p, abstol = cache.abstol, reltol = cache.reltol, maxiters = cache.maxiters, termination_condition = get_termination_mode(cache.tc_cache)) where {iip} cache.p = p if iip - recursivecopy!(cache.uₙ, u0) - recursivecopy!(cache.uₙ₋₁, u0) - cache.prob.f(cache.fuₙ, cache.uₙ, p) - cache.prob.f(cache.fuₙ₋₁, cache.uₙ, p) + recursivecopy!(cache.u, u0) + recursivecopy!(cache.uprev, u0) + cache.prob.f(cache.fu, cache.u, p) + cache.prob.f(cache.fuprev, cache.uprev, p) else - cache.uₙ = u0 - cache.uₙ₋₁ = u0 - cache.fuₙ = cache.prob.f(cache.uₙ, p) - cache.fuₙ₋₁ = cache.prob.f(cache.uₙ, p) + cache.u = u0 + cache.uprev = u0 + cache.fu = cache.prob.f(cache.u, p) + cache.fuprev = cache.prob.f(cache.uprev, p) end - cache.f₍ₙₒᵣₘ₎ₙ₋₁ = norm(cache.fuₙ₋₁)^cache.nₑₓₚ - cache.f₍ₙₒᵣₘ₎₀ = cache.f₍ₙₒᵣₘ₎ₙ₋₁ - fill!(cache.ℋ, cache.f₍ₙₒᵣₘ₎ₙ₋₁) + cache.f_norm = cache.internalnorm(cache.fu)^cache.n_exp + cache.f_norm_0 = cache.f_norm + + fill!(cache.history, cache.f_norm) - T = eltype(cache.uₙ) - cache.σₙ = T(cache.alg.σ_1) + T = eltype(cache.u) + cache.σ_n = T(cache.alg.σ_1) - abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, cache.fuₙ, cache.uₙ, + abstol, reltol, tc_cache = init_termination_cache(abstol, reltol, cache.fu, cache.u, termination_condition) cache.abstol = abstol From 042ab3790329edc1e036c6b4d26858e174e41974 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Wed, 1 Nov 2023 12:15:46 -0400 Subject: [PATCH 27/28] Fix Formatting --- src/NonlinearSolve.jl | 2 +- src/pseudotransient.jl | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/NonlinearSolve.jl b/src/NonlinearSolve.jl index a3b887cac..2b6ab25e4 100644 --- a/src/NonlinearSolve.jl +++ b/src/NonlinearSolve.jl @@ -14,7 +14,7 @@ PrecompileTools.@recompile_invalidations begin import ADTypes: AbstractFiniteDifferencesMode import ArrayInterface: undefmatrix, - matrix_colors, parameterless_type, ismutable, issingular,fast_scalar_indexing + matrix_colors, parameterless_type, ismutable, issingular, fast_scalar_indexing import ConcreteStructs: @concrete import EnumX: @enumx import ForwardDiff diff --git a/src/pseudotransient.jl b/src/pseudotransient.jl index 56b79bc09..5da1375d6 100644 --- a/src/pseudotransient.jl +++ b/src/pseudotransient.jl @@ -102,8 +102,8 @@ end function perform_step!(cache::PseudoTransientCache{true}) @unpack u, u_prev, fu1, f, p, alg, J, linsolve, du, alpha = cache jacobian!!(J, cache) - inv_alpha = inv(alpha) + inv_alpha = inv(alpha) if J isa SciMLBase.AbstractSciMLOperator J = J - inv_alpha * I else @@ -142,14 +142,15 @@ function perform_step!(cache::PseudoTransientCache{false}) @unpack u, u_prev, fu1, f, p, alg, linsolve, alpha = cache cache.J = jacobian!!(cache.J, cache) - inv_alpha = inv(alpha) + inv_alpha = inv(alpha) cache.J = cache.J - inv_alpha * I # u = u - J \ fu if linsolve === nothing cache.du = fu1 / cache.J else - linres = dolinsolve(alg.precs, linsolve; A = cache.J,b = _vec(fu1),linu = _vec(cache.du), p, reltol = cache.abstol) + linres = dolinsolve(alg.precs, linsolve; A = cache.J, b = _vec(fu1), + linu = _vec(cache.du), p, reltol = cache.abstol) cache.linsolve = linres.cache end cache.u = @. u - cache.du # `u` might not support mutation From c489b234c7b9e40e629a1b564ac91601839c86c8 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Wed, 1 Nov 2023 12:37:54 -0400 Subject: [PATCH 28/28] Remove unicode --- test/basictests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/basictests.jl b/test/basictests.jl index d9fc47a1e..bff4bcbae 100644 --- a/test/basictests.jl +++ b/test/basictests.jl @@ -499,7 +499,7 @@ end cache = init(probN, DFSane(); maxiters = 100, abstol = 1e-10) sols = zeros(length(p_range)) for (i, p) in enumerate(p_range) - reinit!(cache, iip ? [cache.uₙ[1]] : cache.uₙ; p = p) + reinit!(cache, iip ? [cache.u[1]] : cache.u; p = p) sol = solve!(cache) sols[i] = iip ? sol.u[1] : sol.u end