For short answer
, No! it not override RK45's time step besause the function scipy.integrate.solve_ivp
will use interpulated value for each t
in t_eval
. And RK45 still use its own time step.
For long answer.
After doing some investigate, I found that.
According to source code!
At line 156 in function solve_ivp
. At line 477.
solver = method(fun, t0, y0, tf, vectorized=vectorized, **options)
The solver doesn't take t_eval
as parameter.
At line 511.
t = solver.t
Solver return it own t
.
At line 545.
if solver.direction > 0:
t_eval_i_new = np.searchsorted(t_eval, t, side='right')
t_eval_step = t_eval[t_eval_i:t_eval_i_new]
Which t_eval_i_new
is new index of t_eval
that have t
in between using np.searchsorted
and t_eval_step
is time steps of t_eval
between ode solver step.
if t_eval_step.size > 0:
if sol is None:
sol = solver.dense_output()
ts.append(t_eval_step)
ys.append(sol(t_eval_step))
t_eval_i = t_eval_i_new
Which means we append t_eval_step
to ts
and use solver.dense_output()
to interpolant over step and give approximate value for each specific time in t_eval_step
At line 585 after finish integration then program return output .
return OdeResult(t=ts, y=ys, sol=sol, t_events=t_events, nfev=solver.nfev,
njev=solver.njev, nlu=solver.nlu, status=status,
message=message, success=status >= 0)