4.5.5 pde.solvers.explicit module
Defines an explicit solver supporting various methods.
- class EulerSolver(pde, *, backend='auto', adaptive=False, tolerance=0.0001)[source]
Bases:
AdaptiveSolverBaseExplicit Euler solver.
- 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.
adaptive (bool) – When enabled, the time step is adjusted during the simulation using the error tolerance set with tolerance.
tolerance (float) – The error tolerance used in adaptive time stepping. This is used in adaptive time stepping to choose a time step which is small enough so the truncation error of a single step is below tolerance.
- name = 'euler'
- class ExplicitSolver(pde, scheme='euler', **kwargs)[source]
Bases:
AdaptiveSolverBaseVarious explicit PDE solvers.
- 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.
adaptive (bool) – When enabled, the time step is adjusted during the simulation using the error tolerance set with tolerance.
tolerance (float) – The error tolerance used in adaptive time stepping. This is used in adaptive time stepping to choose a time step which is small enough so the truncation error of a single step is below tolerance.
scheme (Literal['euler', 'runge-kutta', 'rk', 'rk45'])
- name = 'explicit'
- class RungeKuttaSolver(pde, *, backend='auto', adaptive=False, tolerance=0.0001)[source]
Bases:
AdaptiveSolverBaseExplicit Runge-Kutta PDE solver of order 5(4).
- 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.
adaptive (bool) – When enabled, the time step is adjusted during the simulation using the error tolerance set with tolerance.
tolerance (float) – The error tolerance used in adaptive time stepping. This is used in adaptive time stepping to choose a time step which is small enough so the truncation error of a single step is below tolerance.
- name = 'runge-kutta'