Gets a reordering for a matrix to reduce fill or to improve numerical stability of LU factorization.
mat - the matrix
type - type of reordering, one of the following
MATORDERINGNATURAL_OR_ND - Nested dissection unless matrix is SBAIJ then it is natural MATORDERINGNATURAL - Natural MATORDERINGND - Nested Dissection MATORDERING1WD - One-way Dissection MATORDERINGRCM - Reverse Cuthill-McKee MATORDERINGQMD - Quotient Minimum Degree MATORDERINGEXTERNAL - Use an ordering internal to the factorzation package and do not compute or use PETSc's
rperm - row permutation indices
cperm - column permutation indices
Options Database Key#
-mat_view_ordering draw - plots matrix nonzero structure in new ordering
-pc_factor_mat_ordering_type <nd,natural,..> - ordering to use with
PCs based on factorization,
This DOES NOT actually reorder the matrix; it merely returns two index sets
that define a reordering. This is usually not used directly, rather use the
The user can define additional orderings; see MatOrderingRegister().
These are generally only implemented for sequential sparse matrices.
Some external packages that PETSc can use for direct factorization such as SuperLU do not accept orderings provided by this call.
MATORDERINGEXTERNAL is used then PETSc does not compute an ordering and utilizes one built into the factorization package