From ab153bde78e018aecba392b48066c2f3bf5857d1 Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Tue, 21 May 2024 17:25:52 +0530 Subject: [PATCH] refactor: move type-pirated function from BoundaryValueDiffEq here --- src/solutions/ode_solutions.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/solutions/ode_solutions.jl b/src/solutions/ode_solutions.jl index d8f1d59e5..be51dc2d8 100644 --- a/src/solutions/ode_solutions.jl +++ b/src/solutions/ode_solutions.jl @@ -519,6 +519,14 @@ function solution_new_tslocation(sol::ODESolution{T, N}, tslocation) where {T, N sol.original) end +function solution_new_original_retcode( + sol::ODESolution{T, N}, original, retcode, resid) where {T, N} + return ODESolution{T, N}( + sol.u, sol.u_analytic, sol.errors, sol.t, sol.k, sol.discretes, sol.prob, sol.alg, + sol.interp, sol.dense, sol.tslocation, sol.stats, sol.alg_choice, retcode, resid, + original) +end + function solution_slice(sol::ODESolution{T, N}, I) where {T, N} new_t = sol.t[I] discretes = mask_discretes(sol.discretes, new_t, I)