optimus.model.linalg

Linear algebra methods.

Module Contents

Classes

GmresSolver

Functions

linear_solve(lhs_system, rhs_system[, ...])

Solve a system of linear equations.

optimus.model.linalg.linear_solve(lhs_system, rhs_system, return_iteration_count=False)

Solve a system of linear equations.

Parameters
lhs_systemnumpy.ndarray, bempp.api.DiscreteBoundaryOperator

The system of linear equations.

rhs_systemnumpy.ndarray

The right-hand-side vector.

return_iteration_countbool

Return the number of iterations of the linear solver. Default: False

Returns
solutionnumpy.ndarray

The solution vector.

it_countint

The number of iterations (optional).

class optimus.model.linalg.GmresSolver(lhs_system, rhs_system)
solve()

Solve the linear system with GMRES.