On Tue, Aug 14, 2012 at 4:47 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><div class="gmail_quote">On Tue, Aug 14, 2012 at 3:44 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>You can, but the setter routines interpret NULL as "ignore", i.e.</div>
<div><br></div><div>
if (func) ctx->func = func;</div>
</blockquote></div><br></div></div>Does this make sense to anyone? Can we remove that if?</blockquote></div><br></div><div>Then we would have to revisit lots of locations and get the old value before resetting it. Passing NULL was a convenience.</div>
</blockquote></div><br>Correct; the sheer amount of code using this convention makes it exceedingly painful to fix. It would be much easier to alter our internals. I'm *this* close to fugueing on TS especially and removing all
PetscObjects from ctx arguments internal to PETSc. We can pass the TS around by PetscObjectCompose
using the coarsen/restrict hooks.<br><br>- Peter<br>