On Fri, Feb 10, 2012 at 12:05 AM, Dmitry Karpeev <span dir="ltr"><<a href="mailto:karpeev@mcs.anl.gov">karpeev@mcs.anl.gov</a>></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">
<br><br><div class="gmail_quote"><div><div class="h5">On Fri, Feb 10, 2012 at 12:01 AM, 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 Thu, Feb 9, 2012 at 23:55, 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>In a somewhat related matter, it appears that I cannot duplicate a preallocated MATXXXAIJ until it has been assembled:<div>if my DM implementation keeps a preallocated MATSEQAIJ, which it wants to duplicate on every call to DMGetMatrix,</div>





<div>it would have to put in fake entries before any duplication is possible.</div></div></blockquote></div><br></div><div>Doesn't it already do this (inserting 0)?</div></blockquote></div></div><div>I don't think so.  Preallocating doesn't set any values and seems to leave the matrix marked !assembled.</div>


<div>MatDuplicate for such a matrix will fail.  Assemblying it before setting values (just to force an assembled flag)</div><div>will squeeze out the extra values, won't it?  I think it would just be reasonable to allow to duplicate unassembled</div>


<div>matrices, or, better yet, have a matrix be "assembled" by default until MatSetValues has been called.</div><div>But I'm not sure whether either solution will break something else.</div></div></blockquote>
<div><br></div><div>Actually, preallocating does do this now. I have to change the unstructured code to do it.</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 class="gmail_quote"><span class="HOEnZb"><font color="#888888"><div>

Dmitry. </div></font></span></div><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <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>