# MatSNESMFSetType

Sets the method that is used to compute the differencing parameter for finite differene matrix-free formulations.

### Synopsis

    #include "petscsnes.h"
    PetscErrorCode PETSCSNES_DLLEXPORT MatSNESMFSetType(Mat mat,const MatSNESMFType ftype)

### Input Parameters

| mat | - the "matrix-free" matrix created via MatCreateSNESMF(), or MatCreateMF() or MatSetType(mat,MATMFFD);
| ftype | - the type requested

### Notes

For example, such routines can compute h for use in Jacobian-vector products of the form

F(x+ha) - F(x) F'(u)a ~= ---------------- h

### See Also

MatCreateSNESMF(), MatSNESMFRegisterDynamic)

Level:advanced
Location:src/snes/mf/snesmfj.c
Index of all SNESMF routines
Table of Contents for all manual pages
Index of all manual pages