Extract the diagonal of a PETSc matrix.
Asked by
Lizao (Larry) Li
Let A be a Dolfin or PETSc matrix. Is there a way to implement D=Diag(A) to extract its diagonal which works in parallel and does not resort to numpy?
I know this can be done with the Epetra backend. But I am currently having some trouble with trilinos (compiling and parallel performance). So I want to stick with PETSc.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Johan Hake
- Solved:
- Last query:
- Last reply:
To post a message you must log in.