<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hello all,</p>
<p>I have to generate a matrix C such that ,<math
xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>C</mi><mrow><mi>k</mi><mo>,</mo><mi>m</mi></mrow></msub><mo>=</mo><munder><mo>∑</mo><mi>p</mi></munder><msub><mi>A</mi><mrow><mi>k</mi><mo>,</mo><mi>p</mi></mrow></msub><msub><mi>D</mi><mrow><mi>p</mi><mo>,</mo><mi>m</mi></mrow></msub></mrow><annotation
encoding="TeX">C_{k,m}=\sum_{p}A_{k,p}D_{p,m}</annotation></semantics></math>
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. <br>
</p>
<p>What do you think? How can it be done more efficiently?</p>
<p><br>
</p>
<p>Best Regards,</p>
<p><br>
</p>
<p>Ali Berk Kahraman</p>
<p>CFD-FMS Research Group, Mech. Eng. Department<br>
</p>
<p>Boğaziçi University, Istanbul, Turkey<br>
</p>
</body>
</html>