4.4.8 pde.solvers.scipy module
Defines a solver using scipy.integrate
- class ScipySolver(pde, *, backend='auto', **kwargs)[source]
Bases:
SolverBase
PDE solver using
scipy.integrate.solve_ivp()
.This class is a thin wrapper around
scipy.integrate.solve_ivp()
. In particular, it supports all the methods implemented by this function and exposes its arguments, so details can be controlled.- Parameters:
pde (
PDEBase
) – The partial differential equation that should be solvedbackend (str) – Determines how the function is created. Accepted values are ‘numpy` and ‘numba’. Alternatively, ‘auto’ lets the code decide for the most optimal backend.
**kwargs – All extra arguments are forwarded to
scipy.integrate.solve_ivp()
.
- make_stepper(state, dt=None)[source]
Return a stepper function.
- Parameters:
state (
FieldBase
) – An example for the state from which the grid and other information can be extracted.dt (float) – Initial time step for the simulation. If None, the solver will choose a suitable initial value.
- Returns:
Function that can be called to advance the state from time t_start to time t_end.
- Return type:
- name = 'scipy'