coo_matrix.py#

Define the COOmatrix class.

class openmdao.matrices.coo_matrix.COOMatrix(comm, is_internal)[source]

Bases: Matrix

Sparse matrix in Coordinate list format.

Parameters:
commMPI.Comm or <FakeComm>

Communicator of the top-level system that owns the <Jacobian>.

is_internalbool

If True, this is the int_mtx of an AssembledJacobian.

Attributes:
_coocoo_matrix

COO matrix. Used as a basis for conversion to CSC, CSR, Dense in inherited classes.

__init__(comm, is_internal)[source]

Initialize all attributes.

set_complex_step_mode(active)[source]

Turn on or off complex stepping mode.

When turned on, the value in each subjac is cast as complex, and when turned off, they are returned to real values.

Parameters:
activebool

Complex mode flag; set to True prior to commencing complex step.