Skip to content

Commit

Permalink
Promote abstol and reltol type to match eltype(A)
Browse files Browse the repository at this point in the history
  • Loading branch information
ma-sadeghi committed Oct 20, 2023
1 parent f4f6940 commit e214453
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check warning on line 155 in src/common.jl

View check run for this annotation

Codecov / codecov/patch

src/common.jl#L154-L155

Added lines #L154 - L155 were not covered by tests

cacheval = init_cacheval(alg, A, b, u0, Pl, Pr, maxiters, abstol, reltol, verbose,
assumptions)
isfresh = true
Expand Down

0 comments on commit e214453

Please sign in to comment.