[petsc-dev] broken TS example related to Jacobian and coloring etc.
Peter Brune
prbrune at gmail.com
Tue Aug 14 17:26:33 CDT 2012
On Tue, 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.
>
I had to swear at it for a while and think of a way of getting it to work
when I was doing the TS DMDA bindings, as you can't just set the TS as the
context when you call DMDATSSetRHSJacobianLocal(DM, ... ) because you have
no idea what the TS (or the appropriate SNES) is at that point. I ended up
having to set it in TSSetUp.
I'm still a bit torn on it, though. I'm not sure that any other solution
will end up looking better.
The MatFDColoring used in SNESComputeJacobianDefaultColor could be assumed
to be attached to something. This could either be the coloring off the DM,
A coloring attached to the matrix itself, or something else. It's not a
big issue for us to remove the coloring argument, as long as the user has
some ability to set a coloring in an appropriate spot.
- Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120814/d8fccee3/attachment.html>
More information about the petsc-dev
mailing list