finesse.cymath.cmatrix.CCSMatrix

Overview

class finesse.cymath.cmatrix.CCSMatrix(name)

Bases: object

Properties

CCSMatrix.indexes

CCSMatrix.name

CCSMatrix.nnz

CCSMatrix.num_equations

Returns the number of equations (rows) in this matrix.

CCSMatrix.num_rhs

Methods

CCSMatrix.__init__(*args, **kwargs)

CCSMatrix.clear_rhs(self, ...)

Zero all elements in the rhs vector corresponding to rhs_index.

CCSMatrix.construct(self, ...)

Constructing the matrix involves taking the metadata submatrix positions throughout the matrix and allocating the memory and building the various CCS matrix structures.

CCSMatrix.declare_equations(self, ...[, ...])

This defines generally what equations exist in the matrix.

CCSMatrix.declare_subdiagonal_view(self, ...)

CCSMatrix.declare_submatrix_view(self, ...)

CCSMatrix.factor(self)

Factors the matrix.

CCSMatrix.get_matrix_elements(self)

Returns the sparse CCS format for the current state of this matrix.

CCSMatrix.get_rhs_view(self, unsigned int index)

Returns a view of the rhs vector corresponding to index.

CCSMatrix.print_matrix(self)

Print a view of the non-zero elements in this matrix.

CCSMatrix.print_rhs(self, ...)

Print a view of the rhs vector corresponding to rhs_index.

CCSMatrix.refactor(self)

Refactors the matrix.

CCSMatrix.set_rhs(self, ...)

Sets the value of the entry at position index of the rhs_index`th right-hand-side vector to `value.

CCSMatrix.solve(self, int transpose=False, ...)

Solves the matrix equation.

CCSMatrix.solve_extra_rhs(self, ...)

Solves the matrix equation for extra right-hand sides.

CCSMatrix.to_scipy_coo(self)

Converts the current matrix to a scipy COO (Coordinate) sparse matrix.

CCSMatrix.to_scipy_csc(self)

Converts the current matrix to a scipy CSC (Compressed Sparse Column) sparse matrix.

CCSMatrix.to_scipy_csr(self)

Converts the current matrix to a scipy CSR (Compressed Sparse Row) sparse matrix.