]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid using std::fabs
authorDaniel Arndt <arndtd@ornl.gov>
Wed, 15 Sep 2021 17:27:50 +0000 (13:27 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Wed, 15 Sep 2021 17:27:50 +0000 (13:27 -0400)
source/numerics/matrix_tools.cc

index 4aded6ad240a6d538c964d5d0a589b5527d9f247..47c719f160e5c8b767445036a1ff1210dc427522 100644 (file)
@@ -573,7 +573,7 @@ namespace MatrixTools
                     for (unsigned int k = 0; k < n_local_dofs; ++k)
                       if (local_matrix(k, k) != number{})
                         {
-                          average_diagonal += std::fabs(local_matrix(k, k));
+                          average_diagonal += std::abs(local_matrix(k, k));
                           ++nonzero_diagonals;
                         }
                     if (nonzero_diagonals != 0)
@@ -591,7 +591,7 @@ namespace MatrixTools
                 local_matrix(i, i) = average_diagonal;
               }
             else
-              local_matrix(i, i) = std::fabs(local_matrix(i, i));
+              local_matrix(i, i) = std::abs(local_matrix(i, i));
 
             // and replace rhs entry by correct
             // 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.