Note
The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.
Parent class(es)
This class provides a simple matrix class based on PETSc. It is a wrapper for a PETSc matrix pointer (Mat) implementing the GenericMatrix interface.
The interface is intentionally simple. For advanced usage, access the PETSc Mat pointer using the function mat() and use the standard PETSc interface.
Create empty matrix
Create a wrapper around a PETSc Mat pointer
Copy constructor
Initialize zero tensor using tensor layout
Return true if empty
Return size of given dimension
Return local ownership range
Return number of non-zero entries in matrix (collective)
Set all entries to zero and keep any sparse structure
Finalize assembly of tensor. The following values are recognized for the mode parameter:
add - corresponds to PETSc MatAssemblyBegin+End(MAT_FINAL_ASSEMBLY) insert - corresponds to PETSc MatAssemblyBegin+End(MAT_FINAL_ASSEMBLY) flush - corresponds to PETSc MatAssemblyBegin+End(MAT_FLUSH_ASSEMBLY)
Return MPI communicator
Return informal string representation (pretty-print)
Return copy of matrix
Initialize vector z to be compatible with the matrix-vector product y = Ax. In the parallel case, both size and layout are important.
Get block of values
Set block of values using global indices
Set block of values using local indices
Add block of values using global indices
Add block of values using local indices
Add multiple of given matrix (AXPY operation)
Return norm of matrix
Get non-zero values of given row
Set values for given row
Set given rows (global row indices) to zero
Set given rows (local row indices) to zero
Set given rows (global row indices) to identity matrix
Set given rows (local row indices) to identity matrix
Get diagonal of a matrix
Set diagonal of a matrix
Multiply matrix by given number
Divide matrix by given number
Assignment operator
Test if matrix is symmetric
Return linear algebra backend factory
Sets the prefix used by PETSc when searching the options database
Returns the prefix used by PETSc when searching the options database
Assignment operator
Attach nullspace to matrix
Dump matrix to PETSc binary format