<div class="gmail_quote">On Wed, Mar 16, 2011 at 00:01, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@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 id=":2yz">When a submatrix set is obtained from an AIJ it could mark the ranges the submatrices, row and column, then when MatSetValues is called in the future on the big matrix it could check what box the values are being put in and any box that has none put in is unchanged. For this to be efficient the submatrices have to be truly submatrices not just logically submatrix.<br>
</div></blockquote><div><br></div><div>[A B; C D]</div><div><br></div><div>Two cases:</div><div><br></div><div>1. If you only modify A, then the columns of B will still be marked unmodified so you know that B has not been changed so the cheap flag works.</div>
<div><br></div><div>2. Modify B and C, now the rows and columns of A and D will both be marked as modified. The cheap flag doesn't work.</div><div><br></div><div><br></div><div>Also, if any of these blocks is a finite element assembly, the user will typically zero the matrix before assembly. (They can avoid it by doing a traversal with MatSetValues(...,zero,INSERT_VALUES), then an assembly, then run over it again with ADD_VALUES, but that's awfully cumbersome.)</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div id=":2yz">
<br>
  But we should muck around on this a bit more before we figure out how we want to handle the propagation of this kind of information efficiently and automatically.</div></blockquote></div><br><div>Agree</div>