I am successfully solving a couple (unstructured FEM) benchmark problems with SNES, providing both FormFunction and FormJacobian. I am using a simple (polynomial) form for the nonlinear part so I am fairly sure I compute the Jacobian correctly and exactly. I am also getting the expected results.
Now I want to reproduce the same results without providing the Jacobian, preparing for future real life cases where it will not be known. I am under the impression that Petsc can approximate the Jacobian itself using some sort of secant method. How exactly am I supposed to use it? If I change nothing in the code, just pass -snes_mf_operator to the options, the solver stagnates. The same if I fill the Jacobian with zeros. The same if only with A. What am I supposed to do without the known Jacobian to trigger its approximation? Thanks a lot Dominik
