On Mon, May 10, 2010 at 12:07 PM,  <span dir="ltr">&lt;<a href="mailto:irfan.khan@gatech.edu">irfan.khan@gatech.edu</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Petsc Team,<br>
<br>
When using the subroutine MatMatMult(Mat A,Mat B,PetscReal fill,Mat *C) with option MAT_REUSE_MATRIX, Can the C matrix be any one of A or B?<br></blockquote><div><br></div><div>I do not think that is safe. I believe C needs to be another matrix, but it can be</div>
<div>reused for successive multiplies.</div><div><br></div><div>  Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thank you<br>
Irfan<br>
<br>
----- Original Message -----<br>
From: &quot;Matthew Knepley&quot; &lt;<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>&gt;<br>
To: &quot;PETSc users list&quot; &lt;<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>&gt;<br>
Sent: Friday, May 7, 2010 4:03:42 PM GMT -05:00 US/Canada Eastern<br>
Subject: Re: [petsc-users] Adding MatAij rows<br>
<br>
On Fri, May 7, 2010 at 3:57 PM, &lt; <a href="mailto:irfan.khan@gatech.edu">irfan.khan@gatech.edu</a> &gt; wrote:<br>
<br>
<br>
<br>
<br>
<br>
<br>
Petsc Team,<br>
<br>
Is there a function that can be used to add two rows and put the results into a third row of the same parallel matrix (MPIAIJ)? i.e<br>
<br>
A[k][l] = A[i][l] + A[j][l]<br>
<br>
<br>
<br>
No, since it would entail messing with the nonzero structure. You could easily<br>
use a second matrix to get this effect from subsequent MatMult() calls.<br>
<br>
<br>
Matt<br>
<br>
<br>
<br>
<br>
<br>
Thank you<br>
Irfan<br>
<br>
--<br>
PhD Candidate<br>
G.W. Woodruff School of Mechanical Engineering<br>
Georgia Institute of Technology<br>
Atlanta, GA (30332)<br>
<br>
<br>
<br>
--<br>
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>
<font color="#888888"><br>
<br>
--<br>
PhD Candidate<br>
G.W. Woodruff School of Mechanical Engineering<br>
Georgia Institute of Technology<br>
Atlanta, GA (30332)<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>