# SNESGetUseMatrixFree
indicates if the SNES uses matrix-free finite difference matrix vector products to apply the Jacobian. 
## Synopsis
```
#include "petscsnes.h"  
PetscErrorCode SNESGetUseMatrixFree(SNES snes, PetscBool *mf_operator, PetscBool *mf)
```
Not Collective, but the resulting flags will be the same on all MPI ranks


## Input Parameter

- ***snes -*** `SNES` context



## Output Parameters

- ***mf_operator -*** use matrix-free only for the Amat used by `SNESSetJacobian()`, this means the user provided Pmat will continue to be used
- ***mf -*** use matrix-free for both the Amat and Pmat used by `SNESSetJacobian()`, both the Amat and Pmat set in `SNESSetJacobian()` will be ignored





## See Also
 `SNES`, `SNESSetUseMatrixFree()`, `MatCreateSNESMF()`

## Level
intermediate

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/interface/snes.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)  
