spectral.RK3#

class spectral.RK3[source]#

Bases: TimeIntegrator

3rd-order Strong Stability Preserving Runge-Kutta (SSP-RK3).

This explicit three-stage method preserves strong stability properties, making it particularly suitable for hyperbolic PDEs and problems requiring positivity preservation. The method is 3rd-order accurate in time.

Notes

The SSP property ensures that the numerical solution satisfies the same stability bounds as forward Euler under a modified time step restriction. This is particularly useful for problems with steep gradients or shocks.

References

Engsig-Karup, “Lecture 5: Initial Value Problems”, p. 63

Methods

__init__

Initialize time integrator.

step

Take one time step.

step(rhs: Callable, u: ndarray, t: float, dt: float) ndarray[source]#

Take one time step.

Parameters:
rhsCallable

Right-hand side function f(u, t)

unp.ndarray

Current solution

tfloat

Current time

dtfloat

Time step

Returns:
np.ndarray

Solution at next time step