:orphan:
# MatMFFDSetBase
Sets the vector `U` at which matrix vector products of the Jacobian are computed for the `MATMFFD` matrix 
## Synopsis
```
#include "petscmat.h"   
PetscErrorCode MatMFFDSetBase(Mat J, Vec U, Vec F)
```
Logically Collective


## Input Parameters

- ***J -*** the `MATMFFD` matrix
- ***U -*** the vector
- ***F -*** (optional) vector that contains F(u) if it has been already computed





## Notes
This is rarely used directly

If `F` is provided then it is not recomputed. Otherwise the function is evaluated at the base
point during the first `MatMult()` after each call to `MatMFFDSetBase()`.


## See Also
 [](ch_matrices), `Mat`, `MATMFFD`, `MatMult()`, `MatMFFDSetBase()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/mffd/mffd.c.html#MatMFFDSetBase">src/mat/impls/mffd/mffd.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex22.c.html">src/snes/tutorials/ex22.c</A><BR>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/mffd/mffd.c.html#MatMFFDSetBase_MFFD">MatMFFDSetBase_MFFD in src/mat/impls/mffd/mffd.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/mffd/mffd.c)


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