:orphan:
# MatLMVMSetJ0
Allows the user to define the initial Jacobian matrix from which the LMVM-type approximation is built up. Inverse of this initial Jacobian is applied using an internal `KSP` solver, which defaults to `KSPGMRES`. This internal `KSP` solver has the "mat_lmvm_" option prefix. 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode MatLMVMSetJ0(Mat B, Mat J0)
```
Note that another LMVM-type matrix can be used in place of
J0, in which case updating the outer LMVM-type matrix will
also trigger the update for the inner LMVM-type matrix. This
is useful in cases where a full-memory diagonal approximation
such as `MATLMVMDIAGBRDN` is used in place of J0.


## Input Parameters

- ***B -*** An LMVM-type matrix
- ***J0 -*** The initial Jacobian matrix





## See Also
 [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMSetJ0PC()`, `MatLMVMSetJ0KSP()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/utils/lmvm/lmvmutils.c.html#MatLMVMSetJ0">src/ksp/ksp/utils/lmvm/lmvmutils.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/ksp/utils/lmvm/lmvmutils.c)


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