From a40f2227e092ec9bfe89205a2db71e56fef4386a Mon Sep 17 00:00:00 2001 From: oscarddssmith Date: Wed, 11 Sep 2024 16:07:25 -0400 Subject: [PATCH] compat --- lib/OrdinaryDiffEqDifferentiation/src/linsolve_utils.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/OrdinaryDiffEqDifferentiation/src/linsolve_utils.jl b/lib/OrdinaryDiffEqDifferentiation/src/linsolve_utils.jl index 82482a530a..caec0cb18b 100644 --- a/lib/OrdinaryDiffEqDifferentiation/src/linsolve_utils.jl +++ b/lib/OrdinaryDiffEqDifferentiation/src/linsolve_utils.jl @@ -37,6 +37,14 @@ function dolinsolve(integrator, linsolve; A = nothing, linu = nothing, b = nothi return linres end +#for backward compat delete soon +function wrapprecs(PL, PR, weight, u) + Pl = _Pl === nothing ? SciMLOperators.IdentityOperator(length(u)) : _Pl + return linsolver + Pr = _Pr === nothing ? SciMLOperators.IdentityOperator(length(u)) : _Pr + end + Pl, Pr +end function wrapprecs(linsolver, W, weight) if hasproperty(linsolver, :precs) && isnothing(linsolver.precs) Pl = LinearSolve.InvPreconditioner(Diagonal(_vec(weight)))