4.5.5 pde.solvers.euler module

Defines an explicit solver for the Euler scheme.

EulerSolver

Explicit Euler solver.

class EulerSolver(pde, *, backend='auto', adaptive=False, tolerance=0.0001)[source]

Bases: AdaptiveSolverBase

Explicit Euler solver.

Parameters:
  • pde (PDEBase) – The partial differential equation that should be solved

  • backend (str) – The backend used for numerical operations

  • adaptive (bool) – Whether to use adaptive time stepping

  • tolerance (float) – Error tolerance for adaptive time stepping

name = 'euler'
class ExplicitSolver(pde, scheme='euler', **kwargs)[source]

Bases: AdaptiveSolverBase

Various explicit PDE solvers.

Parameters:
  • pde (PDEBase) – The partial differential equation that should be solved

  • backend (str) – The backend used for numerical operations

  • adaptive (bool) – Whether to use adaptive time stepping

  • tolerance (float) – Error tolerance for adaptive time stepping

  • scheme (Literal['euler', 'runge-kutta', 'rk', 'rk45'])

name = 'explicit'