Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,8 @@ function step!(integ::NullODEIntegrator, dt = nothing, stop_at_tdt = false)
end
return nothing
end
function SciMLBase.u_modified!(integ::NullODEIntegrator, u) end
SciMLBase.check_error(integ::NullODEIntegrator) = integ.sol.retcode

function hack_null_solution_init(prob)
if SciMLBase.has_initialization_data(prob.f)
Expand Down
7 changes: 7 additions & 0 deletions test/downstream/null_de.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,10 @@ end
sol = solve(prob)
@test sol.resid isa SVector{1, Float64}
end

@testset "`u_modified!` works on null integrators" begin
prob = ODEProblem(Returns(nothing), nothing, (0.0, 1.0))
integ = init(prob, Tsit5())
@test_nowarn SciMLBase.u_modified!(integ, Float64[])
@test SciMLBase.successful_retcode(SciMLBase.check_error(integ))
end
Loading