]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Never test for equality of floating point numbers
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 27 Oct 2010 02:52:22 +0000 (02:52 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 27 Oct 2010 02:52:22 +0000 (02:52 +0000)
git-svn-id: https://svn.dealii.org/trunk@22514 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/lac/constraint_matrix.h

index eb03db3550276cff3947ed5b23898901a336f15d..96b3296cbfc9bb430bb53bfd2a2785e0d927025b 100644 (file)
@@ -1834,7 +1834,7 @@ ConstraintMatrix::add_entry (const unsigned int line,
        p != line_ptr->entries.end(); ++p)
     if (p->first == column)
       {
-       Assert (p->second == value,
+       Assert (std::fabs(p->second - value) < 1.e-14,
                ExcEntryAlreadyExists(line, column, p->second, value));
        return;
       }

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.