<div class="gmail_quote">On Sat, May 14, 2011 at 22:31, Dmitry Karpeev <span dir="ltr"><<a href="mailto:karpeev@mcs.anl.gov">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 id=":133">Via Vec/MatSetValuesLocal?  I would agree with that.<br>
What I don't like about that is that now there will be two different<br>
ways of treating splits that happen to be nonoverlapping:<br>
via some clever XXXSetValuesLocal and via the nonoverlapping splits<br>
mechanism inside PetscLayout.</div></blockquote></div><br><div>I think MatSetValuesLocal() should be the canonical way to modify "part" of a Mat. For Vec, you can get a local vector to modify with array access or use VecSetValuesLocal() depending on your needs. Top-down addressing requires some amount of global knowledge and it makes information flow in an unnatural way (for code and for performance).</div>