:orphan: # 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 [](ch_snes), `SNES`, `SNESSetUseMatrixFree()`, `MatCreateSNESMF()` ## Level intermediate ## Location src/snes/interface/snes.c --- [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](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)