scipy_iter_solver.py

scipy_iter_solver.py

Define the scipy iterative solver class.

class openmdao.solvers.linear.scipy_iter_solver.ScipyKrylov(**kwargs)[source]

Bases: openmdao.solvers.solver.LinearSolver

The Krylov iterative solvers in scipy.sparse.linalg.

Parameters
**kwargs{}

Dictionary of options set by the instantiating class/script.

Attributes
preconSolver

Preconditioner for linear solve. Default is None for no preconditioner.

SOLVER = 'LN: SCIPY'
__init__(**kwargs)[source]

Declare the solver option.

add_recorder(recorder)

Add a recorder to the solver’s RecordingManager.

Parameters
recorder<CaseRecorder>

A recorder instance to be added to RecManager.

cleanup()

Clean up resources prior to exit.

does_recursive_applies()

Return False.

By default, assume linear solvers don’t do recursive apply_linear calls.

Returns
bool

True if solver makes recursive apply_linear calls on its subsystems.

get_reports_dir()

Get the path to the directory where the report files should go.

If it doesn’t exist, it will be created.

Returns
str

The path to the directory where reports should be written.

property msginfo

Return info to prepend to messages.

Returns
str

Info to prepend to messages.

record_iteration(**kwargs)

Record an iteration of the current Solver.

Parameters
**kwargsdict

Keyword arguments (used for abs and rel error).

solve(mode, rel_systems=None)[source]

Run the solver.

Parameters
modestr

‘fwd’ or ‘rev’.

rel_systemsset of str

Names of systems relevant to the current solve.