Skip to content

Commit 50f2878

Browse files
committed
remove uneccesary singleton
1 parent 28458ca commit 50f2878

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/solutions/ode_solutions.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -619,8 +619,6 @@ function Base.showerror(io::IO, e::LazyInterpolationException)
619619
" uses lazy interpolation, which is incompatible with `strip_solution`.")
620620
end
621621

622-
struct ODENullFunction <: SciMLBase.AbstractODEFunction{false} end
623-
624622
function strip_solution(sol::ODESolution; strip_alg = false)
625623
if has_lazy_interpolation(sol.alg)
626624
throw(LazyInterpolationException(nameof(typeof(sol.alg))))
@@ -630,8 +628,7 @@ function strip_solution(sol::ODESolution; strip_alg = false)
630628

631629
@reset sol.interp = interp
632630

633-
@reset sol.prob = ODEProblem(ODENullFunction(), sol.prob.u0, sol.prob.tspan, p = sol.prob.p,
634-
problem_type = sol.prob.problem_type, sol.prob.kwargs...)
631+
@reset sol.prob = (; p = nothing)
635632

636633
if strip_alg
637634
@reset sol.alg = nothing

test/downstream/ode_stripping.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ sol = solve(prob, Rosenbrock23())
1414

1515
stripped_sol = SciMLBase.strip_solution(sol)
1616

17-
@test stripped_sol.prob.f isa SciMLBase.ODENullFunction
18-
1917
@test isnothing(SciMLBase.strip_solution(sol, strip_alg = true).alg)
2018

2119
@test isnothing(stripped_sol.interp.f)

0 commit comments

Comments
 (0)