From c153e5d86225403025627de3eee8c174c0835ce3 Mon Sep 17 00:00:00 2001 From: Doug Shi-Dong Date: Fri, 5 Jun 2020 00:12:54 -0400 Subject: [PATCH] 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. --- source/lac/trilinos_sparse_matrix.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; } } -- 2.39.5