Bases: dolfin.cpp.la.GenericTensor, dolfin.cpp.la.GenericLinearOperator
This class defines a common interface for matrices.
Overloaded versions
add(block, num_rows, rows)
Add block of values using global indices
add(block, rows)
Add block of values using global indices
add(block, m, rows, n, cols)
Add block of values using global indices
Overloaded versions
add_local(block, num_rows, rows)
Add block of values using local indices
add_local(block, rows)
Add block of values using local indices
add_local(block, m, rows, n, cols)
Add block of values using local indices
Return a numpy array representation of Matrix
Assignment operator
Add multiple of given matrix (AXPY operation)
Return copy of matrix
Overloaded versions
get(block, num_rows, rows)
Get block of values
get(block, m, rows, n, cols)
Get block of values
Get diagonal of a matrix
Get non-zero values of given row (global index) on local process
Set given rows (global row indices) to identity matrix
Set given rows (local row indices) to identity matrix
Insert one on the diagonal for all zero rows
Initialize vector z to be compatible with the matrix-vector product y = Ax. In the parallel case, both size and layout are important.
Test if matrix is symmetric
Return number of non-zero entries in matrix (collective)
Return norm of matrix
Overloaded versions
set(block, num_rows, rows)
Set block of values using global indices
set(block, m, rows, n, cols)
Set block of values using global indices
Set diagonal of a matrix
Overloaded versions
set_local(block, num_rows, rows)
Set block of values using local indices
set_local(block, m, rows, n, cols)
Set block of values using local indices
Set values for given row (global index) on local process
The membership flag
Matrix-vector product, y = A^T x. The y vector must either be zero-sized or have correct size and parallel layout.
Overloaded versions
zero()
Set all entries to zero and keep any sparse structure
zero(m, rows)
Set given rows (global row indices) to zero
Set given rows (local row indices) to zero