uBLASSparseMatrix¶
-
class
dolfin.cpp.la.uBLASSparseMatrix(*args)¶ Bases:
dolfin.cpp.la.GenericMatrixThis class provides a simple matrix class based on uBLAS. It is a simple wrapper for a uBLAS matrix implementing the GenericMatrix interface.
The interface is intentionally simple. For advanced usage, access the underlying uBLAS matrix and use the standard uBLAS interface which is documented at http://www.boost.org/libs/numeric/ublas/doc/index.htm.
Developer note: specialised member functions must be inlined to avoid link errors.
Overloaded versions
uBLASMatrix()
Create empty matrix
uBLASMatrix(M, N)
Create M x N matrix
uBLASMatrix(A)
Copy constructor
uBLASMatrix(A)
Create matrix from given uBLAS matrix expression
-
assign()¶ Overloaded versions
operator=(A)
Assignment operator
operator=(A)
Assignment operator
-
compress()¶ Compress matrix (eliminate all non-zeros from a sparse matrix)
-
invert()¶ Compute inverse of matrix
-
lump()¶ Lump matrix into vector m
-
mat()¶ Overloaded versions
mat()
Return reference to uBLAS matrix (const version)
mat()
Return reference to uBLAS matrix (non-const version)
-
resize()¶ Resize matrix to M x N
-
solve()¶ Solve Ax = b out-of-place using uBLAS (A is not destroyed)
-
solve_in_place()¶ Solve Ax = b in-place using uBLAS(A is destroyed)
-
thisown¶ The membership flag
-
zero()¶ Overloaded versions
zero()
Set all entries to zero and keep any sparse structure
zero(m, rows)
Set given rows (global row indices) to zero