# MatFactorGetSchurComplement
Gets access to a Schur complement matrix using the current Schur data within a factored matrix 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatFactorGetSchurComplement(Mat F, Mat *S, MatFactorSchurStatus *status)
```
Logically Collective


## Input Parameters

- ***F -*** the factored matrix obtained by calling `MatGetFactor()`
- ****S -*** location where to return the Schur complement, can be `NULL`
- ***status -*** the status of the Schur complement matrix, can be `NULL`





## Notes
You must call `MatFactorSetSchurIS()` before calling this routine.

Schur complement mode is currently implemented for sequential matrices with factor type of `MATSOLVERMUMPS`

The routine returns a the Schur Complement stored within the data structures of the solver.

If `MatFactorInvertSchurComplement()` has previously been called, the returned matrix is actually the inverse of the Schur complement.

The returned matrix should not be destroyed; the caller should call `MatFactorRestoreSchurComplement()` when the object is no longer needed.

Use `MatFactorCreateSchurComplement()` to create a copy of the Schur complement matrix that is within a factored matrix

See `MatCreateSchurComplement()` or `MatGetSchurComplement()` for ways to create virtual or approximate Schur complements.


## See Also
 `Mat`, `MatGetFactor()`, `MatFactorSetSchurIS()`, `MatFactorRestoreSchurComplement()`, `MatFactorCreateSchurComplement()`, `MatFactorSchurStatus`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/interface/matrix.c.html#MatFactorGetSchurComplement">src/mat/interface/matrix.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/interface/matrix.c)


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