Skip to main content

newton_krylov

Function newton_krylov 

Source
pub fn newton_krylov<F>(
    f: F,
    x0: &[f64],
    preconditioner: Option<&dyn LinearOperator>,
    options: &NewtonKrylovOptions,
) -> Result<NewtonKrylovResult, ErrorsJSL>
where F: FnMut(&[f64]) -> Vec<f64>,
Expand description

Solves F(x) = 0 for large n without forming the Jacobian (SciPy’s newton_krylov). Each Newton iteration solves J dx = −F(x) inexactly with a Krylov method, to the relative accuracy η of the Eisenstat-Walker forcing sequence (choice 2, γ = 0.9), using finite- difference products J v; an Armijo line search on ‖F‖² then sets the step. An optional preconditioner M ≈ J⁻¹ (SciPy’s inner_M) applies to the inner solves.