Skip to content

Commit

Permalink
Prepare DAESolution for interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardssmith committed Feb 12, 2024
1 parent 7611e76 commit 51b0227
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/solutions/dae_solutions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ https://docs.sciml.ai/DiffEqDocs/stable/basics/solution/
exited due to an error. For more details, see
[the return code documentation](https://docs.sciml.ai/SciMLBase/stable/interfaces/Solutions/#retcodes).
"""
struct DAESolution{T, N, uType, duType, uType2, DType, tType, P, A, ID, S} <:
struct DAESolution{T, N, uType, rateType, uType2, DType, tType, P, A, ID, S} <:
AbstractDAESolution{T, N, uType}
u::uType
du::duType
du::rateType
u_analytic::uType2
errors::DType
t::tType
k::Union{Nothing, rateType}
prob::P
alg::A
interp::ID
Expand Down Expand Up @@ -95,6 +96,7 @@ function build_solution(prob::AbstractDAEProblem, alg, t, u, du = nothing;
u_analytic,
errors,
t,
k,
prob,
alg,
interp,
Expand All @@ -112,7 +114,7 @@ function build_solution(prob::AbstractDAEProblem, alg, t, u, du = nothing;
DAESolution{T, N, typeof(u), typeof(du), Nothing, Nothing, typeof(t),
typeof(prob), typeof(alg), typeof(interp), typeof(stats)}(u, du,
nothing,
nothing, t,
nothing, t, k,
prob, alg,
interp,
dense, 0,
Expand Down Expand Up @@ -167,6 +169,7 @@ function build_solution(sol::AbstractDAESolution{T, N}, u_analytic, errors) wher
u_analytic,
errors,
sol.t,
sol.k,
sol.prob,
sol.alg,
sol.interp,
Expand All @@ -184,6 +187,7 @@ function solution_new_retcode(sol::AbstractDAESolution{T, N}, retcode) where {T,
sol.u_analytic,
sol.errors,
sol.t,
sol.k,
sol.prob,
sol.alg,
sol.interp,
Expand All @@ -201,6 +205,7 @@ function solution_new_tslocation(sol::AbstractDAESolution{T, N}, tslocation) whe
sol.u_analytic,
sol.errors,
sol.t,
sol.k,
sol.prob,
sol.alg,
sol.interp,
Expand All @@ -221,6 +226,7 @@ function solution_slice(sol::AbstractDAESolution{T, N}, I) where {T, N}
sol.u_analytic[I],
sol.errors,
sol.t[I],
sol.k[I],
sol.prob,
sol.alg,
sol.interp,
Expand Down

0 comments on commit 51b0227

Please sign in to comment.