pogona.RKFehlberg45

class pogona.RKFehlberg45[source]

Bases: pogona.movement_predictor.EmbeddedRungeKuttaMethod

DOI: 10.1007/BF02241732

Attributes

A

A square matrix.

B

'Horizontal header', starting from the left, 2 rows where the first row should give the higher-order accuracy solution.

C

A 1D matrix, 'vertical header'

order

The order of the higher-order method used for the actual integration.

__init__()

Methods

__init__()

compute(func, t_old, y_old, dt)

param func

A function mapping a time t and value y to

compute(func: Callable[[float, Any], Any], t_old: float, y_old: Any, dt: float) Tuple[Any, Any, Any]
Parameters
  • func – A function mapping a time t and value y to a time derivative of y (dy/dt).

  • t_old – Time of the previous time step.

  • y_old – Value at t_old.

  • dt – delta time.

Returns

The predicted new value with highest-order accuracy, the predicted new value with lower-order accuracy, and the difference (error) between the two.

A: numpy.ndarray = array([[ 0.        ,  0.        ,  0.        ,  0.        ,  0.        ,          0.        ],        [ 0.25      ,  0.        ,  0.        ,  0.        ,  0.        ,          0.        ],        [ 0.09375   ,  0.28125   ,  0.        ,  0.        ,  0.        ,          0.        ],        [ 0.87938097, -3.27719618,  3.32089213,  0.        ,  0.        ,          0.        ],        [ 2.03240741, -8.        ,  7.17348928, -0.20589669,  0.        ,          0.        ],        [-0.2962963 ,  2.        , -1.38167641,  0.45297271, -0.275     ,          0.        ]])

A square matrix.

B: numpy.ndarray = array([[ 0.11851852,  0.        ,  0.51898635,  0.50613149, -0.18      ,          0.03636364],        [ 0.11574074,  0.        ,  0.54892788,  0.53533138, -0.2       ,          0.        ]])

‘Horizontal header’, starting from the left, 2 rows where the first row should give the higher-order accuracy solution.

C: numpy.ndarray = array([0.        , 0.25      , 0.375     , 0.92307692, 1.        ,        0.5       ])

A 1D matrix, ‘vertical header’

property order

The order of the higher-order method used for the actual integration.