:orphan: # MatComputeBandwidth Calculate the full bandwidth of the matrix, meaning the width 2k+1 where k diagonals on either side are sufficient to contain all the matrix nonzeros. ## Synopsis ``` #include "petscmat.h" PetscErrorCode MatComputeBandwidth(Mat A, PetscReal fraction, PetscInt *bw) ``` Collective ## Input Parameters - ***A -*** The `Mat` - ***fraction -*** An optional percentage of the Frobenius norm of the matrix that the bandwidth should enclose ## Output Parameter - ***bw -*** The matrix bandwidth ## See Also `DMPlexCreate()`, `DMPlexSetConeSize()`, `DMPlexSetChart()` ## Level beginner ## Location src/mat/utils/bandwidth.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/utils/bandwidth.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)