On Wed, Mar 16, 2011 at 00:39, Barry Smith <bsmith at mcs.anl.gov> wrote:

> When you "retain ownership" you could also do things like zero the
> setvalues() pointer etc to prevent the user from changing it?


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110316/15e848b4/attachment.html>

Reply via email to