3.6. fmas.stepper

The \(z\)-propagation schemes implemented with the pyFMAS package are specified by a \(z\)-propagation algorithm along with a \(z\)-stepping formula that performs the field update for a single step. Implements are the subsequent \(z\)-stepping formulas.

RungeKutta2

Second-order Runge-Kutta formula

RungeKutta4

Fourth-order Runge-Kutta formula

NR1992(1,2)

W. H. Press, S. A. Teukolsky, W. T. Vetterling, B. P. Flannery, Numerical Recipes in C: The art of scientific computing (Chapter 16.1), Cambridge University Press (1992).

fmas.stepper.RungeKutta2(fun, z, uw, dz)

Second-order Runge-Kutta formula

Implements second-order Runge-Kutta formula for \(z\)-stepping [NR1992]. Achieves local error \(\mathcal O(\Delta z^3)\), with step size \(\Delta z\).

Parameters
  • fun (function) – Function evaluating the evolution rate of the ODE.

  • z (float) – Current \(z\)-value.

  • uw (numpy.ndarray, 1-dim) – Frequency-domain representation of the current field.

  • dz (float) – Step size.

fmas.stepper.RungeKutta4(fun, z, uw, dz)

Fourth-order Runge-Kutta formula

Implements fourth-order Runge-Kutta formula for \(z\)-stepping [NR1992]. Achieves local error \(\mathcal O(\Delta z^5)\), with step size \(\Delta z\).

Parameters
  • fun (function) – Function evaluating the evolution rate of the ODE.

  • z (float) – Current \(z\)-value.

  • uw (numpy.ndarray, 1-dim) – Frequency-domain representation of the current field.

  • dz (float) – Step size.