From: Denis Davydov Date: Wed, 5 Oct 2016 05:27:56 +0000 (+0200) Subject: add two Asserts in fe_enriched_step-36 unit test X-Git-Tag: v8.5.0-rc1~599^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf23c3f4704170062130e7b51a82dc0fdba16150;p=dealii.git add two Asserts in fe_enriched_step-36 unit test --- diff --git a/tests/fe/fe_enriched_step-36.cc b/tests/fe/fe_enriched_step-36.cc index a22183a967..22702ae43e 100644 --- a/tests/fe/fe_enriched_step-36.cc +++ b/tests/fe/fe_enriched_step-36.cc @@ -77,6 +77,8 @@ template double PotentialFunction::value(const dealii::Point &p, const unsigned int ) const { + Assert (p.square() > 0., + ExcDivideByZero()); return -1.0 / std::sqrt(p.square()); } @@ -114,6 +116,8 @@ public: { Tensor<1,dim> dist = p-origin; const double r = dist.norm(); + Assert (r > 0., + ExcDivideByZero()); dist/=r; return -Z*std::exp(-Z*r)*dist; }