Originally, my idea is to implement <a href="http://www.sciencedirect.com/science?_ob=ArticleURL&amp;_udi=B6TY8-4MS9JN4-C&amp;_user=686358&amp;_rdoc=1&amp;_fmt=&amp;_orig=search&amp;_sort=d&amp;view=c&amp;_acct=C000037498&amp;_version=1&amp;_urlVersion=0&amp;_userid=686358&amp;md5=8ae14f3bace78503c283f15cc0adc533">this preconditioner</a>. 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.<br>
<br>With regard to &quot;The matrix it will receive will be the MFFD that is created by -mat_mf.&quot;, what matrix is that actually? The one that is created by the `MatCreateMFFD` routine?<br><br>&quot;Then you would have to extract the KSP and set your matrix-free PC there.&quot;<br>
<br>Do the calls to PCSetType and PCShellSetApply plus my own implementation of the `MatrixFreePreconditioner` function do that?<br><br>Best regards,<br><br>Rafael<br>