BackwardsEulerStep
Defaults
algorithm="backwards_euler" performs a single-stage, order-1
backward-Euler update under fixed-step control; the method carries
no embedded error estimate, so adaptive control is unavailable. Each
step solves the implicit stage equation with the shared
Newton–Krylov defaults listed in Default settings.
- class cubie.integrators.BackwardsEulerStep(precision: type[float16] | type[float32] | type[float64] | dtype[float16] | dtype[float32] | dtype[float64], n_states: int, dxdt_fn: Callable | None = None, observables_fn: Callable | None = None, drivers_fn: Callable | None = None, get_solver_helper_fn: Callable | None = None, **kwargs)[source]
Bases:
ODEImplicitStepBackward Euler step solved with matrix-free Newton–Krylov.
- __init__(precision: type[float16] | type[float32] | type[float64] | dtype[float16] | dtype[float32] | dtype[float64], n_states: int, dxdt_fn: Callable | None = None, observables_fn: Callable | None = None, drivers_fn: Callable | None = None, get_solver_helper_fn: Callable | None = None, **kwargs) None[source]
Initialise the backward Euler step configuration.
- Parameters:
precision – Precision applied to device buffers.
n_states – Number of state entries advanced per step.
dxdt_fn – Device function for evaluating f(t, y) right-hand side.
observables_fn – Device function computing system observables.
drivers_fn – Optional device function evaluating drivers at arbitrary times.
get_solver_helper_fn – Callable returning device helpers used by the nonlinear solver.
**kwargs – Optional parameters passed to config classes. See BackwardsEulerStepConfig, ImplicitStepConfig, and solver config classes for available parameters. None values are ignored.
- build_step(dxdt_fn: Callable, observables_fn: Callable, drivers_fn: Callable | None, solver_function: Callable, numba_precision: type, n: int, n_drivers: int) StepCache[source]
Build the device function for a backward Euler step.
- Parameters:
dxdt_fn – Device function for evaluating f(t, y).
observables_fn – Device function for computing observables.
drivers_fn – Optional device function for evaluating drivers at time t.
solver_function – Device function for the Newton-Krylov nonlinear solver.
numba_precision – Numba precision corresponding to the configured precision.
n – Dimension of the state vector.
n_drivers – Number of driver signals provided to the system.
- Returns:
Container holding the compiled step function and solver.
- Return type:
- classmethod family_defaults(tableau=None) AlgorithmDefaults[source]
Return the backward Euler defaults.
- has_error_estimate = False