# MATMFFD_DS
algorithm for compute the "h" used in the finite difference matrix-free matrix vector product, `MatMult()`. 
## Options Database Keys

- ***-mat_mffd_umin <umin> -*** see `MatMFFDDSSetUmin()`





## Notes
Requires 2 norms and 1 inner product, but they are computed together
so only one parallel collective operation is needed. See `MATMFFD_WP` for a method
(with `KSPGMRES`) that requires NO collective operations.


## Formula used
F'(u)*a = [F(u+h*a) - F(u)]/h where
h = error_rel*u'a/||a||^2                        if  |u'a| > umin*||a||_{1}
= error_rel*umin*sign(u'a)*||a||_{1}/||a||^2   otherwise
where
error_rel = square root of relative error in function evaluation
umin = minimum iterate parameter


## References

- **** -*** Dennis and Schnabel, "Numerical Methods for Unconstrained Optimization and Nonlinear Equations"



## See Also
 `MATMFFD`, `MATMFFD_WP`, `MatCreateMFFD()`, `MatCreateSNESMF()`, `MATMFFD_WP`, `MatMFFDDSSetUmin()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/mffd/mffddef.c.html#MATMFFD_DS">src/mat/impls/mffd/mffddef.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex14.c.html">src/snes/tutorials/ex14.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/mffd/mffddef.c)


[Index of all Mat routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
