Skip to content

Commit 85fc29c

Browse files
Merge pull request #840 from SciML/ChrisRackauckas-patch-1
Update reltol and abstol handling for odd (dual) number types
2 parents 3925e40 + 1c60e75 commit 85fc29c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,8 @@ function __init(prob::LinearProblem, alg::SciMLLinearSolveAlgorithm,
357357
u0_ = u0 !== nothing ? u0 : __init_u0_from_Ab(A, b)
358358

359359
# Guard against type mismatch for user-specified reltol/abstol
360-
reltol = real(eltype(prob.b))(reltol)
361-
abstol = real(eltype(prob.b))(abstol)
360+
reltol = real(eltype(prob.b))(SciMLBase.value(reltol))
361+
abstol = real(eltype(prob.b))(SciMLBase.value(abstol))
362362

363363
precs = if hasproperty(alg, :precs)
364364
isnothing(alg.precs) ? DEFAULT_PRECS : alg.precs

0 commit comments

Comments
 (0)