Skip to content

Commit

Permalink
feat: solve initialization problem for null solutions/integrators
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed May 28, 2024
1 parent 08fbaf0 commit aa3a3c3
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,21 @@ function build_null_solution(prob::AbstractDEProblem, args...;

timeseries = [Float64[] for i in 1:length(ts)]

build_solution(prob, nothing, ts, timeseries, retcode = ReturnCode.Success)
sol = build_solution(prob, nothing, ts, timeseries, retcode = ReturnCode.Success)
if SciMLBase.has_initializeprob(prob.f)
integ = NullODEIntegrator{

Check warning on line 681 in src/solve.jl

View check run for this annotation

Codecov / codecov/patch

src/solve.jl#L679-L681

Added lines #L679 - L681 were not covered by tests
isinplace(prob), typeof(prob), eltype(prob.tspan), typeof(sol),
typeof(prob.f), typeof(prob.p)
}(Float64[],
Float64[],
prob.tspan[1],
prob,
sol,
prob.f,
prob.p)
initialize_dae!(integ)

Check warning on line 691 in src/solve.jl

View check run for this annotation

Codecov / codecov/patch

src/solve.jl#L691

Added line #L691 was not covered by tests
end
return sol

Check warning on line 693 in src/solve.jl

View check run for this annotation

Codecov / codecov/patch

src/solve.jl#L693

Added line #L693 was not covered by tests
end

function build_null_solution(
Expand Down

0 comments on commit aa3a3c3

Please sign in to comment.