Skip to content

Commit 6a2cb4d

Browse files
committed
simplify logic slightly
1 parent d6af49b commit 6a2cb4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/OrdinaryDiffEqDifferentiation/src/derivative_utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ function build_J_W(alg, u, uprev, p, t, dt, f::F, ::Type{uEltypeNoUnits},
703703
# If factorization, then just use the jac_prototype
704704
J = similar(f.jac_prototype)
705705
W = similar(J)
706-
elseif (IIP && (concrete_jac(alg) === nothing || !concrete_jac(alg)) &&
706+
elseif (IIP && (concrete_jac(alg) != true) &&
707707
alg.linsolve !== nothing &&
708708
!LinearSolve.needs_concrete_A(alg.linsolve))
709709
# If the user has chosen GMRES but no sparse Jacobian, assume that the dense
@@ -716,7 +716,7 @@ function build_J_W(alg, u, uprev, p, t, dt, f::F, ::Type{uEltypeNoUnits},
716716
J = jacvec
717717
W = WOperator{IIP}(f.mass_matrix, dt, J, u, jacvec)
718718
elseif alg.linsolve !== nothing && !LinearSolve.needs_concrete_A(alg.linsolve) ||
719-
concrete_jac(alg) !== nothing && concrete_jac(alg)
719+
concrete_jac(alg) == true
720720
# The linear solver does not need a concrete Jacobian, but the user has
721721
# asked for one. This will happen when the Jacobian is used in the preconditioner
722722
# or when jvp computation is expensive. Therefore, use concrete J, and sparsity when possible

0 commit comments

Comments
 (0)