Skip to content

Commit 1b5bd33

Browse files
committed
fix the alg utils
1 parent da17cc3 commit 1b5bd33

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/OrdinaryDiffEqDifferentiation/src/alg_utils.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
function _alg_autodiff(alg::OrdinaryDiffEqAlgorithm)
33
error("This algorithm does not have an autodifferentiation option defined.")
44
end
5-
_alg_autodiff(::OrdinaryDiffEqAdaptiveImplicitAlgorithm{CS, AD}) where {CS, AD} = AD
6-
_alg_autodiff(::DAEAlgorithm{CS, AD}) where {CS, AD} = AD
7-
_alg_autodiff(::OrdinaryDiffEqImplicitAlgorithm{CS, AD}) where {CS, AD} = AD
5+
_alg_autodiff(alg::OrdinaryDiffEqAdaptiveImplicitAlgorithm{CS, AD}) where {CS, AD} = alg.autodiff
6+
_alg_autodiff(alg::DAEAlgorithm{CS, AD}) where {CS, AD} = alg.autodiff
7+
_alg_autodiff(alg::OrdinaryDiffEqImplicitAlgorithm{CS, AD}) where {CS, AD} = alg.autodiff
88
_alg_autodiff(alg::CompositeAlgorithm) = _alg_autodiff(alg.algs[end])
99
function _alg_autodiff(::Union{OrdinaryDiffEqExponentialAlgorithm{CS, AD},
1010
OrdinaryDiffEqAdaptiveExponentialAlgorithm{CS, AD}
1111
}) where {
1212
CS, AD
1313
}
14-
AD
14+
alg.autodiff
1515
end
1616

1717
function alg_autodiff(alg)

0 commit comments

Comments
 (0)