# MATNEST
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
 `MATNEST`, `MatCreate()`, `MatType`, `MatCreateNest()`, `MatNestSetSubMat()`, `MatNestGetSubMat()`,
`VecCreateNest()`, `DMCreateMatrix()`, `DMCOMPOSITE`, `MatNestSetVecType()`, `MatNestGetLocalISs()`,
`MatNestGetISs()`, `MatNestSetSubMats()`, `MatNestGetSubMats()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/nest/matnest.c.html#MATNEST">src/mat/impls/nest/matnest.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex28.c.html">src/snes/tutorials/ex28.c.html</A><BR>


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
