Skip to content

Commit e214453

Browse files
committed
Promote abstol and reltol type to match eltype(A)
1 parent f4f6940 commit e214453

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/common.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ function SciMLBase.init(prob::LinearProblem, alg::SciMLLinearSolveAlgorithm,
150150
fill!(u0, false)
151151
end
152152

153+
# Guard against type mismatch for user-specified reltol/abstol
154+
reltol = eltype(prob.A)(reltol)
155+
abstol = eltype(prob.A)(abstol)
156+
153157
cacheval = init_cacheval(alg, A, b, u0, Pl, Pr, maxiters, abstol, reltol, verbose,
154158
assumptions)
155159
isfresh = true

0 commit comments

Comments
 (0)