linear_system.py

A component that solves a linear system.

class openmdao.components.linear_system.LinearSystem(size)[source]

Bases: openmdao.core.component.Component

A component that solves a linear system Ax=b where A and x are params and x is a state.

Options:

fd_options[‘force_fd’] : bool(False)

Set to True to finite difference this system.

fd_options[‘form’] : str(‘forward’)

Finite difference mode. (forward, backward, central) You can also set to ‘complex_step’ to peform the complex step method if your components support it.

fd_options[‘step_size’] : float(1e-06)

Default finite difference stepsize

fd_options[‘step_type’] : str(‘absolute’)

Set to absolute, relative

apply_linear(params, unknowns, dparams, dunknowns, dresids, mode)[source]

Apply the derivative of state variable with respect to everything.

apply_nonlinear(params, unknowns, resids)[source]

Evaluating residual for given state.

solve_nonlinear(params, unknowns, resids)[source]

Use numpy to solve Ax=b for x.