From 51f8e948b45ccf8f2494c050eb1fea6651f22bf7 Mon Sep 17 00:00:00 2001 From: oscarddssmith Date: Wed, 6 Aug 2025 15:20:53 -0400 Subject: [PATCH 1/9] don't reset aliasing on reinit! --- lib/NonlinearSolveFirstOrder/src/solve.jl | 2 +- lib/NonlinearSolveQuasiNewton/src/solve.jl | 2 +- lib/NonlinearSolveSpectralMethods/src/solve.jl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/NonlinearSolveFirstOrder/src/solve.jl b/lib/NonlinearSolveFirstOrder/src/solve.jl index e9fc30e2e..2b4fd3ce5 100644 --- a/lib/NonlinearSolveFirstOrder/src/solve.jl +++ b/lib/NonlinearSolveFirstOrder/src/solve.jl @@ -93,7 +93,7 @@ end function InternalAPI.reinit_self!( cache::GeneralizedFirstOrderAlgorithmCache, args...; p = cache.p, u0 = cache.u, - alias_u0::Bool = false, maxiters = 1000, maxtime = nothing, kwargs... + alias_u0::Bool = cache.alias_u0, maxiters = cache.maxiters, maxtime = cache.maxtime, kwargs... ) Utils.reinit_common!(cache, u0, p, alias_u0) diff --git a/lib/NonlinearSolveQuasiNewton/src/solve.jl b/lib/NonlinearSolveQuasiNewton/src/solve.jl index 24e740d3f..1c922fe4d 100644 --- a/lib/NonlinearSolveQuasiNewton/src/solve.jl +++ b/lib/NonlinearSolveQuasiNewton/src/solve.jl @@ -107,7 +107,7 @@ end function InternalAPI.reinit_self!( cache::QuasiNewtonCache, args...; p = cache.p, u0 = cache.u, - alias_u0::Bool = false, maxiters = 1000, maxtime = nothing, kwargs... + alias_u0::Bool = cache.alias_u0, maxiters = cache.maxiters, maxtime = cache.maxtime, kwargs... ) Utils.reinit_common!(cache, u0, p, alias_u0) diff --git a/lib/NonlinearSolveSpectralMethods/src/solve.jl b/lib/NonlinearSolveSpectralMethods/src/solve.jl index ebb8d13a9..f348746ca 100644 --- a/lib/NonlinearSolveSpectralMethods/src/solve.jl +++ b/lib/NonlinearSolveSpectralMethods/src/solve.jl @@ -74,7 +74,7 @@ end function InternalAPI.reinit_self!( cache::GeneralizedDFSaneCache, args...; p = cache.p, u0 = cache.u, - alias_u0::Bool = false, maxiters = 1000, maxtime = nothing, kwargs... + alias_u0::Bool = cache.alias_u0, maxiters = cache.maxiters, maxtime = cache.maxtime, kwargs... ) Utils.reinit_common!(cache, u0, p, alias_u0) T = eltype(u0) From 8f45a81c9f91b663bc621cdfa234d3f487b29dca Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 6 Aug 2025 19:15:53 -0400 Subject: [PATCH 2/9] Update lib/NonlinearSolveQuasiNewton/src/solve.jl --- lib/NonlinearSolveQuasiNewton/src/solve.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/NonlinearSolveQuasiNewton/src/solve.jl b/lib/NonlinearSolveQuasiNewton/src/solve.jl index 1c922fe4d..2e9c0a260 100644 --- a/lib/NonlinearSolveQuasiNewton/src/solve.jl +++ b/lib/NonlinearSolveQuasiNewton/src/solve.jl @@ -107,7 +107,9 @@ end function InternalAPI.reinit_self!( cache::QuasiNewtonCache, args...; p = cache.p, u0 = cache.u, - alias_u0::Bool = cache.alias_u0, maxiters = cache.maxiters, maxtime = cache.maxtime, kwargs... + alias_u0::Bool = hasproperty(cache, :alias_u0) ? cache.alias_u0 : false, + maxiters = hasproperty(maxiters, :maxiters) ? cache.maxiters : 1000, + maxtime = hasproperty(maxtime, :maxtime) ? cache.maxtime : nothing, kwargs... ) Utils.reinit_common!(cache, u0, p, alias_u0) From f6c616c2549f7ed752d2c2758d9f3730ddecc11a Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 6 Aug 2025 19:16:15 -0400 Subject: [PATCH 3/9] Update lib/NonlinearSolveSpectralMethods/src/solve.jl --- lib/NonlinearSolveSpectralMethods/src/solve.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/NonlinearSolveSpectralMethods/src/solve.jl b/lib/NonlinearSolveSpectralMethods/src/solve.jl index f348746ca..8a9c14d82 100644 --- a/lib/NonlinearSolveSpectralMethods/src/solve.jl +++ b/lib/NonlinearSolveSpectralMethods/src/solve.jl @@ -74,7 +74,9 @@ end function InternalAPI.reinit_self!( cache::GeneralizedDFSaneCache, args...; p = cache.p, u0 = cache.u, - alias_u0::Bool = cache.alias_u0, maxiters = cache.maxiters, maxtime = cache.maxtime, kwargs... + alias_u0::Bool = hasproperty(cache, :alias_u0) ? cache.alias_u0 : false, + maxiters = hasproperty(maxiters, :maxiters) ? cache.maxiters : 1000, + maxtime = hasproperty(maxtime, :maxtime) ? cache.maxtime : nothing, kwargs... ) Utils.reinit_common!(cache, u0, p, alias_u0) T = eltype(u0) From 216722ebb60fce6c8594670d190386736f26c233 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 6 Aug 2025 19:16:49 -0400 Subject: [PATCH 4/9] Update lib/NonlinearSolveFirstOrder/src/solve.jl --- lib/NonlinearSolveFirstOrder/src/solve.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/NonlinearSolveFirstOrder/src/solve.jl b/lib/NonlinearSolveFirstOrder/src/solve.jl index 2b4fd3ce5..6a9a4f52e 100644 --- a/lib/NonlinearSolveFirstOrder/src/solve.jl +++ b/lib/NonlinearSolveFirstOrder/src/solve.jl @@ -93,7 +93,9 @@ end function InternalAPI.reinit_self!( cache::GeneralizedFirstOrderAlgorithmCache, args...; p = cache.p, u0 = cache.u, - alias_u0::Bool = cache.alias_u0, maxiters = cache.maxiters, maxtime = cache.maxtime, kwargs... + alias_u0::Bool = hasproperty(cache, :alias_u0) ? cache.alias_u0 : false, + maxiters = hasproperty(maxiters, :maxiters) ? cache.maxiters : 1000, + maxtime = hasproperty(maxtime, :maxtime) ? cache.maxtime : nothing, kwargs... ) Utils.reinit_common!(cache, u0, p, alias_u0) From 32ab3432d8ddda793f7a97c74ca25e81fd0bd347 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 6 Aug 2025 19:17:05 -0400 Subject: [PATCH 5/9] Update lib/NonlinearSolveFirstOrder/src/solve.jl --- lib/NonlinearSolveFirstOrder/src/solve.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/NonlinearSolveFirstOrder/src/solve.jl b/lib/NonlinearSolveFirstOrder/src/solve.jl index 6a9a4f52e..d886e16ca 100644 --- a/lib/NonlinearSolveFirstOrder/src/solve.jl +++ b/lib/NonlinearSolveFirstOrder/src/solve.jl @@ -93,7 +93,7 @@ end function InternalAPI.reinit_self!( cache::GeneralizedFirstOrderAlgorithmCache, args...; p = cache.p, u0 = cache.u, - alias_u0::Bool = hasproperty(cache, :alias_u0) ? cache.alias_u0 : false, + alias_u0::Bool = hasproperty(cache, :alias_u0) ? cache.alias_u0 : false, maxiters = hasproperty(maxiters, :maxiters) ? cache.maxiters : 1000, maxtime = hasproperty(maxtime, :maxtime) ? cache.maxtime : nothing, kwargs... ) From aebcfc28907a8ee7ffcc9e43c4d493623069f499 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 6 Aug 2025 19:17:15 -0400 Subject: [PATCH 6/9] Update lib/NonlinearSolveSpectralMethods/src/solve.jl --- lib/NonlinearSolveSpectralMethods/src/solve.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/NonlinearSolveSpectralMethods/src/solve.jl b/lib/NonlinearSolveSpectralMethods/src/solve.jl index 8a9c14d82..38bba038a 100644 --- a/lib/NonlinearSolveSpectralMethods/src/solve.jl +++ b/lib/NonlinearSolveSpectralMethods/src/solve.jl @@ -74,7 +74,7 @@ end function InternalAPI.reinit_self!( cache::GeneralizedDFSaneCache, args...; p = cache.p, u0 = cache.u, - alias_u0::Bool = hasproperty(cache, :alias_u0) ? cache.alias_u0 : false, + alias_u0::Bool = hasproperty(cache, :alias_u0) ? cache.alias_u0 : false, maxiters = hasproperty(maxiters, :maxiters) ? cache.maxiters : 1000, maxtime = hasproperty(maxtime, :maxtime) ? cache.maxtime : nothing, kwargs... ) From 0b81f0456cfd069bc1a6cbbde27ad390d2199059 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 6 Aug 2025 22:27:59 -0400 Subject: [PATCH 7/9] Update lib/NonlinearSolveFirstOrder/src/solve.jl --- lib/NonlinearSolveFirstOrder/src/solve.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/NonlinearSolveFirstOrder/src/solve.jl b/lib/NonlinearSolveFirstOrder/src/solve.jl index d886e16ca..51ed5af0a 100644 --- a/lib/NonlinearSolveFirstOrder/src/solve.jl +++ b/lib/NonlinearSolveFirstOrder/src/solve.jl @@ -94,8 +94,8 @@ end function InternalAPI.reinit_self!( cache::GeneralizedFirstOrderAlgorithmCache, args...; p = cache.p, u0 = cache.u, alias_u0::Bool = hasproperty(cache, :alias_u0) ? cache.alias_u0 : false, - maxiters = hasproperty(maxiters, :maxiters) ? cache.maxiters : 1000, - maxtime = hasproperty(maxtime, :maxtime) ? cache.maxtime : nothing, kwargs... + maxiters = hasproperty(cache, :maxiters) ? cache.maxiters : 1000, + maxtime = hasproperty(cache, :maxtime) ? cache.maxtime : nothing, kwargs... ) Utils.reinit_common!(cache, u0, p, alias_u0) From 16beb7895f04097da5bf6aae0684ea4ba4505121 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 6 Aug 2025 22:28:29 -0400 Subject: [PATCH 8/9] Update lib/NonlinearSolveQuasiNewton/src/solve.jl --- lib/NonlinearSolveQuasiNewton/src/solve.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/NonlinearSolveQuasiNewton/src/solve.jl b/lib/NonlinearSolveQuasiNewton/src/solve.jl index 2e9c0a260..1cd8ddd48 100644 --- a/lib/NonlinearSolveQuasiNewton/src/solve.jl +++ b/lib/NonlinearSolveQuasiNewton/src/solve.jl @@ -108,8 +108,8 @@ end function InternalAPI.reinit_self!( cache::QuasiNewtonCache, args...; p = cache.p, u0 = cache.u, alias_u0::Bool = hasproperty(cache, :alias_u0) ? cache.alias_u0 : false, - maxiters = hasproperty(maxiters, :maxiters) ? cache.maxiters : 1000, - maxtime = hasproperty(maxtime, :maxtime) ? cache.maxtime : nothing, kwargs... + maxiters = hasproperty(cache, :maxiters) ? cache.maxiters : 1000, + maxtime = hasproperty(cache, :maxtime) ? cache.maxtime : nothing, kwargs... ) Utils.reinit_common!(cache, u0, p, alias_u0) From 07a39e5d5636844f296803013836ce54d3875446 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Wed, 6 Aug 2025 22:28:45 -0400 Subject: [PATCH 9/9] Update lib/NonlinearSolveSpectralMethods/src/solve.jl --- lib/NonlinearSolveSpectralMethods/src/solve.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/NonlinearSolveSpectralMethods/src/solve.jl b/lib/NonlinearSolveSpectralMethods/src/solve.jl index 38bba038a..1a33e6b7f 100644 --- a/lib/NonlinearSolveSpectralMethods/src/solve.jl +++ b/lib/NonlinearSolveSpectralMethods/src/solve.jl @@ -75,8 +75,8 @@ end function InternalAPI.reinit_self!( cache::GeneralizedDFSaneCache, args...; p = cache.p, u0 = cache.u, alias_u0::Bool = hasproperty(cache, :alias_u0) ? cache.alias_u0 : false, - maxiters = hasproperty(maxiters, :maxiters) ? cache.maxiters : 1000, - maxtime = hasproperty(maxtime, :maxtime) ? cache.maxtime : nothing, kwargs... + maxiters = hasproperty(cache, :maxiters) ? cache.maxiters : 1000, + maxtime = hasproperty(cache, :maxtime) ? cache.maxtime : nothing, kwargs... ) Utils.reinit_common!(cache, u0, p, alias_u0) T = eltype(u0)