From: Wolfgang Bangerth Date: Fri, 30 May 2025 23:55:25 +0000 (-0600) Subject: Add std:: qualification to some calls. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F18527%2Fhead;p=dealii.git Add std:: qualification to some calls. --- diff --git a/examples/step-38/step-38.cc b/examples/step-38/step-38.cc index 6ea8f11218..ebf438940c 100644 --- a/examples/step-38/step-38.cc +++ b/examples/step-38/step-38.cc @@ -172,7 +172,7 @@ namespace Step38 double Solution<3>::value(const Point<3> &p, const unsigned int) const { return (std::sin(numbers::PI * p[0]) * std::cos(numbers::PI * p[1]) * - exp(p[2])); + std::exp(p[2])); } @@ -184,9 +184,12 @@ namespace Step38 Tensor<1, 3> return_value; - return_value[0] = PI * cos(PI * p[0]) * cos(PI * p[1]) * exp(p[2]); - return_value[1] = -PI * sin(PI * p[0]) * sin(PI * p[1]) * exp(p[2]); - return_value[2] = sin(PI * p[0]) * cos(PI * p[1]) * exp(p[2]); + return_value[0] = + PI * std::cos(PI * p[0]) * std::cos(PI * p[1]) * std::exp(p[2]); + return_value[1] = + -PI * std::sin(PI * p[0]) * std::sin(PI * p[1]) * std::exp(p[2]); + return_value[2] = + std::sin(PI * p[0]) * std::cos(PI * p[1]) * std::exp(p[2]); return return_value; } @@ -217,23 +220,33 @@ namespace Step38 Tensor<2, 3> hessian; - hessian[0][0] = -PI * PI * sin(PI * p[0]) * cos(PI * p[1]) * exp(p[2]); - hessian[1][1] = -PI * PI * sin(PI * p[0]) * cos(PI * p[1]) * exp(p[2]); - hessian[2][2] = sin(PI * p[0]) * cos(PI * p[1]) * exp(p[2]); + hessian[0][0] = + -PI * PI * std::sin(PI * p[0]) * std::cos(PI * p[1]) * std::exp(p[2]); + hessian[1][1] = + -PI * PI * std::sin(PI * p[0]) * std::cos(PI * p[1]) * std::exp(p[2]); + hessian[2][2] = std::sin(PI * p[0]) * std::cos(PI * p[1]) * std::exp(p[2]); - hessian[0][1] = -PI * PI * cos(PI * p[0]) * sin(PI * p[1]) * exp(p[2]); - hessian[1][0] = -PI * PI * cos(PI * p[0]) * sin(PI * p[1]) * exp(p[2]); + hessian[0][1] = + -PI * PI * std::cos(PI * p[0]) * std::sin(PI * p[1]) * std::exp(p[2]); + hessian[1][0] = + -PI * PI * std::cos(PI * p[0]) * std::sin(PI * p[1]) * std::exp(p[2]); - hessian[0][2] = PI * cos(PI * p[0]) * cos(PI * p[1]) * exp(p[2]); - hessian[2][0] = PI * cos(PI * p[0]) * cos(PI * p[1]) * exp(p[2]); + hessian[0][2] = + PI * std::cos(PI * p[0]) * std::cos(PI * p[1]) * std::exp(p[2]); + hessian[2][0] = + PI * std::cos(PI * p[0]) * std::cos(PI * p[1]) * std::exp(p[2]); - hessian[1][2] = -PI * sin(PI * p[0]) * sin(PI * p[1]) * exp(p[2]); - hessian[2][1] = -PI * sin(PI * p[0]) * sin(PI * p[1]) * exp(p[2]); + hessian[1][2] = + -PI * std::sin(PI * p[0]) * std::sin(PI * p[1]) * std::exp(p[2]); + hessian[2][1] = + -PI * std::sin(PI * p[0]) * std::sin(PI * p[1]) * std::exp(p[2]); Tensor<1, 3> gradient; - gradient[0] = PI * cos(PI * p[0]) * cos(PI * p[1]) * exp(p[2]); - gradient[1] = -PI * sin(PI * p[0]) * sin(PI * p[1]) * exp(p[2]); - gradient[2] = sin(PI * p[0]) * cos(PI * p[1]) * exp(p[2]); + gradient[0] = + PI * std::cos(PI * p[0]) * std::cos(PI * p[1]) * std::exp(p[2]); + gradient[1] = + -PI * std::sin(PI * p[0]) * std::sin(PI * p[1]) * std::exp(p[2]); + gradient[2] = std::sin(PI * p[0]) * std::cos(PI * p[1]) * std::exp(p[2]); Point<3> normal = p; normal /= p.norm(); diff --git a/examples/step-49/step-49.cc b/examples/step-49/step-49.cc index b7fa349d0d..1c9764a3bb 100644 --- a/examples/step-49/step-49.cc +++ b/examples/step-49/step-49.cc @@ -311,7 +311,7 @@ namespace Step49 { double trans(const double y) const { - return std::tanh(2 * y) / tanh(2); + return std::tanh(2 * y) / std::tanh(2); } Point<2> operator()(const Point<2> &in) const