]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replaced std::fabs with std::abs 1050/head
authorLuca Heltai <luca.heltai@sissa.it>
Sun, 28 Jun 2015 23:39:17 +0000 (01:39 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Sun, 28 Jun 2015 23:39:17 +0000 (01:39 +0200)
include/deal.II/lac/sparse_matrix.templates.h

index c3dc4260cbd6d60310fa19e2bc193694925b338a..d4030662fc840e1afdc13b8d3490aa9ecdcb71a7 100644 (file)
@@ -280,7 +280,7 @@ SparseMatrix<number>::n_actually_nonzero_elements (const double threshold) const
   size_type nnz = 0;
   const size_type nnz_alloc = n_nonzero_elements();
   for (size_type i=0; i<nnz_alloc; ++i)
-    if (std::fabs(val[i]) > threshold)
+    if (std::abs(val[i]) > threshold)
       ++nnz;
   return nnz;
 }
@@ -1919,7 +1919,7 @@ void SparseMatrix<number>::print_pattern (std::ostream &out,
       for (size_type j=0; j<n(); ++j)
         if ((*cols)(i,j) == SparsityPattern::invalid_entry)
           out << '.';
-        else if (std::fabs(val[cols->operator()(i,j)]) > threshold)
+        else if (std::abs(val[cols->operator()(i,j)]) > threshold)
           out << '*';
         else
           out << ':';

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.