]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix Trilinos::SparseMatrix::clear_row 2nd arg.
authorDoug Shi-Dong <doug.shidong@gmail.com>
Fri, 5 Jun 2020 04:12:54 +0000 (00:12 -0400)
committerDoug Shi-Dong <doug.shidong@gmail.com>
Fri, 5 Jun 2020 04:19:04 +0000 (00:19 -0400)
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

index e4b3d3279e37311498d7ef5361c3e79b6a79f264..da98196c535e3b484e676021688ac62f51a0fa50 100644 (file)
@@ -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;
       }
   }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.