:orphan: # MatOrderingRegister Adds a new sparse matrix ordering to the matrix package. ## Synopsis ``` #include "petscmat.h" PetscErrorCode MatOrderingRegister(const char sname[], PetscErrorCode (*function)(Mat, MatOrderingType, IS *, IS *)) ``` Not Collective ## Input Parameters - ***sname -*** name of ordering (for example `MATORDERINGND`) - ***function -*** function pointer that creates the ordering ## Sample usage ```none MatOrderingRegister("my_order", MyOrder); ``` Then, your partitioner can be chosen with the procedural interface via ```none MatOrderingSetType(part, "my_order) ``` or at runtime via the option ```none -pc_factor_mat_ordering_type my_order ``` ## See Also `MatOrderingRegisterAll()`, `MatGetOrdering()` ## Level developer ## Location src/mat/order/sorder.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/order/sorder.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)