:orphan: # MatInitializePackage This function initializes everything in the `Mat` package. It is called from `PetscDLLibraryRegister_petscmat()` when using dynamic libraries, and on the first call to `MatCreate()` when using shared or static libraries. ## Synopsis ``` PetscErrorCode MatInitializePackage(void) ``` ## See Also [](ch_matrices), `Mat`, `PetscInitialize()`, `MatFinalizePackage()` ## Level developer ## Location src/mat/interface/dlregismat.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/interface/dlregismat.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)