finesse.cmatrix.CCSMatrix.declare_equations

CCSMatrix.declare_equations(self, SuiteSparse_long Neqs, SuiteSparse_long index, unicode name, is_diagonal=True, add_view=True)

This defines generally what equations exist in the matrix. It essentially defines the order of the RHS vector for which equations map to what index.

This method decalres a group of Neqs equations at once which form a “block” or submatrix within the matrix itself. This block can be referenced by the unique index provided.

When adding this block of equations a view of the diagonal of the matrix can also be added and returned if required. By default it will.

Parameters
NeqsPy_ssize_t

Number of equations this submatrix represents

indexlong

Subcolumn index

nameunicode

Name used to indentify this coupling in the matrix for debugging

is_diagonalbool, optional

If true, the view created and returned is a diagonal submatrix. If False, the view will be a dense submatrix.

add_viewbool, optional

If True, a submatrix view will be added to the matrix so that the diagonal submatrix for these elements is available for altering the values automatically.

Returns
viewSubCCSMatrixView

If add_view == True, a view of the diagonal submatrix for these elements will be returned.