<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 17, 2013 at 4:09 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">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 class="im">Peter Brune <<a href="mailto:prbrune@gmail.com">prbrune@gmail.com</a>> writes:<br>
<br>
> Yeah it was pretty easy to break in TS..  I thought that I might be going<br>
> in circles here.<br>
><br>
><br>
>><br>
>> It's probably worth risking the low-probability of a user depending on<br>
>> the parameter being ignored in exchange for being able to fix this<br>
>> inconvenience in petsc-3.4.<br>
>><br>
><br>
> What exactly do you mean by this?  I can "fix it" for the TS case by<br>
> replacing the error-out on the parameter with a type compare, but for a<br>
> general user context that's not a PetscObject it's more dicey.  We could<br>
> zero it out explicitly when setting snes_fd_coloring from options<br>
<br>
</div>If at all possible, I think it _should_ be zeroed by -snes_fd_coloring.<br>
<div class="im"><br>
> and expect users to do the right thing.<br>
<br>
</div>That was the point of my comment.  We don't think they are in the same<br>
position as -snes_fd_coloring, but all their old code either passed NULL<br>
or passed a valid MatFDColoring or passed NULL, and it's not very useful<br>
to write new code that passes non-NULL.<br>
</blockquote></div><br></div><div class="gmail_extra">The example that caused me to go into this in the first place was snes/examples/tutorials/ex45.c, which a) set the user context, then manually set the Jacobian func to SNESComputeJacobianDefaultColor and b) seems to have disappeared, so I'm on board with this.<br>
<br></div><div class="gmail_extra">- Peter<br></div><div class="gmail_extra"><br></div></div>