Skip to content

Commit

Permalink
refactor: move type-pirated function from BoundaryValueDiffEq here
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed May 31, 2024
1 parent 47a9224 commit ab153bd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/solutions/ode_solutions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ab153bd

Please sign in to comment.