From c4ed29187bfdc8daa02d5b13736f3d9e60fa44f6 Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Tue, 21 May 2024 20:32:10 +0530 Subject: [PATCH] fix: don't depend on `ODESolution` internals --- src/utils.jl | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/utils.jl b/src/utils.jl index bfa2d101..d4c7daf9 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -376,17 +376,7 @@ end # Construct BVP Solution function __build_solution(prob::BVProblem, odesol, nlsol) retcode = ifelse(SciMLBase.successful_retcode(nlsol), odesol.retcode, nlsol.retcode) - return __solution_new_original_retcode(odesol, nlsol, retcode, nlsol.resid) -end - -function __solution_new_original_retcode( - sol::ODESolution{T, N}, original, retcode, resid) where {T, N} - return ODESolution{ - T, N, typeof(sol.u), typeof(sol.u_analytic), typeof(sol.errors), typeof(sol.t), - typeof(sol.k), typeof(sol.prob), typeof(sol.alg), typeof(sol.interp), - typeof(sol.stats), typeof(sol.alg_choice), typeof(resid), typeof(original)}( - sol.u, sol.u_analytic, sol.errors, sol.t, sol.k, sol.prob, sol.alg, sol.interp, - sol.dense, sol.tslocation, sol.stats, sol.alg_choice, retcode, resid, original) + return SciMLBase.solution_new_original_retcode(odesol, nlsol, retcode, nlsol.resid) end # Fix3