solprop.stepper.runge_kutta#

The interaction-picture Runge-Kutta march as a run’s integrator.

A run is stepped by one of two integrators: RungeKutta, the embedded explicit Runge-Kutta pair in the interaction picture (IP-DOPRI5 by default), or solprop.stepper.multistep.Multistep, the low-call Adams method, which is the default. docs/guide/numerics/choosing-a-stepper.md compares them.

Classes

RungeKutta([tableau])

The interaction-picture Runge-Kutta march with an embedded error estimate.

class solprop.stepper.runge_kutta.RungeKutta(tableau=Tableau(name='DOPRI5', nodes=array([0., 0.2, 0.3, 0.8, 0.88888889, 1., 1.]), matrix=array([[0., 0., 0., 0., 0., 0., 0.], [0.2, 0., 0., 0., 0., 0., 0.], [0.075, 0.225, 0., 0., 0., 0., 0.], [0.97777778, -3.73333333, 3.55555556, 0., 0., 0., 0.], [2.95259869, -11.59579332, 9.82289285, -0.29080933, 0., 0., 0.], [2.84627525, -10.75757576, 8.90642272, 0.27840909, -0.2735313, 0., 0.], [0.09114583, 0., 0.4492363, 0.65104167, -0.32237618, 0.13095238, 0.]]), solution_weights=array([0.09114583, 0., 0.4492363, 0.65104167, -0.32237618, 0.13095238, 0.]), error_weights=array([0.00123264, 0., -0.00425277, 0.03697917, -0.0508638, 0.04190476, -0.025]), order=5, embedded_order=4, first_same_as_last=True))[source]#

Bases: object

The interaction-picture Runge-Kutta march with an embedded error estimate.

Every accepted step pays the tableau’s stages in source calls (six for DOPRI5, the first-same-as-last stage recycled) and keeps no history, where the Adams method holds from seven to about sixty further copies of the state, by backend and formulation: the integrator to choose when a source evaluation is cheap or the state is too large for the Adams history (docs/guide/numerics/choosing-a-stepper.md).

Equality is by the tableau’s identity, as Tableau compares.

Attributes:
tableausolprop.stepper.tableau.Tableau

The scheme. Default DOPRI5, whose continuous extension interpolates save planes.

Examples

>>> from solprop.stepper.runge_kutta import RungeKutta
>>> from solprop.stepper.tableau import TSIT5
>>> RungeKutta()
RungeKutta(tableau=DOPRI5)
>>> RungeKutta(TSIT5).name
'Tsit5'
property name: str[source]#

Return the tableau’s name, the method’s record name.

Returns:
str

The tableau’s name.

tableau: Tableau = Tableau(name='DOPRI5', nodes=array([0.        , 0.2       , 0.3       , 0.8       , 0.88888889,        1.        , 1.        ]), matrix=array([[  0.        ,   0.        ,   0.        ,   0.        ,           0.        ,   0.        ,   0.        ],        [  0.2       ,   0.        ,   0.        ,   0.        ,           0.        ,   0.        ,   0.        ],        [  0.075     ,   0.225     ,   0.        ,   0.        ,           0.        ,   0.        ,   0.        ],        [  0.97777778,  -3.73333333,   3.55555556,   0.        ,           0.        ,   0.        ,   0.        ],        [  2.95259869, -11.59579332,   9.82289285,  -0.29080933,           0.        ,   0.        ,   0.        ],        [  2.84627525, -10.75757576,   8.90642272,   0.27840909,          -0.2735313 ,   0.        ,   0.        ],        [  0.09114583,   0.        ,   0.4492363 ,   0.65104167,          -0.32237618,   0.13095238,   0.        ]]), solution_weights=array([ 0.09114583,  0.        ,  0.4492363 ,  0.65104167, -0.32237618,         0.13095238,  0.        ]), error_weights=array([ 0.00123264,  0.        , -0.00425277,  0.03697917, -0.0508638 ,         0.04190476, -0.025     ]), order=5, embedded_order=4, first_same_as_last=True)#