]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid division by zero. 4404/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 1 Jun 2017 14:09:03 +0000 (16:09 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 1 Jun 2017 14:13:43 +0000 (16:13 +0200)
source/fe/mapping_q_generic.cc

index 53382861240df084c8eaa3e4eaae47328b6eebd5..0320705483c8e4cb70c9148e235c10072ab63eee 100644 (file)
@@ -107,11 +107,8 @@ namespace internal
         const double discriminant = b*b - 4*a*c;
         // exit if the point is not in the cell (this is the only case where the
         // discriminant is negative)
-        if (discriminant < 0.0)
-          {
-            AssertThrow (false,
-                         (typename Mapping<spacedim,spacedim>::ExcTransformationFailed()));
-          }
+        AssertThrow (discriminant > 0.0,
+                     (typename Mapping<spacedim,spacedim>::ExcTransformationFailed()));
 
         double eta1;
         double eta2;

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.