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='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 – The second member \(b\) of the system.
linear_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\).
- AVAILABLE_SOLVERS = {'lgmres': <function lgmres>}¶
- LGMRES = 'lgmres'¶