linear_solvers_factory module¶
A factory to instantiate linear solvers from their class names.
- class gemseo.algos.linear_solvers.linear_solvers_factory.LinearSolversFactory[source]¶
Bases:
DriverFactory
MDA factory to create the MDA from a name or a class.
Initializes the factory: scans the directories to search for subclasses of DriverLib.
Searches subclasses of driver_lib_class in “GEMSEO_PATH” and driver_package.
- create(name)¶
Create a driver library from an algorithm name or a library name.
- execute(problem, algo_name, **options)[source]¶
Execute the driver.
Find the appropriate library and execute the driver on the problem to solve the linear system LHS.x = RHS.
- Parameters:
problem (LinearProblem) – The linear equations and right hand side (lhs, rhs) that defines the linear problem. XXX is a tuple expected?
algo_name (str) – The algorithm name.
**options (Any) – The options for the algorithm, see associated JSON file.
- Returns:
The solution.
- Return type:
- is_available(solver_name)[source]¶
Check the availability of a LinearSolver.
- Parameters:
solver_name (str) – The name of the LinearSolver.
- Returns:
Whether the
LinearSolver
is available.- Return type:
- property algo_names_to_libraries: dict[str, str]¶
The mapping from the algorithm names to the libraries.