#include "petscmat.h" PetscErrorCode MatReorderForNonzeroDiagonal(Mat mat,PetscReal abstol,IS ris,IS cis)Collective on Mat
mat | - matrix to reorder | |
rmap,cmap | - row and column permutations. Usually obtained from MatGetOrdering(). |
Only works for SeqAIJ matrices
-pc_factor_nonzeros_along_diagonal |
1) Choice of column is made by looking at the non-zero elements in the troublesome row for columns that are not yet included (moving from left to right).
2) If (1) fails we check all the columns to the left of the current row and see if one of them has could be swapped. It can be swapped if its corresponding row has a non-zero in the column it is being swapped with; to make sure the previous nonzero diagonal remains nonzero