From 140db14981889687bae448699ae371ac4d7c8985 Mon Sep 17 00:00:00 2001 From: wolf Date: Tue, 3 Jul 2001 12:15:15 +0000 Subject: [PATCH] Fix many missing std:: which Compaq's cxx wants to have, mostly for two reasons: 1. because it does not inject the math functions sqrt, sin, cos, fabs, ... into global namespace when we write include. 2. because cxx can't do Koenig lookup of functions. git-svn-id: https://svn.dealii.org/trunk@4806 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/source/data_out_base.cc | 40 +++--- deal.II/base/source/function_lib.cc | 182 +++++++++++++-------------- deal.II/base/source/quadrature.cc | 4 +- 3 files changed, 113 insertions(+), 113 deletions(-) diff --git a/deal.II/base/source/data_out_base.cc b/deal.II/base/source/data_out_base.cc index ebab9e0012..925d9feef1 100644 --- a/deal.II/base/source/data_out_base.cc +++ b/deal.II/base/source/data_out_base.cc @@ -102,8 +102,8 @@ void DataOutBase::write_ucd (const typename std::vector > &p // preamble if (flags.write_preamble) { - time_t time1= time (0); - tm *time = localtime(&time1); + std::time_t time1= std::time (0); + std::tm *time = std::localtime(&time1); out << "# This file was generated by the deal.II library." << std::endl << "# Date = " << time->tm_year+1900 << "/" @@ -484,8 +484,8 @@ void DataOutBase::write_gnuplot (const typename std::vector // block this to have local // variables destroyed after // use - const time_t time1= time (0); - const tm *time = localtime(&time1); + const std::time_t time1= std::time (0); + const std::tm *time = std::localtime(&time1); out << "# This file was generated by the deal.II library." << std::endl << "# Date = " << time->tm_year+1900 << "/" @@ -773,8 +773,8 @@ void DataOutBase::write_povray (const typename std::vector > { // block this to have local // variables destroyed after use - const time_t time1= time (0); - const tm *time = localtime(&time1); + const std::time_t time1= std::time (0); + const std::tm *time = std::localtime(&time1); out << "/* This file was generated by the deal.II library." << std::endl << " Date = " << time->tm_year+1900 << "/" @@ -989,11 +989,11 @@ void DataOutBase::write_povray (const typename std::vector > nrml[i*(n_subdivisions+1)+j](1)=h1(2)*h2(0)-h1(0)*h2(2); nrml[i*(n_subdivisions+1)+j](2)=h1(0)*h2(1)-h1(1)*h2(0); - // normalize Vektor - double norm=sqrt( - pow(nrml[i*(n_subdivisions+1)+j](0),2.)+ - pow(nrml[i*(n_subdivisions+1)+j](1),2.)+ - pow(nrml[i*(n_subdivisions+1)+j](2),2.)); + // normalize Vector + double norm=std::sqrt( + std::pow(nrml[i*(n_subdivisions+1)+j](0),2.)+ + std::pow(nrml[i*(n_subdivisions+1)+j](1),2.)+ + std::pow(nrml[i*(n_subdivisions+1)+j](2),2.)); if (nrml[i*(n_subdivisions+1)+j](1)<0) norm*=-1.; @@ -1233,10 +1233,10 @@ void DataOutBase::write_eps (const typename std::vector > &p EpsCell2d eps_cell; //TODO:[?] Unify the various places where PI is defined to a central instance const double pi = 3.141592653589793238462; - const double cx = -cos(pi-flags.azimut_angle * 2*pi / 360.), - cz = -cos(flags.turn_angle * 2*pi / 360.), - sx = sin(pi-flags.azimut_angle * 2*pi / 360.), - sz = sin(flags.turn_angle * 2*pi / 360.); + const double cx = -std::cos(pi-flags.azimut_angle * 2*pi / 360.), + cz = -std::cos(flags.turn_angle * 2*pi / 360.), + sx = std::sin(pi-flags.azimut_angle * 2*pi / 360.), + sz = std::sin(flags.turn_angle * 2*pi / 360.); for (unsigned int vertex=0; vertex<4; ++vertex) { const double x = points[vertex](0), @@ -1358,8 +1358,8 @@ void DataOutBase::write_eps (const typename std::vector > &p // block this to have local // variables destroyed after // use - time_t time1= time (0); - tm *time = localtime(&time1); + std::time_t time1= std::time (0); + std::tm *time = std::localtime(&time1); out << "%!PS-Adobe-2.0 EPSF-1.2" << std::endl << "%%Title: deal.II Output" << std::endl << "%%Creator: the deal.II library" << std::endl @@ -1635,7 +1635,7 @@ void DataOutBase::write_gmv (const typename std::vector > &p // d>spacedim. write zeros instead { const unsigned int n_points - = static_cast(pow (static_cast(n_subdivisions+1), dim)); + = static_cast(std::pow (static_cast(n_subdivisions+1), dim)); for (unsigned int i=0; i > &p // preamble if (true) { - time_t time1= time (0); - tm *time = localtime(&time1); + std::time_t time1= std::time (0); + std::tm *time = std::localtime(&time1); out << "# vtk DataFile Version 3.0" << std::endl << "This file was generated by the deal.II library on " diff --git a/deal.II/base/source/function_lib.cc b/deal.II/base/source/function_lib.cc index 426ec13377..36c52c679a 100644 --- a/deal.II/base/source/function_lib.cc +++ b/deal.II/base/source/function_lib.cc @@ -374,11 +374,11 @@ CosineFunction::value (const Point &p, switch(dim) { case 1: - return cos(M_PI_2*p(0)); + return std::cos(M_PI_2*p(0)); case 2: - return cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)); + return std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)); case 3: - return cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * cos(M_PI_2*p(2)); + return std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::cos(M_PI_2*p(2)); default: Assert(false, ExcNotImplemented()); } @@ -400,13 +400,13 @@ CosineFunction::value_list (const typename std::vector > &points switch(dim) { case 1: - values[i] = cos(M_PI_2*p(0)); + values[i] = std::cos(M_PI_2*p(0)); break; case 2: - values[i] = cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)); + values[i] = std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)); break; case 3: - values[i] = cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * cos(M_PI_2*p(2)); + values[i] = std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::cos(M_PI_2*p(2)); break; default: Assert(false, ExcNotImplemented()); @@ -422,11 +422,11 @@ CosineFunction::laplacian (const Point &p, switch(dim) { case 1: - return -M_PI_2*M_PI_2* cos(M_PI_2*p(0)); + return -M_PI_2*M_PI_2* std::cos(M_PI_2*p(0)); case 2: - return -2*M_PI_2*M_PI_2* cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)); + return -2*M_PI_2*M_PI_2* std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)); case 3: - return -3*M_PI_2*M_PI_2* cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * cos(M_PI_2*p(2)); + return -3*M_PI_2*M_PI_2* std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::cos(M_PI_2*p(2)); default: Assert(false, ExcNotImplemented()); } @@ -448,13 +448,13 @@ CosineFunction::laplacian_list (const typename std::vector > &po switch(dim) { case 1: - values[i] = -M_PI_2*M_PI_2* cos(M_PI_2*p(0)); + values[i] = -M_PI_2*M_PI_2* std::cos(M_PI_2*p(0)); break; case 2: - values[i] = -2*M_PI_2*M_PI_2* cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)); + values[i] = -2*M_PI_2*M_PI_2* std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)); break; case 3: - values[i] = -3*M_PI_2*M_PI_2* cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * cos(M_PI_2*p(2)); + values[i] = -3*M_PI_2*M_PI_2* std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::cos(M_PI_2*p(2)); break; default: Assert(false, ExcNotImplemented()); @@ -471,16 +471,16 @@ CosineFunction::gradient (const Point &p, switch(dim) { case 1: - result[0] = -M_PI_2* sin(M_PI_2*p(0)); + result[0] = -M_PI_2* std::sin(M_PI_2*p(0)); break; case 2: - result[0] = -M_PI_2* sin(M_PI_2*p(0)) * cos(M_PI_2*p(1)); - result[1] = -M_PI_2* cos(M_PI_2*p(0)) * sin(M_PI_2*p(1)); + result[0] = -M_PI_2* std::sin(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)); + result[1] = -M_PI_2* std::cos(M_PI_2*p(0)) * std::sin(M_PI_2*p(1)); break; case 3: - result[0] = -M_PI_2* sin(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * cos(M_PI_2*p(2)); - result[1] = -M_PI_2* cos(M_PI_2*p(0)) * sin(M_PI_2*p(1)) * cos(M_PI_2*p(2)); - result[2] = -M_PI_2* cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * sin(M_PI_2*p(2)); + result[0] = -M_PI_2* std::sin(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::cos(M_PI_2*p(2)); + result[1] = -M_PI_2* std::cos(M_PI_2*p(0)) * std::sin(M_PI_2*p(1)) * std::cos(M_PI_2*p(2)); + result[2] = -M_PI_2* std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::sin(M_PI_2*p(2)); break; default: Assert(false, ExcNotImplemented()); @@ -503,16 +503,16 @@ CosineFunction::gradient_list (const typename std::vector > &poi switch(dim) { case 1: - gradients[i][0] = -M_PI_2* sin(M_PI_2*p(0)); + gradients[i][0] = -M_PI_2* std::sin(M_PI_2*p(0)); break; case 2: - gradients[i][0] = -M_PI_2* sin(M_PI_2*p(0)) * cos(M_PI_2*p(1)); - gradients[i][1] = -M_PI_2* cos(M_PI_2*p(0)) * sin(M_PI_2*p(1)); + gradients[i][0] = -M_PI_2* std::sin(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)); + gradients[i][1] = -M_PI_2* std::cos(M_PI_2*p(0)) * std::sin(M_PI_2*p(1)); break; case 3: - gradients[i][0] = -M_PI_2* sin(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * cos(M_PI_2*p(2)); - gradients[i][1] = -M_PI_2* cos(M_PI_2*p(0)) * sin(M_PI_2*p(1)) * cos(M_PI_2*p(2)); - gradients[i][2] = -M_PI_2* cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * sin(M_PI_2*p(2)); + gradients[i][0] = -M_PI_2* std::sin(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::cos(M_PI_2*p(2)); + gradients[i][1] = -M_PI_2* std::cos(M_PI_2*p(0)) * std::sin(M_PI_2*p(1)) * std::cos(M_PI_2*p(2)); + gradients[i][2] = -M_PI_2* std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::sin(M_PI_2*p(2)); break; default: Assert(false, ExcNotImplemented()); @@ -531,13 +531,13 @@ CosineFunction::hessian (const Point &p, switch(dim) { case 1: - result[0][0] = -pi2* cos(M_PI_2*p(0)); + result[0][0] = -pi2* std::cos(M_PI_2*p(0)); break; case 2: if (true) { - const double coco = -pi2*cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)); - const double sisi = pi2*sin(M_PI_2*p(0)) * sin(M_PI_2*p(1)); + const double coco = -pi2*std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)); + const double sisi = pi2*std::sin(M_PI_2*p(0)) * std::sin(M_PI_2*p(1)); result[0][0] = coco; result[1][1] = coco; result[0][1] = sisi; @@ -547,10 +547,10 @@ CosineFunction::hessian (const Point &p, case 3: if (true) { - const double cococo = -pi2*cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * cos(M_PI_2*p(2)); - const double sisico = pi2*sin(M_PI_2*p(0)) * sin(M_PI_2*p(1)) * cos(M_PI_2*p(2)); - const double sicosi = pi2*sin(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * sin(M_PI_2*p(2)); - const double cosisi = pi2*cos(M_PI_2*p(0)) * sin(M_PI_2*p(1)) * sin(M_PI_2*p(2)); + const double cococo = -pi2*std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::cos(M_PI_2*p(2)); + const double sisico = pi2*std::sin(M_PI_2*p(0)) * std::sin(M_PI_2*p(1)) * std::cos(M_PI_2*p(2)); + const double sicosi = pi2*std::sin(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::sin(M_PI_2*p(2)); + const double cosisi = pi2*std::cos(M_PI_2*p(0)) * std::sin(M_PI_2*p(1)) * std::sin(M_PI_2*p(2)); result[0][0] = cococo; result[1][1] = cococo; @@ -586,13 +586,13 @@ CosineFunction::hessian_list (const typename std::vector > &poin switch(dim) { case 1: - hessians[i][0][0] = -pi2* cos(M_PI_2*p(0)); + hessians[i][0][0] = -pi2* std::cos(M_PI_2*p(0)); break; case 2: if (true) { - const double coco = -pi2*cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)); - const double sisi = pi2*sin(M_PI_2*p(0)) * sin(M_PI_2*p(1)); + const double coco = -pi2*std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)); + const double sisi = pi2*std::sin(M_PI_2*p(0)) * std::sin(M_PI_2*p(1)); hessians[i][0][0] = coco; hessians[i][1][1] = coco; hessians[i][0][1] = sisi; @@ -602,10 +602,10 @@ CosineFunction::hessian_list (const typename std::vector > &poin case 3: if (true) { - const double cococo = -pi2*cos(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * cos(M_PI_2*p(2)); - const double sisico = pi2*sin(M_PI_2*p(0)) * sin(M_PI_2*p(1)) * cos(M_PI_2*p(2)); - const double sicosi = pi2*sin(M_PI_2*p(0)) * cos(M_PI_2*p(1)) * sin(M_PI_2*p(2)); - const double cosisi = pi2*cos(M_PI_2*p(0)) * sin(M_PI_2*p(1)) * sin(M_PI_2*p(2)); + const double cococo = -pi2*std::cos(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::cos(M_PI_2*p(2)); + const double sisico = pi2*std::sin(M_PI_2*p(0)) * std::sin(M_PI_2*p(1)) * std::cos(M_PI_2*p(2)); + const double sicosi = pi2*std::sin(M_PI_2*p(0)) * std::cos(M_PI_2*p(1)) * std::sin(M_PI_2*p(2)); + const double cosisi = pi2*std::cos(M_PI_2*p(0)) * std::sin(M_PI_2*p(1)) * std::sin(M_PI_2*p(2)); hessians[i][0][0] = cococo; hessians[i][1][1] = cococo; @@ -634,11 +634,11 @@ ExpFunction::value (const Point &p, switch(dim) { case 1: - return exp(p(0)); + return std::exp(p(0)); case 2: - return exp(p(0)) * exp(p(1)); + return std::exp(p(0)) * std::exp(p(1)); case 3: - return exp(p(0)) * exp(p(1)) * exp(p(2)); + return std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2)); default: Assert(false, ExcNotImplemented()); } @@ -660,13 +660,13 @@ ExpFunction::value_list (const typename std::vector > &points, switch(dim) { case 1: - values[i] = exp(p(0)); + values[i] = std::exp(p(0)); break; case 2: - values[i] = exp(p(0)) * exp(p(1)); + values[i] = std::exp(p(0)) * std::exp(p(1)); break; case 3: - values[i] = exp(p(0)) * exp(p(1)) * exp(p(2)); + values[i] = std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2)); break; default: Assert(false, ExcNotImplemented()); @@ -682,11 +682,11 @@ ExpFunction::laplacian (const Point &p, switch(dim) { case 1: - return exp(p(0)); + return std::exp(p(0)); case 2: - return 2 * exp(p(0)) * exp(p(1)); + return 2 * std::exp(p(0)) * std::exp(p(1)); case 3: - return 3 * exp(p(0)) * exp(p(1)) * exp(p(2)); + return 3 * std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2)); default: Assert(false, ExcNotImplemented()); } @@ -708,13 +708,13 @@ ExpFunction::laplacian_list (const typename std::vector > &point switch(dim) { case 1: - values[i] = exp(p(0)); + values[i] = std::exp(p(0)); break; case 2: - values[i] = 2 * exp(p(0)) * exp(p(1)); + values[i] = 2 * std::exp(p(0)) * std::exp(p(1)); break; case 3: - values[i] = 3 * exp(p(0)) * exp(p(1)) * exp(p(2)); + values[i] = 3 * std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2)); break; default: Assert(false, ExcNotImplemented()); @@ -731,16 +731,16 @@ ExpFunction::gradient (const Point &p, switch(dim) { case 1: - result[0] = exp(p(0)); + result[0] = std::exp(p(0)); break; case 2: - result[0] = exp(p(0)) * exp(p(1)); - result[1] = exp(p(0)) * exp(p(1)); + result[0] = std::exp(p(0)) * std::exp(p(1)); + result[1] = std::exp(p(0)) * std::exp(p(1)); break; case 3: - result[0] = exp(p(0)) * exp(p(1)) * exp(p(2)); - result[1] = exp(p(0)) * exp(p(1)) * exp(p(2)); - result[2] = exp(p(0)) * exp(p(1)) * exp(p(2)); + result[0] = std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2)); + result[1] = std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2)); + result[2] = std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2)); break; default: Assert(false, ExcNotImplemented()); @@ -763,16 +763,16 @@ ExpFunction::gradient_list (const typename std::vector > &points switch(dim) { case 1: - gradients[i][0] = exp(p(0)); + gradients[i][0] = std::exp(p(0)); break; case 2: - gradients[i][0] = exp(p(0)) * exp(p(1)); - gradients[i][1] = exp(p(0)) * exp(p(1)); + gradients[i][0] = std::exp(p(0)) * std::exp(p(1)); + gradients[i][1] = std::exp(p(0)) * std::exp(p(1)); break; case 3: - gradients[i][0] = exp(p(0)) * exp(p(1)) * exp(p(2)); - gradients[i][1] = exp(p(0)) * exp(p(1)) * exp(p(2)); - gradients[i][2] = exp(p(0)) * exp(p(1)) * exp(p(2)); + gradients[i][0] = std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2)); + gradients[i][1] = std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2)); + gradients[i][2] = std::exp(p(0)) * std::exp(p(1)) * std::exp(p(2)); break; default: Assert(false, ExcNotImplemented()); @@ -793,10 +793,10 @@ LSingularityFunction::value (const Point<2> &p, if ((x>=0) && (y>=0)) return 0.; - double phi = atan2(y,-x)+M_PI; + double phi = std::atan2(y,-x)+M_PI; double r2 = x*x+y*y; - return pow(r2,1./3.) * sin(2./3.*phi); + return std::pow(r2,1./3.) * std::sin(2./3.*phi); } @@ -817,10 +817,10 @@ LSingularityFunction::value_list (const std::vector > &points, values[i] = 0.; else { - double phi = atan2(y,-x)+M_PI; + double phi = std::atan2(y,-x)+M_PI; double r2 = x*x+y*y; - values[i] = pow(r2,1./3.) * sin(2./3.*phi); + values[i] = std::pow(r2,1./3.) * std::sin(2./3.*phi); } } } @@ -853,12 +853,12 @@ LSingularityFunction::gradient (const Point<2> &p, { double x = p(0); double y = p(1); - double phi = atan2(y,-x)+M_PI; - double r43 = pow(x*x+y*y,2./3.); + double phi = std::atan2(y,-x)+M_PI; + double r43 = std::pow(x*x+y*y,2./3.); Tensor<1,2> result; - result[0] = 2./3.*(sin(2./3.*phi)*x + cos(2./3.*phi)*y)/r43; - result[1] = 2./3.*(sin(2./3.*phi)*y - cos(2./3.*phi)*x)/r43; + result[0] = 2./3.*(std::sin(2./3.*phi)*x + std::cos(2./3.*phi)*y)/r43; + result[1] = 2./3.*(std::sin(2./3.*phi)*y - std::cos(2./3.*phi)*x)/r43; return result; } @@ -876,11 +876,11 @@ LSingularityFunction::gradient_list (const std::vector > &points, const Point<2>& p = points[i]; double x = p(0); double y = p(1); - double phi = atan2(y,-x)+M_PI; - double r43 = pow(x*x+y*y,2./3.); + double phi = std::atan2(y,-x)+M_PI; + double r43 = std::pow(x*x+y*y,2./3.); - gradients[i][0] = 2./3.*(sin(2./3.*phi)*x + cos(2./3.*phi)*y)/r43; - gradients[i][1] = 2./3.*(sin(2./3.*phi)*y - cos(2./3.*phi)*x)/r43; + gradients[i][0] = 2./3.*(std::sin(2./3.*phi)*x + std::cos(2./3.*phi)*y)/r43; + gradients[i][1] = 2./3.*(std::sin(2./3.*phi)*y - std::cos(2./3.*phi)*x)/r43; } } @@ -894,10 +894,10 @@ SlitSingularityFunction::value (const Point<2> &p, double x = p(0); double y = p(1); - double phi = atan2(x,y)+M_PI; + double phi = std::atan2(x,y)+M_PI; double r2 = x*x+y*y; - return pow(r2,.25) * sin(.5*phi); + return std::pow(r2,.25) * std::sin(.5*phi); } @@ -914,10 +914,10 @@ SlitSingularityFunction::value_list (const std::vector > &points, double x = points[i](0); double y = points[i](1); - double phi = atan2(x,y)+M_PI; + double phi = std::atan2(x,y)+M_PI; double r2 = x*x+y*y; - values[i] = pow(r2,.25) * sin(.5*phi); + values[i] = std::pow(r2,.25) * std::sin(.5*phi); } } @@ -949,13 +949,13 @@ SlitSingularityFunction::gradient (const Point<2> &p, { double x = p(0); double y = p(1); - double phi = atan2(x,y)+M_PI; - double r64 = pow(x*x+y*y,3./4.); + double phi = std::atan2(x,y)+M_PI; + double r64 = std::pow(x*x+y*y,3./4.); Tensor<1,2> result; - result[0] = 1./2.*(sin(1./2.*phi)*x + cos(1./2.*phi)*y)/r64; - result[1] = 1./2.*(sin(1./2.*phi)*y - cos(1./2.*phi)*x)/r64; + result[0] = 1./2.*(std::sin(1./2.*phi)*x + std::cos(1./2.*phi)*y)/r64; + result[1] = 1./2.*(std::sin(1./2.*phi)*y - std::cos(1./2.*phi)*x)/r64; return result; } @@ -973,11 +973,11 @@ SlitSingularityFunction::gradient_list (const std::vector > &points, const Point<2>& p = points[i]; double x = p(0); double y = p(1); - double phi = atan2(x,y)+M_PI; - double r64 = pow(x*x+y*y,3./4.); + double phi = std::atan2(x,y)+M_PI; + double r64 = std::pow(x*x+y*y,3./4.); - gradients[i][0] = 1./2.*(sin(1./2.*phi)*x + cos(1./2.*phi)*y)/r64; - gradients[i][1] = 1./2.*(sin(1./2.*phi)*y - cos(1./2.*phi)*x)/r64; + gradients[i][0] = 1./2.*(std::sin(1./2.*phi)*x + std::cos(1./2.*phi)*y)/r64; + gradients[i][1] = 1./2.*(std::sin(1./2.*phi)*y - std::cos(1./2.*phi)*x)/r64; } } @@ -996,13 +996,13 @@ JumpFunction::JumpFunction(const Point &direction, angle = 0; break; case 2: - angle = atan2(direction(0),direction(1)); + angle = std::atan2(direction(0),direction(1)); break; case 3: Assert(false, ExcNotImplemented()); } - sine = sin(angle); - cosine = cos(angle); + sine = std::sin(angle); + cosine = std::cos(angle); } @@ -1013,7 +1013,7 @@ JumpFunction::value (const Point &p, const unsigned int) const { double x = steepness*(-cosine*p(0)+sine*p(1)); - return -atan(x); + return -std::atan(x); } @@ -1030,7 +1030,7 @@ JumpFunction::value_list (const typename std::vector > &p, for (unsigned int i=0;i::Quadrature (const typename std::vector > &points) : n_quadrature_points(points.size()), quadrature_points(points), - weights(points.size(), atof("Inf")) + weights(points.size(), std::atof("Inf")) { Assert(weights.size() == points.size(), ExcDimensionMismatch(weights.size(), points.size())); @@ -735,7 +735,7 @@ QIterated<1>::QIterated (const Quadrature<1> &base_quadrature, double sum_of_weights = 0; for (unsigned int i=0; i