Could you explain what is happening here? Why is the last line necessary? What does the save_start=true
option do?
save_start
: Denotes whether the initial condition should be included in the solution type as the first timepoint. Defaults totrue
.
The rest I can glean from the source:
Regarding my earlier solution, I think the minimum change involves:
function DEsol_l(parms)
u0 = @view(parms[1:n])
integrator.p[1] = parms[n+1]
integrator.p[2] = parms[n+2]
reinit!(integrator, u0)
sol = solve!(integrator)
sol_v = vec(transpose(@view(sol[:,:])))
return sol_v
end
That seems to still return the correct answer.