On Sun, Mar 18, 2012 at 6:37 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@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">
<div class="gmail_quote">On Sun, Mar 18, 2012 at 18:24, 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>In the alternate model, you call MatAssemblyBegin/End() when the matrix is marked as unassembled. Its easy to check this flag, so the user</div><div>will not be confused. Barry is correct that the flag reset is not collective, so that query would have to be.</div>
</blockquote><div><br></div><div>We should think as though we are in a world where the query costs as much as the assembly itself because that is a better approximation of reality than the alternatives.</div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div></div></div><div>I do not think "fragile" is an accurate characterization because failure is immediate when trying to use a function that requires assembly, and it</div><div>also obvious what the fix is, to assemble the matrix.</div>
</blockquote><div><br></div><div>It's not collective.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br></div><div>You might mean that the existing model is more intuitive. I disagree since it is currently impossible to do something simple like</div><div>chop out small values from a matrix.</div></blockquote><div>
<br></div><div>MatGetArray()</div></div></blockquote><div><br></div><div>Of course I fucking tried that first. It does not work.</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"><div>Or you actually want to remove them from the nonzero pattern? In that case, you definitely have to assemble, which means there is a new partly-assembled state (locally consistent, but not globally).</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div> The proposal is to augment the current model with MatGetRowWrite(). This would mean</div>
<div>not only adding to the interface, but writing all the code to put values back into the matrix if the row is a copy. I think it is more</div><div>intuitive to allow the user to SetValues() if the nonzero pattern is unchanged and no values need to be communicated.</div>
</blockquote><div><br></div><div>MatSetValues() is a very permissive interface for modifying data in-place.</div></div>
</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>