From: Doug Shi-Dong Date: Fri, 5 Jun 2020 04:12:54 +0000 (-0400) Subject: Fix Trilinos::SparseMatrix::clear_row 2nd arg. X-Git-Tag: v9.3.0-rc1~1396^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c153e5d86225403025627de3eee8c174c0835ce3;p=dealii.git Fix Trilinos::SparseMatrix::clear_row 2nd arg. It was previously never setting the diagonal to 'new_diag_value' unless the original matrix had a diagonal entry of 0.0. --- diff --git a/source/lac/trilinos_sparse_matrix.cc b/source/lac/trilinos_sparse_matrix.cc index e4b3d3279e..da98196c53 100644 --- a/source/lac/trilinos_sparse_matrix.cc +++ b/source/lac/trilinos_sparse_matrix.cc @@ -1146,8 +1146,7 @@ namespace TrilinosWrappers if (diag_index != j || new_diag_value == 0) values[j] = 0.; - if (diag_index != num_entries && std::fabs(values[diag_index]) == 0.0 && - new_diag_value != 0.0) + if (diag_index != num_entries) values[diag_index] = new_diag_value; } }