From 32397c7be16fb56656f1dc2f39c7bedf5778b4de Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Thu, 1 Jun 2017 16:09:03 +0200 Subject: [PATCH] Avoid division by zero. --- source/fe/mapping_q_generic.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/fe/mapping_q_generic.cc b/source/fe/mapping_q_generic.cc index 5338286124..0320705483 100644 --- a/source/fe/mapping_q_generic.cc +++ b/source/fe/mapping_q_generic.cc @@ -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::ExcTransformationFailed())); - } + AssertThrow (discriminant > 0.0, + (typename Mapping::ExcTransformationFailed())); double eta1; double eta2; -- 2.39.5