linear_runonce.py

Define the LinearRunOnce class.

class openmdao.solvers.linear.linear_runonce.LinearRunOnce(**kwargs)[source]

Bases: openmdao.solvers.linear.linear_block_gs.LinearBlockGS

Simple linear solver that performs a single iteration of Guass-Seidel.

This is done without iteration or norm calculation.

SOLVER = 'LN: 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(vec_names, mode, rel_systems=None)[source]

Run the solver.

Parameters:
vec_names : [str, …]

List of names of the right-hand-side vectors.

mode : str

‘fwd’ or ‘rev’.

rel_systems : set of str

Names of systems relevant to the current solve.

Returns:
float

Initial error.

float

Error at the first iteration.