# MatSchurComplementSetKSP
Sets the `KSP` object that is used to solve with A00 in the Schur complement matrix S = A11 - A10 ksp(A00,Ap00) A01 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode MatSchurComplementSetKSP(Mat S, KSP ksp)
```
Not Collective


## Input Parameters

- ***S   -*** matrix created with `MatCreateSchurComplement()`
- ***ksp -*** the linear solver object





## Developer Note
This is used in `PCFIELDSPLIT` to reuse the 0-split `KSP` to implement ksp(A00,Ap00) in S.
The `KSP` operators are overwritten with A00 and Ap00 currently set in S.


## See Also
 [](chapter_ksp), `Mat`, `MatSchurComplementGetKSP()`, `MatCreateSchurComplement()`, `MatCreateNormal()`, `MatMult()`, `MatCreate()`, `MATSCHURCOMPLEMENT`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/utils/schurm/schurm.c.html#MatSchurComplementSetKSP">src/ksp/ksp/utils/schurm/schurm.c</A>


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


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