[petsc-users] PETSc : how to get back d_nnz and o_nnz ?

Jed Brown jedbrown at mcs.anl.gov
Tue Jul 2 08:53:24 CDT 2013


HOUSSEN Franck <Franck.Houssen at cea.fr> writes:

> Hello,
>
> From a Mat object (already preallocated with
> MatMPIAIJSetPreallocation), can I get back the d_nnz and o_nnz arrays?

MatMPIAIJGetSeqAIJ(), then MatGetRowIJ().  This returns the offsets
array, so

  nnz[i] = ai[i+1] - ai[i];


Why do you want this low-level information?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130702/1100b565/attachment.pgp>


More information about the petsc-users mailing list