gemseo / utils

Show inherited members

linear_solver module

Linear solvers’ wrapper.

class gemseo.utils.linear_solver.LinearSolver[source]

Bases: object

Solve a linear system Ax=b.


class Solver(value)

Bases: LowercaseStrEnum

An enumeration.

LGMRES = 'lgmres'
solve(a_mat, b_vec, linear_solver=Solver.LGMRES, **options)[source]

Solve the linear system \(Ax=b\).

  • 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.


The solution \(x\) such that \(Ax=b\).