solve_gmres

Function solve_gmres 

Source
pub fn solve_gmres<F>(
    a: &ArrayView2<'_, F>,
    b: &ArrayView1<'_, F>,
    max_iter: Option<usize>,
    tol: Option<F>,
    restart: Option<usize>,
) -> IntegrateResult<Array1<F>>
Expand description

Solve a linear system using GMRES (Generalized Minimal Residual) method

GMRES is a robust iterative method for solving general linear systems.

§Arguments

  • a - The coefficient matrix A
  • b - The right-hand side vector b
  • max_iter - Maximum number of iterations (default: min(n, 50))
  • tol - Convergence tolerance (default: 1e-10)
  • restart - Restart parameter for GMRES(m) (default: min(n, 20))

§Returns

  • Result<Array1<F>, IntegrateError> - The solution vector x