Doubts about SNESMF and matrix-free preconditioners

Matthew Knepley knepley at gmail.com
Tue Nov 18 13:54:34 CST 2008


On Tue, Nov 18, 2008 at 1:22 PM, Rafael Santos Coelho
<rafaelsantoscoelho at gmail.com> wrote:
> Originally, my idea is to implement this preconditioner. As far as I`m
> concerned, there`s no need to form and store any matrices, only the diagonal
> elements of the jacobian like I said. This way, I believe I`d have to stick
> with option #2.
>
> With regard to "The matrix it will receive will be the MFFD that is created
> by -mat_mf.", what matrix is that actually? The one that is created by the
> `MatCreateMFFD` routine?

Yes.

> "Then you would have to extract the KSP and set your matrix-free PC there."
>
> Do the calls to PCSetType and PCShellSetApply plus my own implementation of
> the `MatrixFreePreconditioner` function do that?

SNESGetKSP
KSPGetPC
then your functions

  Matt

> Best regards,
>
> Rafael
-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which
their experiments lead.
-- Norbert Wiener




More information about the petsc-users mailing list