Skip to content

Commit e8e0d67

Browse files
Properly extend unitfulvalue
Fixes SciML/OrdinaryDiffEq.jl#2675
1 parent 0b14061 commit e8e0d67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/DiffEqBaseForwardDiffExt.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using DiffEqBase: Void, FunctionWrappersWrappers, OrdinaryDiffEqTag,
77
RecursiveArrayTools, reduce_tup, _promote_tspan, has_continuous_callback
88
import DiffEqBase: hasdualpromote, wrapfun_oop, wrapfun_iip, prob2dtmin,
99
promote_tspan, anyeltypedual, isdualtype, value, ODE_DEFAULT_NORM,
10-
InternalITP, nextfloat_tdir, DualEltypeChecker, sse
10+
InternalITP, nextfloat_tdir, DualEltypeChecker, sse, unitfulvalue
1111

1212
eltypedual(x) = eltype(x) <: ForwardDiff.Dual
1313
isdualtype(::Type{<:ForwardDiff.Dual}) = true
@@ -499,7 +499,7 @@ value(x::Type{ForwardDiff.Dual{T, V, N}}) where {T, V, N} = V
499499
value(x::ForwardDiff.Dual) = value(ForwardDiff.value(x))
500500

501501
unitfulvalue(x::Type{ForwardDiff.Dual{T, V, N}}) where {T, V, N} = V
502-
unitfulvalue(x::ForwardDiff.Dual) = unitfulvalue(ForwardDiff.unitfulvalue(x))
502+
unitfulvalue(x::ForwardDiff.Dual) = unitfulvalue(ForwardDiff.value(x))
503503

504504
sse(x::ForwardDiff.Dual) = sse(ForwardDiff.value(x)) + sum(sse, ForwardDiff.partials(x))
505505
function DiffEqBase.totallength(x::ForwardDiff.Dual)

0 commit comments

Comments
 (0)