diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh index fe8f229d689782703370811e1bb2496185c18695..e2628557a9e590708cbd37a858452acfa434c57a 100644 --- a/dune/tectonic/myblockproblem.hh +++ b/dune/tectonic/myblockproblem.hh @@ -103,8 +103,8 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { VectorType v = projected_v; double const vnorm = v.two_norm(); - if (vnorm == 0) // This can (and needs to be able to) be very small - return 0.0; + if (vnorm <= 0) + return 1.0; v /= vnorm; // Rescale for numerical stability