<br><br><div class="gmail_quote">On Fri, Feb 10, 2012 at 4:26 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="gmail_quote">On Fri, Feb 10, 2012 at 16:06, Dmitry Karpeev <span dir="ltr"><<a href="mailto:karpeev@mcs.anl.gov" target="_blank">karpeev@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>I'm not sure I follow. If a matrix has been created, its type has been set and it has been preallocated (e.g., MATMPIAIJ in ksp/ksp/examples/tutorials/ex2), it is not marked as assembled until after MatAssemblyEnd. Does it still make sense to duplicate it? In my opinion, it does.</div>
</blockquote></div><br></div><div>MatDuplicateOption specifies what to copy, but all cases are supposed to provide a correct nonzero pattern.</div></blockquote><div>My question is whether a preallocated matrix should be considered assembled?</div>
<div>Or should MatDuplicate work for unassembled matrices that result from</div><div>MatCreate()</div><div>MatSetType()</div><div>MatSetSizes()</div><div>MatXXXSetPreallocation() or MatSetUpPreallocation()?</div><div>Right now a matrix resulting from this sequence of calls is considered "unassembled".</div>
<div>Maybe that's fine, but MatDuplicate() will refuse to act on such an "unassembled" matrix irrespective of the MatDuplicatedOption passed in, while it seems completely natural to be able to duplicate the built-up sparsity pattern.</div>
<div><br></div><div><br></div><div>Dmitry.</div></div><br>