[petsc-users] Creating a Matrix Using Inner Products of Columns and Rows of Two matrices

Ali Berk Kahraman aliberkkahraman at yahoo.com
Tue Sep 26 17:33:28 CDT 2017


Hello all,

I have to generate a matrix C such that 
,Ck,m=∑pAk,pDp,mC_{k,m}=\sum_{p}A_{k,p}D_{p,m} where A and D are two 
square matrices of the same size. This is simply the inner products of 
rows of A and columns of D. I do not want to use MatGetValues to get 
values form the matrices, then create Vectors with those values and use 
dot product function of petsc, because that would be super non-efficient.

What do you think? How can it be done more efficiently?


Best Regards,


Ali Berk Kahraman

CFD-FMS Research Group, Mech. Eng. Department

Boğaziçi University, Istanbul, Turkey

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170927/fd2e1ccd/attachment.html>


More information about the petsc-users mailing list