Skip to content

Commit b0bee6c

Browse files
Update ode_def_opts.jl
1 parent 50a1908 commit b0bee6c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ode_def_opts.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ function ode_def_opts(name::Symbol,opts::Dict{Symbol,Bool},ex::Expr,params...;M=
294294
if jac_exists
295295
overloadex = :(((p::$name))(::Type{Val{:jac}},t,u,J) = $Jex) |> esc
296296
push!(exprs,overloadex)
297+
overloadex = :(((p::$name))(::Type{Val{:jac}},t::Number,u) = (J=similar(u); p(Val{:jac},t,u,J); J)) |> esc
298+
push!(exprs,overloadex)
297299
end
298300
# Add the Exponential Jacobian
299301
if expjac_exists

0 commit comments

Comments
 (0)