From 4a1bb2dc9e9d315b188d10f3840980e9113f4b65 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Mon, 29 Jun 2015 01:39:17 +0200 Subject: [PATCH] Replaced std::fabs with std::abs --- include/deal.II/lac/sparse_matrix.templates.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/deal.II/lac/sparse_matrix.templates.h b/include/deal.II/lac/sparse_matrix.templates.h index c3dc4260cb..d4030662fc 100644 --- a/include/deal.II/lac/sparse_matrix.templates.h +++ b/include/deal.II/lac/sparse_matrix.templates.h @@ -280,7 +280,7 @@ SparseMatrix::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 threshold) + if (std::abs(val[i]) > threshold) ++nnz; return nnz; } @@ -1919,7 +1919,7 @@ void SparseMatrix::print_pattern (std::ostream &out, for (size_type j=0; joperator()(i,j)]) > threshold) + else if (std::abs(val[cols->operator()(i,j)]) > threshold) out << '*'; else out << ':'; -- 2.39.5