4.4.5. pde.solvers.implicit module
Defines an implicit solver
- exception ConvergenceError[source]
Bases:
RuntimeError
- class ImplicitSolver(pde, maxiter=100, maxerror=0.0001, backend='auto')[source]
Bases:
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, dt=None)[source]
return a stepper function using an implicit Euler 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)
- Return type:
- name = 'implicit'