linear_solver module¶
Linear solvers’ wrapper.
- class gemseo.utils.linear_solver.LinearSolver[source]¶
Bases:
object
Solve a linear system Ax=b.
Constructor.
- solve(a_mat, b_vec, linear_solver=Solver.LGMRES, **options)[source]¶
Solve the linear system \(Ax=b\).
- Parameters:
a_mat – The matrix \(A\) of the system, can be a sparse matrix.
b_vec (Sized) – The second member \(b\) of the system.
linear_solver (Solver) –
The name of linear solver.
By default it is set to “lgmres”.
**options – The options of the linear solver.
- Returns:
The solution \(x\) such that \(Ax=b\).