pogona.EmbeddedRungeKuttaMethod

class pogona.EmbeddedRungeKuttaMethod[source]

Bases: ABC

Butcher tableau for a specific Runge-Kutta method as defined here: https://web.archive.org/save/https://en.wikipedia.org/wiki/List_of_Runge–Kutta_methods

Attributes

order

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

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'

__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][source]
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: ndarray

A square matrix.

B: ndarray

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

C: ndarray

A 1D matrix, ‘vertical header’

abstract property order

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