]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Bugfix: Use std::abs instead of std::fabs.
authorDavid Wells <drwells@vt.edu>
Mon, 28 May 2018 02:33:28 +0000 (22:33 -0400)
committerMatthias Maier <tamiko@43-1.org>
Wed, 6 Jun 2018 15:19:38 +0000 (10:19 -0500)
This has a correct overload for std::complex.

include/deal.II/lac/affine_constraints.h
include/deal.II/lac/affine_constraints.templates.h

index 78b85ebb41d6a95ca78279d3481abf1bd702d7fb..aaf1249c0529ebca5ed947c3ece7dafc72fe6e05 100644 (file)
@@ -1640,7 +1640,7 @@ AffineConstraints<number>::add_entry(const size_type line,
   for (const auto &p : line_ptr->entries)
     if (p.first == column)
       {
-        Assert(std::fabs(p.second - value) < 1.e-14,
+        Assert(std::abs(p.second - value) < 1.e-14,
                ExcEntryAlreadyExists(line, column, p.second, value));
         return;
       }
index 11acb78a35992026a3828c376b2f6c84590152dc..bd0ed4e6d426e77eaf4d313f06197d220c826e95 100644 (file)
@@ -1737,7 +1737,7 @@ AffineConstraints<number>::condense(BlockSparseMatrix<number> &uncondensed,
   number average_diagonal = 0.;
   for (size_type b = 0; b < uncondensed.n_block_rows(); ++b)
     for (size_type i = 0; i < uncondensed.block(b, b).m(); ++i)
-      average_diagonal += std::fabs(uncondensed.block(b, b).diag_element(i));
+      average_diagonal += std::abs(uncondensed.block(b, b).diag_element(i));
   average_diagonal /= uncondensed.m();
 
   const BlockIndices &index_mapping = sparsity.get_column_indices();

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.