Skip to main content
`Ctrl`+`K`

# 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+ha) - F(u)]/h where h = error_relu’a/||a||^2 if |u’a| > umin||a||{1} = error_reluminsign(u’a)*||a||{1}/||a||^2 otherwise where error_rel = square root of relative error in function evaluation umin = minimum iterate parameter

Method taken from [DennisJrS83]

## References

[DennisJrS83]

J. E. Dennis Jr. and Robert B. Schnabel. Numerical Methods for Unconstrained Optimization and Nonlinear Equations. Prentice-Hall, Inc., Englewood Cliffs, NJ, 1983.

## See Also

`MATMFFD`, `MATMFFD_WP`, `MatCreateMFFD()`, `MatCreateSNESMF()`, `MATMFFD_WP`, `MatMFFDDSSetUmin()`

## Level

intermediate

## Location

src/mat/impls/mffd/mffddef.c

## Examples

src/snes/tutorials/ex14.c

Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages