Skip to content

Commit

Permalink
Bugfix for calc_W!
Browse files Browse the repository at this point in the history
  • Loading branch information
MSeeker1340 committed Jul 30, 2018
1 parent 696b119 commit 2713004
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/derivative_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ function calc_W!(integrator, cache::OrdinaryDiffEqConstantCache, dtgamma, repeat
if !W_transform
if DiffEqBase.has_jac(f)
J = f.jac(uprev, p, t)
if !isa(f, DiffEqBase.AbstractDiffEqLinearOperator)
if !isa(J, DiffEqBase.AbstractDiffEqLinearOperator)
J = DiffEqArrayOperator(J)
end
W = WOperator(mass_matrix, dtgamma, J; transform=false)
Expand All @@ -297,7 +297,7 @@ function calc_W!(integrator, cache::OrdinaryDiffEqConstantCache, dtgamma, repeat
else
if DiffEqBase.has_jac(f)
J = f.jac(uprev, p, t)
if !isa(f, DiffEqBase.AbstractDiffEqLinearOperator)
if !isa(J, DiffEqBase.AbstractDiffEqLinearOperator)
J = DiffEqArrayOperator(J)
end
W = WOperator(mass_matrix, dtgamma, J; transform=true)
Expand Down

0 comments on commit 2713004

Please sign in to comment.