nonlinear_runonce.py

Define the NonlinearRunOnce class.

This is a simple nonlinear solver that just runs the system once.

class openmdao.solvers.nonlinear.nonlinear_runonce.NonLinearRunOnce(*args, **kwargs)[source]

Bases: openmdao.solvers.nonlinear.nonlinear_runonce.NonlinearRunOnce

Deprecated. See NonlinearRunOnce.

SOLVER = 'NL: RUNONCE'
__init__(*args, **kwargs)[source]

Deprecated.

Parameters:
*args : list of object

Positional args.

**kwargs : dict

Named args.

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.

record_iteration(**kwargs)

Record an iteration of the current Solver.

Parameters:
**kwargs : dict

Keyword arguments (used for abs and rel error).

solve()

Run the solver.

Returns:
boolean

Failure flag; True if failed to converge, False is successful.

float

absolute error.

float

relative error.

class openmdao.solvers.nonlinear.nonlinear_runonce.NonlinearRunOnce(**kwargs)[source]

Bases: openmdao.solvers.solver.NonlinearSolver

Simple solver that runs the containing system once.

This is done without iteration or norm calculation.

SOLVER = 'NL: RUNONCE'
__init__(**kwargs)

Initialize all attributes.

Parameters:
**kwargs : dict

options dictionary.

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.

record_iteration(**kwargs)

Record an iteration of the current Solver.

Parameters:
**kwargs : dict

Keyword arguments (used for abs and rel error).

solve()[source]

Run the solver.

Returns:
boolean

Failure flag; True if failed to converge, False is successful.

float

absolute error.

float

relative error.