[petsc-users] How to get number of local nonzeros of a matrix?
Junchao Zhang
junchao.zhang at gmail.com
Thu Dec 29 13:42:50 CST 2011
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?
On Thu, Dec 29, 2011 at 1:34 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> On Thu, Dec 29, 2011 at 13:32, Matthew Knepley <knepley at gmail.com> wrote:
>
>> We do nto recommend it, but you can use
>> http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MatGetColumnIJ.html
>>
>
> Or, more likely,
>
>
> http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/Mat/MatGetRowIJ.html
>
>
> But the matrices are not actually stored this way, so calling this
> function involves a copy.
>
--
Junchao Zhang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111229/ee1a3fb8/attachment.htm>
More information about the petsc-users
mailing list