assembled_jacobian.py

Define the AssembledJacobian class.

class openmdao.jacobians.assembled_jacobian.AssembledJacobian(matrix_class, system)[source]

Bases: openmdao.jacobians.jacobian.Jacobian

Assemble dense global <Jacobian>.

__contains__(key)

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)

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__(matrix_class, system)[source]

Initialize all attributes.

Parameters:
matrix_class : type

Class to use to create internal matrices.

system : System

Parent system to this jacobian.

__setitem__(key, subjac)

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.

class openmdao.jacobians.assembled_jacobian.COOJacobian(system)[source]

Bases: openmdao.jacobians.assembled_jacobian.AssembledJacobian

Assemble sparse global <Jacobian> in Coordinate list format.

__contains__(key)

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)

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__(system)[source]

Initialize all attributes.

Parameters:
system : System

Parent system to this jacobian.

__setitem__(key, subjac)

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.

class openmdao.jacobians.assembled_jacobian.CSCJacobian(system)[source]

Bases: openmdao.jacobians.assembled_jacobian.AssembledJacobian

Assemble sparse global <Jacobian> in Compressed Col Storage format.

__contains__(key)

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)

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__(system)[source]

Initialize all attributes.

Parameters:
system : System

Parent system to this jacobian.

__setitem__(key, subjac)

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.

class openmdao.jacobians.assembled_jacobian.CSRJacobian(system)[source]

Bases: openmdao.jacobians.assembled_jacobian.AssembledJacobian

Assemble sparse global <Jacobian> in Compressed Row Storage format.

__contains__(key)

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)

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__(system)[source]

Initialize all attributes.

Parameters:
system : System

Parent system to this jacobian.

__setitem__(key, subjac)

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.

class openmdao.jacobians.assembled_jacobian.DenseJacobian(system)[source]

Bases: openmdao.jacobians.assembled_jacobian.AssembledJacobian

Assemble dense global <Jacobian>.

__contains__(key)

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)

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__(system)[source]

Initialize all attributes.

Parameters:
system : System

Parent system to this jacobian.

__setitem__(key, subjac)

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.