gemseo / algos / linear_solvers

Show inherited members

lib_scipy_linalg module

Wrappers for SciPy’s linear solvers.

class gemseo.algos.linear_solvers.lib_scipy_linalg.ScipyLinalgAlgos[source]

Bases: LinearSolverLibrary

Wrapper for scipy linalg sparse linear solvers.

classmethod get_default_properties(algo_name)[source]

Return the properties of the algorithm.

It states if it requires symmetric, or positive definite matrices for instance.


algo_name (str) – The algorithm name.


The properties of the solver.

Return type:


BASE_INFO_MSG = 'scipy linear solver algorithm stop info: '
LGMRES_SPEC_OPTS = ('inner_m', 'outer_k', 'outer_v', 'store_outer_av', 'prepend_outer_v')
LIBRARY_NAME: ClassVar[str | None] = 'SciPy'

The name of the interfaced library.

OPTIONS_MAP: dict[str, str] = {'max_iter': 'maxiter', 'preconditioner': 'M', 'store_outer_av': 'store_outer_Av'}

The names of the options in GEMSEO mapping to those in the wrapped library.

algo_name: str | None

The name of the algorithm used currently.

descriptions: dict[str, AlgorithmDescription]

The description of the algorithms contained in the library.

internal_algo_name: str | None

The internal name of the algorithm used currently.

It typically corresponds to the name of the algorithm in the wrapped library if any.

methods_map: dict[str, Callable[[ndarray, ndarray, ...], tuple[ndarray, int]]]

The mapping between the solver names and the solvers methods in scipy.sparse.

opt_grammar: JSONGrammar | None

The grammar defining the options of the current algorithm.

problem: Any | None

The problem to be solved.

save_fpath: str

The path to the file to saved the problem when it is not converged and the option save_when_fail is active.