diff --git a/dune/xt/grid/intersection.hh b/dune/xt/grid/intersection.hh index 0a5f423adbd2d436679ff3d2c201f11296e9ea26..ec8a7a4b1204eed367b32fe60fde29031365ac90 100644 --- a/dune/xt/grid/intersection.hh +++ b/dune/xt/grid/intersection.hh @@ -85,10 +85,9 @@ double diameter(const Intersection<G, I>& intersection) * Returns true, if global_point and intersection coincide. */ template <class G, class I, class D> -typename std::enable_if<G::dimension == 1, bool>::type -contains(const Dune::Intersection<G, I>& intersection, - const Dune::FieldVector<D, 1>& global_point, - const D& tolerance = Common::FloatCmp::DefaultEpsilon<D>::value()) +bool contains(const Dune::Intersection<G, I>& intersection, + const Dune::FieldVector<D, 1>& global_point, + const D& tolerance = Common::FloatCmp::DefaultEpsilon<D>::value()) { return Common::FloatCmp::eq(intersection.geometry().center(), global_point, tolerance); } @@ -100,10 +99,9 @@ contains(const Dune::Intersection<G, I>& intersection, * Returns true if global_point lies on the line between the corners of intersection. */ template <class G, class I, class D> -typename std::enable_if<G::dimension == 2, bool>::type -contains(const Dune::Intersection<G, I>& intersection, - const Dune::FieldVector<D, 2>& global_point, - const D& tolerance = Common::FloatCmp::DefaultEpsilon<D>::value()) +bool contains(const Dune::Intersection<G, I>& intersection, + const Dune::FieldVector<D, 2>& global_point, + const D& tolerance = Common::FloatCmp::DefaultEpsilon<D>::value()) { const auto& geometry = intersection.geometry(); // get the global coordinates of the intersections corners @@ -139,10 +137,9 @@ contains(const Dune::Intersection<G, I>& intersection, * http://math.stackexchange.com/questions/684141/check-if-a-point-is-on-a-plane-minimize-the-use-of-multiplications-and-divisio */ template <class G, class I, class D> -typename std::enable_if<G::dimension == 3, bool>::type -contains(const Dune::Intersection<G, I>& intersection, - const Dune::FieldVector<D, 3>& global_point, - const D& tolerance = Common::FloatCmp::DefaultEpsilon<D>::value()) +bool contains(const Dune::Intersection<G, I>& intersection, + const Dune::FieldVector<D, 3>& global_point, + const D& tolerance = Common::FloatCmp::DefaultEpsilon<D>::value()) { const auto& geometry = intersection.geometry(); // get the global coordinates of the intersections corners, there should be at least 3 (ignore the fourth if there is