Here, we can find an example of a customized newton solver that is recommended by Nate. The newton solver works quite well after running the example. However, in general, I am not sure how to set the parameters in this customized newton solver as we usually did in the NonlinearVariationalSolver like the following:
I find that to change the precondtioner to hypre_amg, we do can the following:
However, changing to ilu as precondtioner is slightly different (commented out). There has to be a general rule that I can follow but I cannot find the right documentation for this, hence not sure how to properly set all these parameters.
Any ideas are appreciated. Thank you!