:orphan: # MATMFFD_WP Implements an approach for computing the differencing parameter h used with the finite difference based matrix-free Jacobian. h = error_rel * sqrt(1 + ||U||) / ||a|| ## Options Database Key - ***-mat_mffd_compute_normu -*** Compute the norm of u every time see `MatMFFDWPSetComputeNormU()` ## Notes || U || does not change between linear iterations so is reused In `KSPGMRES` || a || == 1 and so does not need to ever be computed except at restart when it is recomputed. Thus equires no global collectives when used with `KSPGMRES` ## Formula used F'(u)*a = [F(u+h*a) - F(u)]/h where ## Reference - **** -*** M. Pernice and H. F. Walker, "NITSOL: A Newton Iterative Solver for Nonlinear Systems", SIAM J. Sci. Stat. Comput.", 1998, vol 19, pp. 302--318. ## See Also `MATMFFD`, `MATMFFD_DS`, `MatCreateMFFD()`, `MatCreateSNESMF()`, `MATMFFD_DS` ## Level intermediate ## Location src/mat/impls/mffd/wp.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/mffd/wp.c) [Index of all Mat routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)