4.4.1. pde.solvers.base module

Package that contains base classes for solvers

class SolverBase(pde)[source]

Bases: object

base class for solvers

Parameters

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

classmethod from_name(name, pde, **kwargs)[source]

create solver class based on its 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.

Parameters
  • name (str) – The name of the solver to construct

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

  • **kwargs – Additional arguments for the constructor of the solver

Returns

An instance of a subclass of SolverBase

Return type

SolverBase

abstract make_stepper(state, dt=None)[source]
Parameters

dt (Optional[float]) –

Return type

Callable[[FieldBase, float, float], float]

registered_solvers = ['ExplicitMPISolver', 'ExplicitSolver', 'ImplicitSolver', 'ScipySolver', 'explicit', 'explicit_mpi', 'implicit', 'scipy']