solve_cgs_lagrange

sectionproperties.analysis.solver.solve_cgs_lagrange(k_lg: csc_matrix, f: npt.NDArray[np.float64], m: LinearOperator, tol: float = 1e-05) npt.NDArray[np.float64][source]

Solves a linear system using the CGS iterative method (Lagrangian multiplier).

Parameters:
  • k_lg (csc_matrix) – (N+1) x (N+1) Lagrangian multiplier matrix of the linear system

  • f (npt.NDArray[np.float64]) – N x 1 right hand side of the linear system

  • m (LinearOperator) – Preconditioner for the linear matrix approximating the inverse of k

  • tol (float) – Relative tolerance for the solver to achieve. Defaults to 1e-5.

Returns:

The solution vector to the linear system of equations

Raises:

RuntimeError – If the CGS iterative method does not converge or the error from the Lagrangian multiplier method exceeds the tolerance

Return type:

npt.NDArray[np.float64]