<div class="gmail_quote">On Mon, Feb 13, 2012 at 00:42, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@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>An alternative is to make clear vec->ops->destroy after calling it. This seems more robust, so I'm inclined to do it.</div></blockquote><div><br></div><div>I chose this version, let me know if you prefer the more radical variant.</div>
<div><br></div><div><a href="http://petsc.cs.iit.edu/petsc/petsc-dev/rev/1262149b3e20">http://petsc.cs.iit.edu/petsc/petsc-dev/rev/1262149b3e20</a></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>A more radical alternative is to zero the whole vtable. Are there use cases where the user wants to change the type, but still expects some of their own MatOps to not be overwritten when changing the type?</div>
</blockquote></div><br>