[petsc-users] Speed of MatGetRowSum

Stefano Zampini stefano.zampini at gmail.com
Fri Apr 27 12:01:06 CDT 2018


If it's not specialized, as fast as one matrix vector multiplication (with
all ones)

Il Ven 27 Apr 2018, 19:58 Derek Gaston <friedmud at gmail.com> ha scritto:

> I was wondering about the comment on MatGetRowSum that says:
>
> "This code is slow since it is not currently specialized for different
> formats"
>
> How slow are we talking about here?  Is it actually going to loop over i,j
> from 0 to N on a sparse matrix?
>
> I need to get a vector that represents the "lumped" mass matrix: but I
> would like to get it fairly quickly.  I would just compute the lumped
> matrix directly and then use MatGetDiag - but I actually want both
> (unlumped/consistent and lumped) and MatGetRowSum seemed like the best
> direction.  Willing to take advice though!
>
> Derek
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180427/18cec1ab/attachment.html>


More information about the petsc-users mailing list