SNESSetMatrixFreeParameters

Sets the parameters for the approximation of matrix-vector products using finite differences.

Synopsis

int SNESSetMatrixFreeParameters(SNES snes,double error,double umin)
Collective on SNES

Input Parameters

snes - the SNES context
error_rel - relative error (should be set to the square root of the relative error in the function evaluations)
umin - minimum allowable u-value

Notes

The default matrix-free matrix-vector product routine computes
     J(u)*a = [J(u+h*a) - J(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   else

Options Database Keys

-snes_mf_err <error_rel> - Sets error_rel
-snes_mf_unim <umin> - Sets umin

Keywords

SNES, matrix-free, parameters

See Also

SNESDefaultMatrixFreeMatCreate()

Location: src/snes/interface/snesmfj.c
SNES Index
Table of Contents