# MatSchurComplementComputeExplicitOperator
Compute the Schur complement matrix explicitly 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode MatSchurComplementComputeExplicitOperator(Mat A, Mat *S)
```
Collective on A


## Input Parameter

- ***M -*** the matrix obtained with `MatCreateSchurComplement()`



## Output Parameter

- ***S -*** the Schur complement matrix



## Notes
This can be expensive, so it is mainly for testing

Use `MatSchurComplementGetPmat()` to get a sparse approximation for the Schur complement suitable for use in building a preconditioner




## See Also
 [](chapter_ksp), `MatCreateSchurComplement()`, `MatSchurComplementUpdate()`, `MatSchurComplementGetPmat()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/utils/schurm/schurm.c.html#MatSchurComplementComputeExplicitOperator">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)  
