# MatSNESMFSetReuseBase
Causes the base vector to be used for differencing even if the function provided to `SNESSetFunction()` is not the same as that provided to `MatMFFDSetFunction()`. 
## Synopsis
```
#include "petscsnes.h" 
#include "petscdm.h"   
PetscErrorCode MatSNESMFSetReuseBase(Mat J, PetscBool use)
```
Logically Collective


## Input Parameters

- ***J -*** the `MATMFFD` matrix
- ***use -*** if true always reuse the base vector instead of recomputing f(u) even if the function in the `MATMFFD` is
not `SNESComputeFunction()`



## Note
Care must be taken when using this routine to insure that the function provided to `MatMFFDSetFunction()`, call it F_MF() is compatible with
with that provided to `SNESSetFunction()`, call it F_SNES(). That is, (F_MF(u + h*d) - F_SNES(u))/h has to approximate the derivative


## Developer Note
This was provided for the MOOSE team who desired to have a `SNESSetFunction()` function that could change configurations (similar to variable
switching) to contacts while the function provided to `MatMFFDSetFunction()` cannot. Except for the possibility of changing the configuration
both functions compute the same mathematical function so the differencing makes sense.




## See Also
 `MATMFFD`, `MatMFFDSetFunction()`, `SNESSetFunction()`, `MatCreateSNESMF()`, `MatSNESMFGetReuseBase()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/mf/snesmfj.c.html#MatSNESMFSetReuseBase">src/snes/mf/snesmfj.c</A>


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