Skip to content

Commit 762e44c

Browse files
fix: fix step! without dt for NullODEIntegrator
1 parent 3c528ec commit 762e44c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/solve.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ function step!(integ::NullODEIntegrator, dt = nothing, stop_at_tdt = false)
693693
if !isnothing(dt)
694694
integ.t += dt
695695
else
696-
integ.t = integ.sol[end]
696+
integ.t = integ.sol.t[end]
697697
end
698698
return nothing
699699
end

test/downstream/null_de.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,10 @@ end
9595
@test_nowarn SciMLBase.u_modified!(integ, Float64[])
9696
@test SciMLBase.successful_retcode(SciMLBase.check_error(integ))
9797
end
98+
99+
@testset "`step!` without dt" begin
100+
prob = ODEProblem(Returns(nothing), nothing, (0.0, 1.0))
101+
integ = init(prob, Tsit5())
102+
@test_nowarn step!(integ)
103+
@test integ.t 1.0
104+
end

0 commit comments

Comments
 (0)