4.4.5. pde.solvers.scipy module¶
Defines a solver using scipy.integrate
- class ScipySolver(pde: PDEBase, backend: str = 'auto', **kwargs)[source]¶
Bases:
SolverBase
class for solving partial differential equations using scipy
This class is a thin wrapper around
scipy.integrate.solve_ivp()
. In particular, it supports all the methods implemented by this function.- Parameters
pde (
PDEBase
) – The instance describing the pde that needs to 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: FieldBase, dt: float = None) Callable[[FieldBase, float, float], float] [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.
- name = 'scipy'¶