<div dir="ltr">Hi<div><br></div><div>As I answered in the last email.</div><div>Actually, I am trying to implement s-step block krylov subspace method. So, I need to expand the Krylov subspace by putting matrix polynomials into another matrix.<br></div><div><br></div><div>Cong Li</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 4, 2015 at 6:50 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Tue, Aug 4, 2015 at 4:09 AM, Cong Li <span dir="ltr"><<a href="mailto:solvercorleone@gmail.com" target="_blank">solvercorleone@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am sorry that I should have explained it more clearly.<div>Actually I want to compute a recurrence.</div><div><br></div><div>Like, I want to firstly compute A*X1=B1, and then calculate A*B1=B2, A*B2=B3 and so on.</div><div>Finally I want to combine all these results into a bigger matrix C=[B1,B2 ...]</div><div><br></div><div>Is there any way to do this efficiently.</div></div></blockquote><div><br></div></span><div>You could use a MatNest, however now this seems like thw wrong way to calculate it. Why</div><div>do you want to put a matrix polynomial into another matrix?</div><div><br></div><div>   Matt</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 4, 2015 at 5:45 PM, Patrick Sanan <span dir="ltr"><<a href="mailto:patrick.sanan@gmail.com" target="_blank">patrick.sanan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Tue, Aug 04, 2015 at 03:42:14PM +0900, Cong Li wrote:<br>
> Thanks for your reply.<br>
><br>
> I have an other question.<br>
> I want to do SPMM several times and combine result matrices into one bigger<br>
> matrix.<br>
> for example<br>
> I firstly calculate AX1=B1, AX2=B2 ...<br>
> then I want to combine B1, B2.. to get a C, where C=[B1,B2...]<br>
><br>
> Could you please suggest a way of how to do this.<br>
</span>This is just linear algebra, nothing to do with PETSc specifically.<br>
A * [X1, X2, ... ] = [AX1, AX2, ...]<br>
<div><div>><br>
> Thanks<br>
><br>
> Cong Li<br>
><br>
> On Tue, Aug 4, 2015 at 3:27 PM, Jed Brown <<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>> wrote:<br>
><br>
> > Cong Li <<a href="mailto:solvercorleone@gmail.com" target="_blank">solvercorleone@gmail.com</a>> writes:<br>
> ><br>
> > > Hello,<br>
> > ><br>
> > > I am a PhD student using PETsc for my research.<br>
> > > I am wondering if there is a way to implement SPMM (Sparse matrix-matrix<br>
> > > multiplication) by using PETSc.<br>
> ><br>
> ><br>
> > <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatMatMult.html" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatMatMult.html</a><br>
> ><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></span></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>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</div>
</font></span></div></div>
</blockquote></div><br></div>