gemseo / utils

linear_solver module

Linear solvers wrapper

class gemseo.utils.linear_solver.LinearSolver[source]

Bases: object

Solve a linear system Ax=b


AVAILABLE_SOLVERS = {'lgmres': <function lgmres>}
LGMRES = 'lgmres'
solve(a_mat, b_vec, linear_solver='lgmres', **kwargs_lin)[source]

Solves the linear system Ax=b using scipy sparse GMRES solver

  • a_mat – matrix A of the system, can be a sparse matrix

  • b_vec – second member

  • linear_solver – name of linear solver (Default value = ‘lgmres’)

  • kwargs_lin – arguments passed to the scipy linear solver


solution x such that A.x=b