Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: solve initialization problem for null solutions/integrators #1051

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@

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
Loading