From e214453b867d06e597b72b1257db329bbb63c84a Mon Sep 17 00:00:00 2001 From: Amin Sadeghi Date: Fri, 20 Oct 2023 13:40:02 -0400 Subject: [PATCH] Promote abstol and reltol type to match eltype(A) --- src/common.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common.jl b/src/common.jl index 34160647c..5cdecd37e 100644 --- a/src/common.jl +++ b/src/common.jl @@ -150,6 +150,10 @@ function SciMLBase.init(prob::LinearProblem, alg::SciMLLinearSolveAlgorithm, fill!(u0, false) end + # Guard against type mismatch for user-specified reltol/abstol + reltol = eltype(prob.A)(reltol) + abstol = eltype(prob.A)(abstol) + cacheval = init_cacheval(alg, A, b, u0, Pl, Pr, maxiters, abstol, reltol, verbose, assumptions) isfresh = true