4.5.9 pde.solvers.runge_kutta module
Defines an explicit solver using a Runge-Kutta method.
Explicit Runge-Kutta PDE solver of order 5(4). |
- class RungeKuttaSolver(pde: PDEBase, *, backend: str | pde.backends.base.BackendBase = 'auto', adaptive: bool = False, tolerance: float = 0.0001)[source]
Bases:
AdaptiveSolverBaseExplicit Runge-Kutta PDE solver of order 5(4).
- Parameters:
- property backend: BackendBase
The backend for this solver.
- Type:
- classmethod from_name(name: str, pde: PDEBase, **kwargs) SolverBase
Create a solver object from its registered name.
Solver classes are automatically registered when they inherit from
SolverBase. Note that this also requires that the respective python module containing the solver has been loaded before it is attempted to be used.
- make_stepper(state: TField, dt: float | None = None) StepperType
Create the executable stepping function produced by this solver.
- Parameters:
- Returns:
Function that can be called to advance the state from time t_start to time t_end. The function call signature is (state: numpy.ndarray, t_start: float, t_end: float)