[petsc-dev] [petsc-maint #42811] TSPSEUDO and snes ex27
Jed Brown
jed at 59A2.org
Mon Mar 8 12:55:11 CST 2010
On Mon, 8 Mar 2010 12:28:19 -0600, Barry Smith <bsmith at mcs.anl.gov> wrote:
> The matrix-free finite differencing in SNES uses the MATMFFD. You
> could overwrite the use of the SNES function to use the time-dependent
> one by calling
> MatMFFDSetFunction() "after the fact" (that is to overwrite the
> default one from SNES. Similarly in the case of
> SNESDefaultComputeJacobianColoring() the function
> MatFDColoringSetFunction() could be called to use time-dependent
> function instead of the original. Maybe.
Yes, I thought of this and I think it will work. I need to look again
to refresh my memory on how things are set up with coloring.
> The drawback to this is, of course, "Jacobian" specific code in the
> pseudo transient solver.
Yes.
> BTW: I think the right thing to do is to bag the pseudo transient
> solver support in TS and "somehow" put the support into SNES. If we
> had a model that let us compose SNES solvers, like we have for PCs
> this would be straightforward. So the first step is to fix up the SNES
> model to allow composing them "somehow".
The trouble is that the user interface needs to include transient
information (not necessary in the special ODE case where the transient
term is always just a scaled identity, but definitely needed for DAE
continuations). I think the natural interface for pseudotransient
continuation is TSIFunction/TSIJacobian. It is probably possible to
make that functionality available through SNES (with a layer of
indirection in residuals and assembly), but it seems like it would be a
somewhat special SNES.
Jed
More information about the petsc-dev
mailing list