Skip to content

Commit f1beeb8

Browse files
committed
simplify jac_config
1 parent da81373 commit f1beeb8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/OrdinaryDiffEqDifferentiation/src/derivative_wrappers.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,11 @@ function jacobian!(J::AbstractMatrix{<:Number}, f, x::AbstractArray{<:Number},
258258
nothing
259259
end
260260

261-
function build_jac_config(alg, f::F1, uf::F2, du1, uprev, u, tmp, du2,
262-
::Val{transform} = Val(true)) where {transform, F1, F2}
261+
function build_jac_config(alg, f::F1, uf::F2, du1, uprev, u, tmp, du2) where {F1, F2}
263262
haslinsolve = hasfield(typeof(alg), :linsolve)
264263

265264
if !DiffEqBase.has_jac(f) && # No Jacobian if has analytical solution
266-
(transform || !DiffEqBase.has_Wfact(f)) && # No Jacobian if has_Wfact and Wfact is the one that's used
267-
(!transform || !DiffEqBase.has_Wfact_t(f)) && # No Jacobian has_Wfact and Wfact_t is the one that's used
265+
(!DiffEqBase.has_Wfact_t(f)) &&
268266
((concrete_jac(alg) === nothing && (!haslinsolve || (haslinsolve && # No Jacobian if linsolve doesn't want it
269267
(alg.linsolve === nothing || LinearSolve.needs_concrete_A(alg.linsolve))))) ||
270268
(concrete_jac(alg) !== nothing && concrete_jac(alg))) # Jacobian if explicitly asked for

0 commit comments

Comments
 (0)