petscmaster 20200710
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 on Mat
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 MatSNESMF is
not SNESComputeFunction()

Notes
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 Notes
This was provided for the MOOSE team who desired to have a SNESSetFunction() function that could change configurations due
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
MatCreateSNESMF(), MatSNESMFGetReuseBase()
Level
advanced
Location
src/snes/mf/snesmfj.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages