4.4.4. pde.solvers.implicit module¶
Defines an implicit solver
- exception ConvergenceError[source]¶
Bases:
RuntimeError
- class ImplicitSolver(pde: PDEBase, maxiter: int = 100, maxerror: float = 0.0001, backend: str = 'auto')[source]¶
Bases:
pde.solvers.base.SolverBase
class for solving partial differential equations implicitly
- Parameters
pde (
PDEBase
) – The instance describing the pde that needs to be solvedmaxiter (int) – The maximal number of iterations per step
maxerror (float) – The maximal error that is permitted in each step
backend (str) – Determines how the function is created. Accepted values are ‘numpy` and ‘numba’. Alternatively, ‘auto’ lets the code decide for the most optimal backend.
- make_stepper(state: FieldBase, dt=None) Callable[[FieldBase, float, float], float] [source]¶
return a stepper function using an implicit scheme
- Parameters
state (
FieldBase
) – An example for the state from which the grid and other information can be extracteddt (float) – Time step of the explicit stepping. If None, this solver specifies 1e-3 as a default value.
- Returns
Function that can be called to advance the state from time t_start to time t_end. The function call signature is (state: numpy.ndarray, t_start: float, t_end: float)
- name = 'implicit'¶