linear_block_gs.py

Define the LinearBlockGS class.

class openmdao.solvers.linear.linear_block_gs.LinearBlockGS(**kwargs)[source]

Bases: openmdao.solvers.solver.BlockLinearSolver

Linear block Gauss-Seidel solver.

SOLVER = 'LN: LNBGS'
__init__(**kwargs)

Initialize all attributes.

Parameters:

**kwargs : dict

options dictionary.

add_recorder(recorder)

Add a recorder to the driver’s RecordingManager.

Parameters:

recorder : <BaseRecorder>

A recorder instance to be added to RecManager.

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)

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

Set of names of relevant systems based on the current linear solve.

Returns:

boolean

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

float

initial error.

float

error at the first iteration.