[petsc-users] Calculate only the diagonal elements for matrix matrix multiplications

ehsan sadrfaridpour it.sadr at gmail.com
Wed Jun 22 15:41:58 CDT 2016


Now, they are sparse (AIJ) and sequential. But I will upgrade the code to
parallel later.


On Wed, Jun 22, 2016 at 4:34 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
>    Matrix A and B, sparse or dense, parallel or sequential?
>
>
> > On Jun 22, 2016, at 3:27 PM, ehsan sadrfaridpour <it.sadr at gmail.com>
> wrote:
> >
> > Hi,
> > I need the diagonal elements from result of multiplying matrix A, B
> together.
> > I can get by multiplying the 2 matrices and then call MatGetDiagonal.
> > However, I only need the values on the diagonal and the rest of the
> elements are useless for me.
> > As the size of matrices increase, I am afraid it affect the performance.
> >
> > So, I am looking for another method that only calculates the diagonal of
> multiplication and not the rest of elements.
> > If there is not such a method for matrix, how can I use the vector's
> operations to reach the same results?
> >
> >
> > Best,
> > Ehsan
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160622/0fb65ff0/attachment.html>


More information about the petsc-users mailing list