MatOrderingType — PETSc 3.25.1 documentation

Skip to main content
`Ctrl`+`K`

# MatOrderingType

String with the name of a PETSc matrix ordering. These orderings are most commonly used to reduce fill in sparse factorizations.

## Synopsis

    typedef const char *MatOrderingType;
    #define MATORDERINGNATURAL       "natural"
    #define MATORDERINGND            "nd"
    #define MATORDERING1WD           "1wd"
    #define MATORDERINGRCM           "rcm"
    #define MATORDERINGQMD           "qmd"
    #define MATORDERINGROWLENGTH     "rowlength"
    #define MATORDERINGWBM           "wbm"
    #define MATORDERINGSPECTRAL      "spectral"
    #define MATORDERINGAMD           "amd"           /* only works if UMFPACK is installed with PETSc */
    #define MATORDERINGMETISND       "metisnd"       /* only works if METIS is installed with PETSc */
    #define MATORDERINGNATURAL_OR_ND "natural_or_nd" /* special coase used for Cholesky and ICC, allows ND when AIJ matrix is used but Natural when SBAIJ is used */
    #define MATORDERINGEXTERNAL      "external"      /* uses an ordering type internal to the factorization package */

## Notes

If `MATORDERINGEXTERNAL` is used then PETSc does not compute an ordering and instead the external factorization solver package called utilizes one of its own.

There is no `MatOrdering` object, the ordering is obtained directly from the matrix with `MatGetOrdering()`

## Developer Note

This API should be converted to an API similar to those for `MatColoring` and `MatPartitioning`

## See Also

Matrices, Graph Operations, `MatGetFactor()`, `MatGetOrdering()`, `MatColoringType`, `MatPartitioningType`, `MatCoarsenType`, `PCFactorSetOrderingType()`

## Level

beginner

## Location

include/petscmat.h

## Examples

src/mat/tutorials/ex1.c
src/ksp/ksp/tutorials/ex10.c

Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages