petsc-3.9.4 2018-09-11
MatMFFDSetFunctioni
Sets the function for a single component
Synopsis
#include "petscmat.h"
PetscErrorCode MatMFFDSetFunctioni(Mat mat,PetscErrorCode (*funci)(void*,PetscInt,Vec,PetscScalar*))
Logically Collective on Mat
Input Parameters
| mat | - the matrix free matrix created via MatCreateSNESMF()
|
| funci | - the function to use
|
Notes
If you use this you MUST call MatAssemblyBegin()/MatAssemblyEnd() on the matrix free
matrix inside your compute Jacobian routine.
This function is necessary to compute the diagonal of the matrix.
funci must not contain any MPI call as it is called inside a loop on the local portion of the vector.
Keywords
SNES, matrix-free, function
See Also
MatCreateSNESMF(),MatMFFDGetH(), MatMFFDSetHHistory(), MatMFFDResetHHistory(), SNESetFunction(), MatGetDiagonal()
Level
advanced
Location
src/mat/impls/mffd/mffd.c
Implementations
MatMFFDSetFunctioni_MFFD in src/mat/impls/mffd/mffd.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages