At the beginning, I was just thinking whether PETSc has some similar operations with Matlab like A./B or A.*B. To my understanding, PETSc realizes a parallel operation version of Matlab regarding matrix computations. <br><br>
Thanks,<br>Yujie <br><br><div class="gmail_quote">On Sun, Feb 21, 2010 at 2:54 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@59a2.org">jed@59a2.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Sun, 21 Feb 2010 14:44:55 -0600, Yujie <<a href="mailto:recrusader@gmail.com">recrusader@gmail.com</a>> wrote:<br>
> I need do it for many. Actually, we don't consider a vector. Generally, if A<br>
> is dense matrix (nonzero entries) and B is sparse matrix, MatGetRow()<br>
> doesn't work when doing A.*B or A./B directly, right?<br>
<br>
</div>You can call MatGetRow with all column indices, you have to do something<br>
special about dividing by zero.<br>
<br>
But we're getting caught up in algebraic shenanigans again. What<br>
problem are you trying to solve? Why do you have a dense matrix and why<br>
do you think you need to perform A./B?<br>
<font color="#888888"><br>
Jed<br>
</font></blockquote></div><br>