ln_gauss_seidel.py

OpenMDAO LinearSolver that uses linear Gauss Seidel.

class openmdao.solvers.ln_gauss_seidel.LinearGaussSeidel[source]

Bases: openmdao.solvers.solver_base.LinearSolver

LinearSolver that uses linear Gauss Seidel.

Options:

options[‘atol’] : float(1e-12)

Absolute convergence tolerance.

options[‘iprint’] : int(0)

Set to 0 to disable printing, set to 1 to print the residual to stdout each iteration, set to 2 to print subiteration residuals as well.

options[‘maxiter’] : int(1)

Maximum number of iterations.

options[‘mode’] : str(‘auto’)

Derivative calculation mode, set to ‘fwd’ for forward mode, ‘rev’ for reverse mode, or ‘auto’ to let OpenMDAO determine the best mode.

options[‘rtol’] : float(1e-10)

Absolute convergence tolerance.

setup(group)[source]

Solvers override to define post-setup initiailzation.

Args:

group: `Group`

Group that owns this solver.

solve(rhs_mat, system, mode)[source]

Solves the linear system for the problem in self.system. The full solution vector is returned.

Args:

rhs_mat : dict of ndarray

Dictionary containing one ndarry per top level quantity of interest. Each array contains the right-hand side for the linear solve.

system : System

Parent System object.

mode : string

Derivative mode, can be ‘fwd’ or ‘rev’.

Returns:

dict of ndarray : Solution vectors