:orphan: # SNESComputeMFFunction Calls the function that has been set with `SNESSetMFFunction()`. ## Synopsis ``` #include "petscsnes.h" PetscErrorCode SNESComputeMFFunction(SNES snes, Vec x, Vec y) ``` Collective ## Input Parameters - ***snes -*** the `SNES` context - ***x -*** input vector ## Output Parameter - ***y -*** function vector, as set by `SNESSetMFFunction()` ## Notes `SNESComputeMFFunction()` is used within the matrix vector products called by the matrix created with `MatCreateSNESMF()` so users would not generally call this routine themselves. Since this function is intended for use with finite differencing it does not subtract the right hand side vector provided with `SNESSolve()` while `SNESComputeFunction()` does. As such, this routine cannot be used with `MatMFFDSetBase()` with a provided F function value even if it applies the same function as `SNESComputeFunction()` if a `SNESSolve()` right hand side vector is use because the two functions difference would include this right hand side function. ## See Also [](ch_snes), `SNES`, `SNESSetFunction()`, `SNESGetFunction()`, `SNESComputeFunction()`, `MatCreateSNESMF` ## Level developer ## 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)