Skip to content

Commit

Permalink
fix the alg utils
Browse files Browse the repository at this point in the history
  • Loading branch information
jClugstor committed Nov 18, 2024
1 parent 0e123bb commit 52e6863
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/OrdinaryDiffEqDifferentiation/src/alg_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
function _alg_autodiff(alg::OrdinaryDiffEqAlgorithm)
error("This algorithm does not have an autodifferentiation option defined.")
end
_alg_autodiff(::OrdinaryDiffEqAdaptiveImplicitAlgorithm{CS, AD}) where {CS, AD} = AD
_alg_autodiff(::DAEAlgorithm{CS, AD}) where {CS, AD} = AD
_alg_autodiff(::OrdinaryDiffEqImplicitAlgorithm{CS, AD}) where {CS, AD} = AD
_alg_autodiff(alg::OrdinaryDiffEqAdaptiveImplicitAlgorithm{CS, AD}) where {CS, AD} = alg.autodiff
_alg_autodiff(alg::DAEAlgorithm{CS, AD}) where {CS, AD} = alg.autodiff
_alg_autodiff(alg::OrdinaryDiffEqImplicitAlgorithm{CS, AD}) where {CS, AD} = alg.autodiff
_alg_autodiff(alg::CompositeAlgorithm) = _alg_autodiff(alg.algs[end])
function _alg_autodiff(::Union{OrdinaryDiffEqExponentialAlgorithm{CS, AD},
OrdinaryDiffEqAdaptiveExponentialAlgorithm{CS, AD}
}) where {
CS, AD
}
AD
alg.autodiff
end

function alg_autodiff(alg)
Expand Down

0 comments on commit 52e6863

Please sign in to comment.