From a451c53ac6bdd2b79b60ddefdd9594380671aa01 Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Tue, 22 Dec 2020 08:03:09 +0100 Subject: [PATCH] [MeL] Namespace std before sqrt. --- MeshLib/Elements/LineRule2.cpp | 2 +- MeshLib/MeshQuality/ElementSizeMetric.cpp | 2 +- MeshLib/MeshQuality/RadiusEdgeRatioMetric.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MeshLib/Elements/LineRule2.cpp b/MeshLib/Elements/LineRule2.cpp index 373a8ef4b8b..fbc833b43d5 100644 --- a/MeshLib/Elements/LineRule2.cpp +++ b/MeshLib/Elements/LineRule2.cpp @@ -21,7 +21,7 @@ const unsigned LineRule2::edge_nodes[1][2] = double LineRule2::computeVolume(Node const* const* _nodes) { - return sqrt(MathLib::sqrDist(*_nodes[0], *_nodes[1])); + return std::sqrt(MathLib::sqrDist(*_nodes[0], *_nodes[1])); } bool LineRule2::isPntInElement(Node const* const* nodes, diff --git a/MeshLib/MeshQuality/ElementSizeMetric.cpp b/MeshLib/MeshQuality/ElementSizeMetric.cpp index 245b695b2ba..bfe74e7a89a 100644 --- a/MeshLib/MeshQuality/ElementSizeMetric.cpp +++ b/MeshLib/MeshQuality/ElementSizeMetric.cpp @@ -59,7 +59,7 @@ std::size_t ElementSizeMetric::calc1dQuality() double area(std::numeric_limits<double>::max()); _element_quality_metric[k] = elements[k]->getContent(); if (_element_quality_metric[k] < - sqrt(fabs(std::numeric_limits<double>::epsilon()))) + std::sqrt(fabs(std::numeric_limits<double>::epsilon()))) { error_count++; } diff --git a/MeshLib/MeshQuality/RadiusEdgeRatioMetric.cpp b/MeshLib/MeshQuality/RadiusEdgeRatioMetric.cpp index 3c7b733a5b6..e9c7524d14d 100644 --- a/MeshLib/MeshQuality/RadiusEdgeRatioMetric.cpp +++ b/MeshLib/MeshQuality/RadiusEdgeRatioMetric.cpp @@ -36,7 +36,7 @@ void RadiusEdgeRatioMetric::calculateQuality () std::copy_n(elem.getNodes(), n_nodes, pnts.begin()); GeoLib::MinimalBoundingSphere const s(pnts); auto const& [min, max] = computeSqrEdgeLengthRange(elem); - _element_quality_metric[k] = sqrt(min)/(2*s.getRadius()); + _element_quality_metric[k] = std::sqrt(min) / (2 * s.getRadius()); } } -- GitLab