On Aug 14, 2012, at 5:16 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> On Tue, Aug 14, 2012 at 3:56 PM, Peter Brune <prbrune at gmail.com> wrote:
> 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.
>
> We could also punt with
>
> void *PETSC_NULL_FORCE = &knownlocation;
>
> I like the dogfooding of having TS pass itself as the context to SNES, but
> could be convinced to change my mind.
Ok, but then that context cannot be used for any other purpose because of
the possible conflict. Which means SNEScoloring thing must be changed.
Why not use SNESSetApplicationContext() to get the ts into SNES? Here you
are passing into the jacobian location something more general than the jacobian
context. Do you also pass the ts to the SNESSetFunction() context?
Barry