solve_cgs¶
- sectionproperties.analysis.solver.solve_cgs(k: 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.
- Parameters:
k (csc_matrix) –
N x Nmatrix of the linear systemf (npt.NDArray[np.float64]) –
N x 1right hand side of the linear systemm (LinearOperator) – Preconditioner for the linear matrix approximating the inverse of
ktol (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
- Return type:
npt.NDArray[np.float64]