[petsc-users] How to get number of local nonzeros of a matrix?

Jed Brown jedbrown at mcs.anl.gov
Thu Dec 29 14:10:24 CST 2011


On Thu, Dec 29, 2011 at 13:42, Junchao Zhang <junchao.zhang at gmail.com>wrote:

> Manual of MatGetRowIJ says "Returns the compressed row storage i and j
> indices for *sequential *matrices."
> Could I pass MPIAIJ matrix as an argument to it?
>

No, but you can use MatGetRow() to access the rows one at a time. MPIAIJ
matrices are not stored in a way where getting a single pointer makes sense.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111229/e0807632/attachment.htm>


More information about the petsc-users mailing list