[petsc-dev] Revamping the multilevel KSP interface

Jed Brown jedbrown at mcs.anl.gov
Sun Mar 18 18:19:20 CDT 2012


Also, is this a good opportunity to get rid of that ugliness passing Mat*
instead of Mat? Since the KSP (or SNES) is in the callback, can't we make
it so that the occasional user who needs this can call KSPSetOperators() or
SNESSetJacobian() from within the callback? It looks like everywhere in
PETSc except SNESSolve_Test(), SNESComputeJacobian() is called with
snes->jacobian,snes->jacobian_pre.

Or maybe this is going to be fragile enough that we should wait until after
the release?

On Sun, Mar 18, 2012 at 10:14, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> On Sat, Mar 17, 2012 at 22:48, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
>> As I noted before to you I did this to have a similar interface for KSP
>> as SNES so that people could see the pattern and easily "switch up" to SNES
>> from KSP.
>>
>
> Okay, but the DM interface _is_ the SNES interface, that callback just
> doesn't pass the solver context and doesn't pass a state vector at which to
> evaluate the matrix.
>
>
>>
>>  I know you advocate having the user just use SNES if they want this cool
>> "SNES-like" behavior.
>>
>>  Will it kill you to leave this stuff in there? Are you wanting to remove
>> it just for philosophical reasons or is it causing trouble to have it?
>>
>
> My problem is that I don't like the way PCMG is meddling with DM:
>
>       ierr = DMSetFunction(dms[i],0);
>       ierr = DMSetInitialGuess(dms[i],0);
>
> In my model, these pointers will be private to the KSP (they are composed
> with the DM, but the DM doesn't know about them), so I guess the meddling
> won't be as bad.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120318/bd15b2e0/attachment.html>


More information about the petsc-dev mailing list