:orphan: # MatCreateLaplacian Create the matrix Laplacian, with all values in the matrix less than the tolerance set to zero ## Synopsis ``` #include PetscErrorCode MatCreateLaplacian(Mat A, PetscReal tol, PetscBool weighted, Mat *L) ``` ## Input Parameters - ***A -*** The matrix - ***tol -*** The zero tolerance - ***weighted -*** Flag for using edge weights ## Output Parameter - ***L -*** The graph Laplacian matrix ## See Also `MatChop()`, `MatGetGraph()` ## Level intermediate ## Location src/mat/order/spectral.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/order/spectral.c) [Index of all MatOrderings routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)