From c7bddf5eb56398fb24323950eb4a2ea6c2138dcf Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Sat, 22 Mar 2025 18:09:15 -0100 Subject: [PATCH 1/5] Removed deprecated functionality Was deprecated before the v3.0 --- src/default.jl | 2 +- src/deprecated.jl | 85 ----------------------------------------------- 2 files changed, 1 insertion(+), 86 deletions(-) delete mode 100644 src/deprecated.jl diff --git a/src/default.jl b/src/default.jl index 2c86f899a..f5772ade4 100644 --- a/src/default.jl +++ b/src/default.jl @@ -45,7 +45,7 @@ end # For SciML algorithms already using `defaultalg`, all assume square matrix. defaultalg(A, b) = defaultalg(A, b, OperatorAssumptions(true)) -function defaultalg(A::Union{DiffEqArrayOperator, MatrixOperator}, b, +function defaultalg(A::MatrixOperator, b, assump::OperatorAssumptions{Bool}) defaultalg(A.A, b, assump) end diff --git a/src/deprecated.jl b/src/deprecated.jl deleted file mode 100644 index 19623c4c0..000000000 --- a/src/deprecated.jl +++ /dev/null @@ -1,85 +0,0 @@ -const warned_a = Ref(false) -const warned_b = Ref(false) -const warned_u = Ref(false) -const warned_p = Ref(false) -const warned_prec = Ref(false) -const warned_cacheval = Ref(false) -""" -$(SIGNATURES) -""" -function set_A(cache::LinearCache, A) - if !warned_a[] - @warn "set_A is deprecated for mutation on the cache. Use `cache.A = A" - warned_a[] = true - end - @set! cache.A = A - @set! cache.isfresh = true - return cache -end - -""" -$(SIGNATURES) -""" -function set_b(cache::LinearCache, b) - if !warned_b[] - @warn "set_b is deprecated for mutation on the cache. Use `cache.b = b" - warned_b[] = true - end - @set! cache.b = b - return cache -end - -""" -$(SIGNATURES) -""" -function set_u(cache::LinearCache, u) - if !warned_u[] - @warn "set_u is deprecated for mutation on the cache. Use `cache.u = u" - warned_u[] = true - end - @set! cache.u = u - return cache -end - -""" -$(SIGNATURES) -""" -function set_p(cache::LinearCache, p) - if !warned_p[] - @warn "set_p is deprecated for mutation on the cache. Use `cache.p = p" - warned_p[] = true - end - @set! cache.p = p - # @set! cache.isfresh = true - return cache -end - -""" -$(SIGNATURES) -""" -function set_prec(cache, Pl, Pr) - if !warned_prec[] - @warn "set_prec is deprecated for mutation on the cache. Use `cache.Pl = Pl; cache.Pr = Pr" - warned_prec[] = true - end - @set! cache.Pl = Pl - @set! cache.Pr = Pr - return cache -end - -function set_cacheval(cache::LinearCache, alg_cache) - if !warned_cacheval[] - @warn "set_cacheval is deprecated for mutation on the cache. Use `cache.cacheval = cacheval; cache.isfresh = false" - warned_cacheval[] = true - end - if cache.isfresh - @set! cache.cacheval = alg_cache - @set! cache.isfresh = false - return cache - end -end - -@deprecate SciMLBase.solve(cache::LinearCache, args...; kwargs...) SciMLBase.solve!( - cache::LinearCache, - args...; - kwargs...) false From 760fec027645a73850b752a1c934a099b9917463 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sat, 22 Mar 2025 18:51:53 -0100 Subject: [PATCH 2/5] Update LinearSolve.jl --- src/LinearSolve.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/src/LinearSolve.jl b/src/LinearSolve.jl index 3330cde0a..cd1977b8b 100644 --- a/src/LinearSolve.jl +++ b/src/LinearSolve.jl @@ -138,7 +138,6 @@ include("solve_function.jl") include("default.jl") include("init.jl") include("adjoint.jl") -include("deprecated.jl") @inline function _notsuccessful(F::LinearAlgebra.QRCompactWY) (m, n) = size(F) From 779976a4a22f3c4cd39215dcfcad38fba64cc7e2 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sat, 22 Mar 2025 19:30:59 -0100 Subject: [PATCH 3/5] Update pardiso.jl --- test/pardiso/pardiso.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/pardiso/pardiso.jl b/test/pardiso/pardiso.jl index 0a402005f..ac37f0c20 100644 --- a/test/pardiso/pardiso.jl +++ b/test/pardiso/pardiso.jl @@ -54,17 +54,17 @@ prob = LinearProblem(copy(A), copy(b1)) linsolve = init(prob, UMFPACKFactorization()) sol11 = solve!(linsolve) -linsolve = LinearSolve.set_b(sol11.cache, copy(b2)) +linsolve.b = copy(b2) sol12 = solve!(linsolve) -linsolve = LinearSolve.set_A(sol12.cache, copy(A2)) +linsolve.A = copy(A2) sol13 = solve!(linsolve) for alg in algs linsolve = init(prob, alg) sol31 = solve!(linsolve) - linsolve = LinearSolve.set_b(sol31.cache, copy(b2)) + linsolve.b = copy(b2) sol32 = solve!(linsolve) - linsolve = LinearSolve.set_A(sol32.cache, copy(A2)) + linsolve.A = copy(A2) sol33 = solve!(linsolve) @test sol11.u ≈ sol31.u @test sol12.u ≈ sol32.u From 0504851c132dd496e1e4abd35ffcaf8c9ecb8c16 Mon Sep 17 00:00:00 2001 From: Chris Rackauckas Date: Sat, 22 Mar 2025 19:39:38 -0100 Subject: [PATCH 4/5] Setup backwards compat --- src/LinearSolve.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/LinearSolve.jl b/src/LinearSolve.jl index cd1977b8b..342a15689 100644 --- a/src/LinearSolve.jl +++ b/src/LinearSolve.jl @@ -139,6 +139,15 @@ include("default.jl") include("init.jl") include("adjoint.jl") +## Deprecated, remove in July 2025 + +@static if isdefined(SciMLBase, :DiffEqArrayOperator) + function defaultalg(A::SciMLBase.DiffEqArrayOperator, b, + assump::OperatorAssumptions{Bool}) + defaultalg(A.A, b, assump) + end +end + @inline function _notsuccessful(F::LinearAlgebra.QRCompactWY) (m, n) = size(F) U = view(F.factors, 1:min(m, n), 1:n) From 40849d60d3af968839c168bc72c1de5dba26164c Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sat, 22 Mar 2025 20:30:43 -0100 Subject: [PATCH 5/5] Update src/LinearSolve.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/LinearSolve.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LinearSolve.jl b/src/LinearSolve.jl index 342a15689..8bb51bab2 100644 --- a/src/LinearSolve.jl +++ b/src/LinearSolve.jl @@ -143,7 +143,7 @@ include("adjoint.jl") @static if isdefined(SciMLBase, :DiffEqArrayOperator) function defaultalg(A::SciMLBase.DiffEqArrayOperator, b, - assump::OperatorAssumptions{Bool}) + assump::OperatorAssumptions{Bool}) defaultalg(A.A, b, assump) end end