Expand description
Initial value problems y' = f(t, y) with dense output and event location, following
scipy.integrate.solve_ivp:
IvpMethod::Radau: the implicit Runge-Kutta method Radau IIA of order 5 (Hairer and Wanner), L-stable, with a cubic collocation polynomial as dense output. A step-for-step port of SciPy’sRadau.IvpMethod::Lsoda: variable-order, variable-step multistep methods in Nordsieck form that switch automatically between Adams-Moulton (orders 1 to 12, functional iteration) for non-stiff stretches and BDF (orders 1 to 5, Newton iteration) for stiff ones, after Petzold’s LSODA. The method coefficients are those of Hindmarsh’s ODEPACK.
Every accepted step contributes a polynomial piece to a DenseOutput, so the solution can be
evaluated anywhere, and Event functions g(t, y) are located to machine precision on it by
Brent’s method.
See the book entry Radau, LSODA and event location.
Structs§
- Dense
Output - The continuous solution: one polynomial piece per accepted step.
- Event
- An event function
g(t, y)whose zeros are located during the integration. - Explicit
Options - Tolerances and limits for
solve_ivp_explicit. Each step keeps the local error of componentibelowatolᵢ + rtol · |yᵢ|in the RMS norm, whereatolᵢcomes fromatol_componentsif it is non-empty (one entry per component) and fromatolotherwise. - IvpOptions
- Tolerances and limits for
solve_ivp. Each step keeps the local error of every component belowatol + rtol · |yᵢ|, measured in the root-mean-square norm as in SciPy. - IvpSolution
- The result of
solve_ivp. - Segment
- One polynomial piece of the dense output:
y(t) = y_ref + Σₖ cₖ sᵏ⁺¹withs = (t − t_ref) / h, valid on[t_start, t_end].
Enums§
- Explicit
Method - The explicit method of
solve_ivp_explicit. New methods may be added in minor releases. - IvpMethod
- The method of
solve_ivp. - IvpStatus
- Why the integration stopped.
- Sparse
Jacobian - A sparse Jacobian for
solve_ivp_sparse: a function returning∂f/∂yas a sparse matrix, or the sparsity pattern of∂f/∂yfor grouped finite differences (SciPy’sjac_sparsity).
Functions§
- solve_
ivp - Solves
y' = f(t, y),y(t0) = y0on[t0, t1](t1 > t0) with the given method (SciPy’ssolve_ivp), returning every accepted step, the dense output, and the occurrences of each event.jac, if given, returns∂f/∂yas rows; otherwise forward differences are used. - solve_
ivp_ explicit - Solves
y' = f(t, y),y(t0) = y0fromt0tot1with an explicit Runge-Kutta method (SciPy’ssolve_ivpwithmethod='RK45'or'DOP853').t1 < t0integrates backwards. Returns the sameIvpSolutionassolve_ivp: every accepted step, a dense output, and the occurrences of eachEventlocated on the interpolants. - solve_
ivp_ sparse solve_ivpfor large stiff systems with sparse Jacobians (SciPy’ssolve_ivpwith a sparsejacor withjac_sparsity). The Newton matrices of Radau (μ/h · I − J, real and complex) and of LSODA’s BDF corrector (I − h l₀ J) are factorised by the sparse LU (SparseLu, minimum-degree ordering); Radau’s complex system is solved in its real form of twice the size. WithSparseJacobian::Pattern, the Jacobian is estimated by grouped forward differences: columns sharing no row are perturbed together (Curtis, Powell and Reid), so a bandedn × nJacobian costs a few evaluations offinstead ofn.
Type Aliases§
- Event
Function - The boxed function of an
Event. - Sparse
Jacobian Fn - Counts evaluations of
fand its Jacobian. A boxed function returning a sparse Jacobian.