solver.py¶
Define the base Solver, NonlinearSolver, and LinearSolver classes.

class
openmdao.solvers.solver.
BlockLinearSolver
(**kwargs)[source]¶ Bases:
openmdao.solvers.solver.LinearSolver
A base class for LinearBlockGS and LinearBlockJac.

SOLVER
= 'base_solver'¶

__init__
(self, **kwargs)¶ Initialize all attributes.
 Parameters
 **kwargsdict
options dictionary.

add_recorder
(self, recorder)¶ Add a recorder to the solver’s RecordingManager.
 Parameters
 recorder<CaseRecorder>
A recorder instance to be added to RecManager.

cleanup
(self)¶ Clean up resources prior to exit.

property
msginfo
¶ Return info to prepend to messages.
 Returns
 str
Info to prepend to messages.

record_iteration
(self, **kwargs)¶ Record an iteration of the current Solver.
 Parameters
 **kwargsdict
Keyword arguments (used for abs and rel error).


class
openmdao.solvers.solver.
LinearSolver
(**kwargs)[source]¶ Bases:
openmdao.solvers.solver.Solver
Base class for linear solvers.

SOLVER
= 'base_solver'¶

__init__
(self, **kwargs)[source]¶ Initialize all attributes.
 Parameters
 **kwargsdict
options dictionary.

add_recorder
(self, recorder)[source]¶ Add a recorder to the solver’s RecordingManager.
 Parameters
 recorder<CaseRecorder>
A recorder instance to be added to RecManager.

cleanup
(self)¶ Clean up resources prior to exit.

property
msginfo
¶ Return info to prepend to messages.
 Returns
 str
Info to prepend to messages.

record_iteration
(self, **kwargs)¶ Record an iteration of the current Solver.
 Parameters
 **kwargsdict
Keyword arguments (used for abs and rel error).


class
openmdao.solvers.solver.
NonlinearSolver
(**kwargs)[source]¶ Bases:
openmdao.solvers.solver.Solver
Base class for nonlinear solvers.

SOLVER
= 'base_solver'¶

__init__
(self, **kwargs)[source]¶ Initialize all attributes.
 Parameters
 **kwargsdict
options dictionary.

add_recorder
(self, recorder)¶ Add a recorder to the solver’s RecordingManager.
 Parameters
 recorder<CaseRecorder>
A recorder instance to be added to RecManager.

cleanup
(self)¶ Clean up resources prior to exit.

property
msginfo
¶ Return info to prepend to messages.
 Returns
 str
Info to prepend to messages.

record_iteration
(self, **kwargs)¶ Record an iteration of the current Solver.
 Parameters
 **kwargsdict
Keyword arguments (used for abs and rel error).


class
openmdao.solvers.solver.
Solver
(**kwargs)[source]¶ Bases:
object
Base solver class.
This class is subclassed by NonlinearSolver and LinearSolver, which are in turn subclassed by actual solver implementations.
Attributes
cite
(str) Listing of relevant citations that should be referenced when publishing work that uses this class.
options
(<OptionsDictionary>) Options dictionary.
recording_options
(<OptionsDictionary>) Recording options dictionary.
supports
(<OptionsDictionary>) Options dictionary describing what features are supported by this solver.

SOLVER
= 'base_solver'¶

__init__
(self, **kwargs)[source]¶ Initialize all attributes.
 Parameters
 **kwargsdict of keyword arguments
Keyword arguments that will be mapped into the Solver options.

add_recorder
(self, recorder)[source]¶ Add a recorder to the solver’s RecordingManager.
 Parameters
 recorder<CaseRecorder>
A recorder instance to be added to RecManager.

property
msginfo
¶ Return info to prepend to messages.
 Returns
 str
Info to prepend to messages.


class
openmdao.solvers.solver.
SolverInfo
[source]¶ Bases:
object
Communal object for storing some formatting for solver iprint.
Attributes
prefix
(str) Prefix to prepend during this iprint.
stack
(List) List of strings; strings are popped and appended as needed.

clear
(self)[source]¶ Clear out the iprint stack, in case something is left over from a handled exception.
