<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jan 21, 2015 at 2:07 PM, Chung-Kan Huang <span dir="ltr"><<a href="mailto:ckhuangf@gmail.com" target="_blank">ckhuangf@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"><br><div class="gmail_quote">On Wed, Jan 21, 2015 at 2:01 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Wed, Jan 21, 2015 at 1:55 PM, Chung-Kan Huang <span dir="ltr"><<a href="mailto:ckhuangf@gmail.com" target="_blank">ckhuangf@gmail.com</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 21, 2015 at 1:44 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Wed, Jan 21, 2015 at 1:40 PM, Chung-Kan Huang <span dir="ltr"><<a href="mailto:ckhuangf@gmail.com" target="_blank">ckhuangf@gmail.com</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div dir="ltr"><div class="gmail_extra">Then A & AB are not longer the same matrix.  They become complete two individuals aren't they?</div><div class="gmail_extra">If I do whatever to AB after AB is created the A is still the same old A and not going to be affected by the operations I do to AB.</div></div></blockquote><div><br></div></span><div>Yes.</div><span><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div dir="ltr"><div class="gmail_extra"> </div><div class="gmail_extra">What I am really looking for is a way to create two interfaces (one as AIJ and one as BAIJ) but they both refer to the same matrix.</div></div></blockquote><div><br></div></span><div>Why would you ever want this? Why not just using BAIJ?</div></div></div></div></blockquote><div>As I mentioned in the beginning.  There are parts of the code gets benifit when AIJ is used and the other part gets benifit  if BAIJ is used.</div><div> </div><div>For instance,</div><div> </div><div>I'd like to use MatSetValuesBlocked but I also want to use ilu constructed by AIJ instead of BAIJ (our experience found ilu from BAIJ behaves funny sometimes.</div></div></div></div></blockquote><div><br></div></span><div>If the blocks truly are dense, then ILU(0) is identical on both.</div></div></div></div></blockquote><div> </div><div>Unfortunately the life is not that easy.  The blocks are spares and we found ILU(1) works better for our case.</div><div>And besides that is not the only reason I want to have AIJ & BAIJ interfaces, we have some code management issue and I am looking for short cut to unite them.</div><div> </div><div>So go back to the original question the short answer is no way? </div></div></div></div></blockquote><div><br></div><div>Yes, it would not make sense.</div><div><br></div><div>What problem are you using ILU(1) for?</div><div><br></div><div>  Thanks,</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"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Thanks,</div><div> </div><div>Kan</div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>  Matt</div><div><div><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Thanks,</div><div> </div><div>Kan</div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div><div><br></div><div>  Thanks,</div><div><br></div><div>      Matt</div><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div dir="ltr"><div class="gmail_extra">Thanks,</div><div class="gmail_extra"> </div><div class="gmail_extra">Kan<br></div><div class="gmail_quote">On Wed, Jan 21, 2015 at 1:20 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Wed, Jan 21, 2015 at 12:56 PM, Chung-Kan Huang <span dir="ltr"><<a href="mailto:ckhuangf@gmail.com" target="_blank">ckhuangf@gmail.com</a>></span> wrote:<br></span><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div dir="ltr"><div class="gmail_extra">Hi, </div><div class="gmail_extra"> </div><span><div class="gmail_extra">So if I do </div><div class="gmail_extra"> </div><div class="gmail_extra">Mat A, AB;</div><div class="gmail_extra">MatCreateAIJ(comm,m,n,M,N,d_nz, d_nnz,o_nz, o_nnz, &A);</div><div class="gmail_extra">MatConvert(A, MATBAIJ, MAT_INITAL_MATRIX, &AB);</div><div class="gmail_extra">MatSetBlockSize(AB, bs)<br></div><div class="gmail_extra">I can create AB as a BAIJ with block size of bs from A which is a AIJ matrix.</div><div class="gmail_extra"> </div><div class="gmail_extra">So from this point I can use both A and AB and they will mean the same matrix. Am I right?</div></span></div></blockquote><div><br></div><div>Yes</div><span><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div dir="ltr"><div class="gmail_extra">At the end of the program do I only destory one of them or both?</div></div></blockquote><div><br></div></span><div>Both</div><span><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div dir="ltr"><div class="gmail_extra">Do I need to worry about anything in terms of memory penalty?</div></div></blockquote><div><br></div></span><div>It is twice the memory. Its another matrix.</div><div><br></div><div>Did you catch when Jed said you could jsut create the BAIJ up front?</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt</div><span><div> </div><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div dir="ltr"><div class="gmail_extra"> </div><div class="gmail_extra">Thanks,</div><div class="gmail_extra"> </div><div class="gmail_extra">Kan</div><div class="gmail_extra"> </div><div class="gmail_extra"> </div><div class="gmail_quote">On Tue, Jan 20, 2015 at 4:39 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><br>
  You can do a MatConvert() (requires another copy of the matrix) for the parts that benefit from BAIJ.<br>
<span><font color="#888888"><br>
  Barry<br>
</font></span><div><div><br>
> On Jan 20, 2015, at 4:33 PM, Chung-Kan Huang <<a href="mailto:ckhuangf@gmail.com" target="_blank">ckhuangf@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> Does PETSc provide means for conversion between AIJ & BAIJ.<br>
><br>
> My matrix is created as AIJ because it makes life easy for most part of the applications but some part of applications actually get some benefits with BAIJ.  So I wonder if a matrix can exist as two idenfities and I can use either format depend on which one is more convenient at run time.<br>
><br>
> So in my case the block size is fixed and identical for all blocks.<br>
><br>
><br>
> Thanks,<br>
><br>
><br>
> Kan<br>
<br><span><font color="#888888">
</font></span></div></div></blockquote></div><span><font color="#888888"><div class="gmail_extra"><br><br clear="all"><br>-- <br></div><div><p><strong>Cheers</strong></p></div><div class="gmail_extra">
</div></font></span></div>
</blockquote></span></div><span><font color="#888888"><br><br clear="all"><span><font color="#888888"><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></font></span></div></div><span><font color="#888888">
</font></span></blockquote></div><span><font color="#888888"><div class="gmail_extra"><br><br clear="all"><br>-- <br></div><div><p><strong>Cheers</strong></p></div><div class="gmail_extra">
</div></font></span></div>
</blockquote></div></div></div><div><div><br><br clear="all"><span><font color="#888888"><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></div></div><span><font color="#888888">
</font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><br>-- <br><div><p><strong>Cheers</strong></p></div>
</font></span></div></div>
</blockquote></div></div></div><div><div><br><br clear="all"><span class="HOEnZb"><font color="#888888"><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></div></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div><p><strong>Cheers</strong></p></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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>
</div></div>