jacobian.py

Define the base Jacobian class.

class openmdao.jacobians.jacobian.Jacobian(**kwargs)[source]

Bases: object

Base Jacobian class.

This class provides a dictionary interface for sub-Jacobians and performs matrix-vector products when apply_linear is called.

Attributes

options (<OptionsDictionary>) Options dictionary.
__contains__(key)[source]

Return whether there is a subjac for the given promoted or relative name pair.

Parameters:

key : (str, str)

Promoted or relative name pair of sub-Jacobian.

Returns:

boolean

return whether sub-Jacobian has been defined.

__getitem__(key)[source]

Get sub-Jacobian.

Parameters:

key : (str, str)

Promoted or relative name pair of sub-Jacobian.

Returns:

ndarray or spmatrix or list[3]

sub-Jacobian as an array, sparse mtx, or AIJ/IJ list or tuple.

__init__(**kwargs)[source]

Initialize all attributes.

Parameters:

**kwargs : dict

options dictionary.

__setitem__(key, subjac)[source]

Set sub-Jacobian.

Parameters:

key : (str, str)

Promoted or relative name pair of sub-Jacobian.

subjac : int or float or ndarray or sparse matrix

sub-Jacobian as a scalar, vector, array, or AIJ list or tuple.