[petsc-users] How to choose mat_mffd_err in JFNK

Tang, Qi tangqi at msu.edu
Tue Aug 13 19:27:04 CDT 2019


Hi,
I am using JFNK, inexact Newton and a shell "physics-based" preconditioning to solve some multiphysics problems. I have been playing with mat_mffd_err, and it gives me some results I do not fully understand.

I believe the default value of mat_mffd_err is 10^-8 for double precision, which seem too large for my problems. When I test a problem essentially still in the linear regime, I expect my converged "unpreconditioned resid norm of KSP" should be identical to "SNES Function norm" (Should I?). This is exactly what I found if I could find a good mat_mffd_err, normally between 10^-3 to 10^-5. So when it happens, the whole algorithm works as expected. When those two norms are off, the inexact Newton becomes very inefficient. For instance, it may take many ksp iterations to converge but the snes norm is only reduced slightly.

According to the manual, mat_mffd_err should be "square root of relative error in function evaluation". But is there a simple way to estimate it?

Is there anything else I could possibly tune in this context?

The discretization is through mfem and I use standard H1 for my problem.

Thanks,
Qi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190814/4b8eff5c/attachment.html>


More information about the petsc-users mailing list