# newton.py¶

Define the NewtonSolver class.

class openmdao.solvers.nonlinear.newton.NewtonSolver(**kwargs)[source]

Bases: openmdao.solvers.solver.NonlinearSolver

Newton solver.

The default linear solver is the linear_solver in the containing system.

Parameters
**kwargsdict

Options dictionary.

Attributes
linear_solverLinearSolver

Linear solver to use to find the Newton search direction. The default is the parent system’s linear solver.

linesearchNonlinearSolver

Line search algorithm. Default is None for no line search.

SOLVER = 'NL: Newton'
__init__(**kwargs)[source]

Initialize all attributes.

Add a recorder to the solver’s RecordingManager.

Parameters
recorder<CaseRecorder>

A recorder instance to be added to RecManager.

cleanup()[source]

Clean up resources prior to exit.

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()

Run the solver.