Fit an interpolating polynomial to the results of a Runge-Kutta step.
(y0, y1, k, dt, tableau=_DORMAND_PRINCE_TABLEAU)
| 172 | |
| 173 | |
| 174 | def _interp_fit_rk(y0, y1, k, dt, tableau=_DORMAND_PRINCE_TABLEAU): |
| 175 | """Fit an interpolating polynomial to the results of a Runge-Kutta step.""" |
| 176 | with ops.name_scope('interp_fit_rk'): |
| 177 | dt = math_ops.cast(dt, y0.dtype) |
| 178 | y_mid = y0 + _scaled_dot_product(dt, tableau.c_mid, k) |
| 179 | f0 = k[0] |
| 180 | f1 = k[-1] |
| 181 | return _interp_fit(y0, y1, y_mid, f0, f1, dt) |
| 182 | |
| 183 | |
| 184 | def _interp_evaluate(coefficients, t0, t1, t): |
no test coverage detected