Skip to content

Commit ba8b73f

Browse files
Mark null ODE solutions as dense
We actually know the entire time series for the solution, so we should state that we know that via `dense=true`. ```julia using OrdinaryDiffEqDefault, ModelingToolkit using ModelingToolkit: t_nounits as t, D_nounits as D @variables x(t) y(t) eqs = [y ~ x, y ~ sin(t)] @mtkbuild sys = ODESystem(eqs, t) tspan = (0.0, 10.0) prob = ODEProblem(sys, [], tspan) sol = solve(prob) using Plots plot(sol, idxs = [x]) savefig("plot.png") ``` Before and after
1 parent 9c97337 commit ba8b73f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/solve.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ function build_null_solution(prob::AbstractDEProblem, args...;
748748

749749
prob, success = hack_null_solution_init(prob)
750750
retcode = success ? ReturnCode.Success : ReturnCode.InitialFailure
751-
build_solution(prob, nothing, ts, timeseries; retcode)
751+
build_solution(prob, nothing, ts, timeseries; dense=true, retcode)
752752
end
753753

754754
function build_null_solution(

0 commit comments

Comments
 (0)