[petsc-users] Matrix dot product

Matthew Knepley knepley at gmail.com
Sun Sep 10 19:19:18 CDT 2017


On Sun, Sep 10, 2017 at 5:51 PM, David Gross <davegwebb10 at gmail.com> wrote:

> Hello,
> I was wondering if there was a matrix equivalent to the vecDot function
> (Frobenius inner product)? As far as I can tell the closest thing is
> MatNorm with NORM_FROBENIUS, but obviously this is acting on only one
> matrix.
>
> If there is not a built in function, what is the best way to compute this?
> I am working fortran90.
>

We do not have this. However, it would be trivial to add since we have


http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatAXPY.html

since you just replace + with * in our code. You could argue that we should
have written for
a general ring, but C makes this cumbersome. Do you think you could make
the change?

What are you using this for?

  Thanks,

     Matt


> Regards,
> Dave
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

http://www.caam.rice.edu/~mk51/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170910/46031fa7/attachment.html>


More information about the petsc-users mailing list