# MatCreateSNESMFMore
Creates a matrix-free matrix context for use with a `SNES` solver that uses the More method to compute an optimal h based on the noise of the function.  This matrix can be used as the Jacobian argument for the routine `SNESSetJacobian()`. 
## Synopsis
```
#include "petscsnes.h"   
PetscErrorCode MatCreateSNESMFMore(SNES snes, Vec x, Mat *J)
```

## Input Parameters

- ***snes -*** the `SNES` context
- ***x -*** vector where `SNES` solution is to be stored.



## Output Parameter

- ***J -*** the matrix-free matrix



## Options Database Keys

- ***-snes_mf_err <error_rel> -*** see `MatCreateSNESMF()`
- ***-snes_mf_umin <umin> -*** see `MatCreateSNESMF()`
- ***-snes_mf_compute_err -*** compute the square root or relative error in function
- ***-snes_mf_freq_err <freq> -*** set the frequency to recompute the parameters
- ***-snes_mf_jorge -*** use the method of Jorge More





## Notes
This is an experimental approach, use `MatCreateSNESMF()`.

The matrix-free matrix context merely contains the function pointers
and work space for performing finite difference approximations of
Jacobian-vector products, J(u)*a, via

```none
J(u)*a = [J(u+h*a) - J(u)]/h,
```
```none
where by default
```
```none
h = error_rel*u'a/||a||^2                        if  |u'a| > umin*||a||_{1}
```
```none
= error_rel*umin*sign(u'a)*||a||_{1}/||a||^2   otherwise
```
```none
where
```
```none
error_rel = square root of relative error in
```
```none
function evaluation
```
```none
umin = minimum iterate parameter
```
```none
Alternatively, the differencing parameter, h, can be set using
```
```none
Jorge's nifty new strategy if one specifies the option
```
```none
-snes_mf_jorge
```

The user can set these parameters via `MatMFFDSetFunctionError()`.
See Users-Manual: ch_snes for details

The user should call `MatDestroy()` when finished with the matrix-free
matrix context.


## See Also
 `SNESCreateMF`(), `MatCreateMFFD()`, `MatDestroy()`, `MatMFFDSetFunctionError()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/interface/noise/snesmfj2.c.html#MatCreateSNESMFMore">src/snes/interface/noise/snesmfj2.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/interface/noise/snesmfj2.c)


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