gmres

Function gmres 

Source
pub(crate) fn gmres(
    rhs: &[Complex],
    options: GmresOptions,
    apply: impl Fn(&[Complex]) -> Result<Vec<Complex>>,
) -> Result<(Vec<Complex>, Convergence)>
Expand description

Solve A x = rhs for the operator that apply multiplies with, starting from x = 0. Fails with Error::NotConverged when the residual is not finite, when the iterations reach options.max_iterations, or when the Arnoldi iteration breaks down before convergence; errors of apply pass through.