<div class="gmail_quote">On Wed, Mar 16, 2011 at 00:39, 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;">
When you "retain ownership" you could also do things like zero the setvalues() pointer etc to prevent the user from changing it?</blockquote></div><br><div>You could. Alternatively, there could be MatSetMutable(Mat,PetscBool) that would generate an error on mutation. Then if a user was sure there were no copies, they could change the flag and mutate away. If they were not sure, they could make a copy.</div>