| 9939a2d1 | 09-Feb-2024 |
Barry Smith <bsmith@mcs.anl.gov> |
Fix bugs in MatZeroRowsColumns() both in docs and handling of no-nonzero on diagonal
Bug 1 - documentation The documentation statement "Unlike `MatZeroRows()` this does not change the nonzero struct
Fix bugs in MatZeroRowsColumns() both in docs and handling of no-nonzero on diagonal
Bug 1 - documentation The documentation statement "Unlike `MatZeroRows()` this does not change the nonzero structure of the matrix, it merely zeros those entries in the matrix." appears to be incorrect for matrices missing diagonal entries since new nonzeros are added (to fill in the diagonal). The documentation should really say
"Unlike `MatZeroRows()` this routine cannot remove the zeroed entries from the nonzero structure of the matrix; in other words setting the option `MAT_KEEP_NONZERO_PATTERN to PETSC_FALSE has no effect on this routine.
Bug 2 - The short circuit if (!((Mat_SeqAIJ *)(l->A->data))->keepnonzeropattern) is wrong because that flag is meaningless for this operation. The check should be changed (I think) to nonew instead of keepnonzeropattern.
Reported-by: Jeremy Theler <jeremy.theler-ext@ansys.com>
show more ...
|