:orphan:
# MATNEST
"nest" - Matrix type consisting of nested submatrices, each stored separately.
## Notes
This matrix type permits scalable use of `PCFIELDSPLIT` and avoids the large memory costs of extracting submatrices.
It allows the use of symmetric and block formats for parts of multi-physics simulations.
It is usually used with `DMCOMPOSITE` and `DMCreateMatrix()`
Each of the submatrices lives on the same MPI communicator as the original nest matrix (though they can have zero
rows/columns on some processes.) Thus this is not meant for cases where the submatrices live on far fewer processes
than the nest matrix.
## See Also
[](ch_matrices), `Mat`, `MATNEST`, `MatCreate()`, `MatType`, `MatCreateNest()`, `MatNestSetSubMat()`, `MatNestGetSubMat()`,
`VecCreateNest()`, `DMCreateMatrix()`, `DMCOMPOSITE`, `MatNestSetVecType()`, `MatNestGetLocalISs()`,
`MatNestGetISs()`, `MatNestSetSubMats()`, `MatNestGetSubMats()`
## Level
intermediate
## Location
src/mat/impls/nest/matnest.c
## Examples
src/snes/tutorials/ex28.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/nest/matnest.c)
[Index of all Mat routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)