vivyd.solvers.Midpoint#
- class Midpoint(verbose=False)[source]#
Bases:
SolverA midpoint integrator for solving systems of ordinary differential equations of the form
\[\dfrac{ds}{dt} = f(t, s).\]The method is a second-order integrator that updates the state of the system at each time step as
\[\begin{split}t_{n+1/2} &= \dfrac{t_{n+1} + t_n}{2}, \\ s_{n+1/2} &= s_n + f(t_n, s_n) \cdot (t_{n+1/2} - t_n), \\ s_{n+1} &= s_n + f(t_{n+1/2}, s_{n+1/2}) \cdot (t_{n+1} - t_n).\end{split}\]The integrator supports both pure Python and Taichi-accelerated implementations (as defined by the
vivyd.models.TaichiCompatibleandvivyd.models.TaichiConvertibleprotocols).- Parameters:
verbose (bool)