petsc-3.7.1 2016-05-15
Report Typos and Errors

# MatReorderForNonzeroDiagonal

Changes matrix ordering to remove zeros from diagonal. This may help in the LU factorization to prevent a zero pivot.

### Synopsis

    #include "petscmat.h"
    PetscErrorCode  MatReorderForNonzeroDiagonal(Mat mat,PetscReal abstol,IS ris,IS cis)

Collective on Mat Many br

### Input Parameters

| mat | - matrix to reorder Many br
| rmap,cmap | - row and column permutations. Usually obtained from Many brMatGetOrdering(). Many br

Many br

### Notes

This is not intended as a replacement for pivoting for matrices that Many brhave ``bad'' structure. It is only a stop-gap measure. Should be called Many brafter a call to MatGetOrdering(), this routine changes the column Many brordering defined in cis. Many br

Only works for SeqAIJ matrices Many br

### Options Database Keys (When using KSP)

-pc_factor_nonzeros_along_diagonal - Many brAlgorithm Notes: Many brColumn pivoting is used. Many br

1) Choice of column is made by looking at the Many brnon-zero elements in the troublesome row for columns that are not yet Many brincluded (moving from left to right). Many br

2) If (1) fails we check all the columns to the left of the current row Many brand see if one of them has could be swapped. It can be swapped if Many brits corresponding row has a non-zero in the column it is being Many brswapped with; to make sure the previous nonzero diagonal remains Many brnonzero Many br

Level:intermediate
Location:src/mat/utils/zerodiag.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages