From: wolf Date: Mon, 2 Jul 2001 14:03:15 +0000 (+0000) Subject: Fix various places where Compaq's cxx compiler is overly strict (it doesn't export... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f126c789459c337530897e8fb11b9e4ae3b3eabf;p=dealii-svn.git Fix various places where Compaq's cxx compiler is overly strict (it doesn't export some symbols from std:: into global namespace, even though they come from system headers. git-svn-id: https://svn.dealii.org/trunk@4784 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/exceptions.h b/deal.II/base/include/base/exceptions.h index bbc2dcffaf..32d48f5279 100644 --- a/deal.II/base/include/base/exceptions.h +++ b/deal.II/base/include/base/exceptions.h @@ -403,7 +403,7 @@ void __IssueError_Assert (const char *file, std::cerr << "--------------------------------------------------------" << std::endl; - abort (); + std::abort (); }; @@ -490,7 +490,7 @@ void __IssueError_Throw (const char *file, #define AssertThrow(cond, exc) \ { \ if (!(cond)) \ - abort (); \ + std::abort (); \ } #endif diff --git a/deal.II/base/source/convergence_table.cc b/deal.II/base/source/convergence_table.cc index 775c35bc06..dc1ffb0f25 100644 --- a/deal.II/base/source/convergence_table.cc +++ b/deal.II/base/source/convergence_table.cc @@ -122,7 +122,7 @@ void ConvergenceTable::evaluate_convergence_rates(const std::string &data_column // first row add_value(rate_key, std::string("-")); for (unsigned int i=1; i void -Legendre::compute_coefficients (unsigned int k) +Legendre::compute_coefficients (const unsigned int k_) { + unsigned int k = k_; + // first make sure that no other // thread intercepts the operation // of this function diff --git a/deal.II/base/source/parameter_handler.cc b/deal.II/base/source/parameter_handler.cc index 87a18c8d67..ecb65a158b 100644 --- a/deal.II/base/source/parameter_handler.cc +++ b/deal.II/base/source/parameter_handler.cc @@ -585,7 +585,7 @@ long int ParameterHandler::get_integer (const std::string &entry_string) const { std::string s = get (entry_string); char *endptr; - long int i = strtol (s.c_str(), &endptr, 10); + long int i = std::strtol (s.c_str(), &endptr, 10); // assert there was no error AssertThrow ((s.c_str()!='\0') || (*endptr == '\0'), ExcConversionError(s)); @@ -599,7 +599,7 @@ double ParameterHandler::get_double (const std::string &entry_string) const { std::string s = get (entry_string); char *endptr; - double d = strtod (s.c_str(), &endptr); + double d = std::strtod (s.c_str(), &endptr); // assert there was no error AssertThrow ((s.c_str()!='\0') || (*endptr == '\0'), ExcConversionError(s)); diff --git a/deal.II/base/source/quadrature_lib.cc b/deal.II/base/source/quadrature_lib.cc index 6e5172ea6a..af3b8f3b3b 100644 --- a/deal.II/base/source/quadrature_lib.cc +++ b/deal.II/base/source/quadrature_lib.cc @@ -42,7 +42,7 @@ QGauss<1>::QGauss (unsigned int n) for (unsigned int i=1;i<=m;++i) { - z = cos(M_PI * (i-.25)/(n+.5)); + z = std::cos(M_PI * (i-.25)/(n+.5)); // Newton-iteration do @@ -78,7 +78,7 @@ QGauss2<1>::QGauss2 () : Quadrature<1> (2) { // points on [-1,1] - static const double xpts_normal[] = { -sqrt(1./3.), sqrt(1./3.) }; + static const double xpts_normal[] = { -std::sqrt(1./3.), std::sqrt(1./3.) }; // weights on [-1,1] static const double wts_normal[] = { 1., 1. }; @@ -101,9 +101,9 @@ QGauss3<1>::QGauss3 () : Quadrature<1> (3) { // points on [-1,1] - static const double xpts_normal[] = { -sqrt(3./5.), + static const double xpts_normal[] = { -std::sqrt(3./5.), 0., - sqrt(3./5.) }; + std::sqrt(3./5.) }; // weights on [-1,1] static const double wts_normal[] = { 5./9., 8./9., @@ -130,15 +130,15 @@ QGauss4<1>::QGauss4 () : Quadrature<1> (4) { // points on [-1,1] - static const double xpts_normal[] = { -sqrt(1./7.*(3+4*sqrt(0.3))), - -sqrt(1./7.*(3-4*sqrt(0.3))), - +sqrt(1./7.*(3-4*sqrt(0.3))), - +sqrt(1./7.*(3+4*sqrt(0.3))) }; + static const double xpts_normal[] = { -std::sqrt(1./7.*(3+4*std::sqrt(0.3))), + -std::sqrt(1./7.*(3-4*std::sqrt(0.3))), + +std::sqrt(1./7.*(3-4*std::sqrt(0.3))), + +std::sqrt(1./7.*(3+4*std::sqrt(0.3))) }; // weights on [-1,1] - static const double wts_normal[] = { 1./2. - 1./12.*sqrt(10./3.), - 1./2. + 1./12.*sqrt(10./3.), - 1./2. + 1./12.*sqrt(10./3.), - 1./2. - 1./12.*sqrt(10./3.) }; + static const double wts_normal[] = { 1./2. - 1./12.*std::sqrt(10./3.), + 1./2. + 1./12.*std::sqrt(10./3.), + 1./2. + 1./12.*std::sqrt(10./3.), + 1./2. - 1./12.*std::sqrt(10./3.) }; // points and weights on [0,1] static const double xpts[] = { (xpts_normal[0]+1)/2., @@ -163,17 +163,17 @@ QGauss5<1>::QGauss5 () : Quadrature<1> (5) { // points on [-1,1] - static const double xpts_normal[] = { -sqrt(1./9.*(5.+2*sqrt(10./7.))), - -sqrt(1./9.*(5.-2*sqrt(10./7.))), + static const double xpts_normal[] = { -std::sqrt(1./9.*(5.+2*std::sqrt(10./7.))), + -std::sqrt(1./9.*(5.-2*std::sqrt(10./7.))), 0, - +sqrt(1./9.*(5.-2*sqrt(10./7.))), - +sqrt(1./9.*(5.+2*sqrt(10./7.))) }; + +std::sqrt(1./9.*(5.-2*std::sqrt(10./7.))), + +std::sqrt(1./9.*(5.+2*std::sqrt(10./7.))) }; // weights on [-1,1] - static const double wts_normal[] = { 0.3*(+0.7+5.*sqrt(0.7))/(+2.+5.*sqrt(0.7)), - 0.3*(-0.7+5.*sqrt(0.7))/(-2.+5.*sqrt(0.7)), + static const double wts_normal[] = { 0.3*(+0.7+5.*std::sqrt(0.7))/(+2.+5.*std::sqrt(0.7)), + 0.3*(-0.7+5.*std::sqrt(0.7))/(-2.+5.*std::sqrt(0.7)), 128./225., - 0.3*(-0.7+5.*sqrt(0.7))/(-2.+5.*sqrt(0.7)), - 0.3*(+0.7+5.*sqrt(0.7))/(+2.+5.*sqrt(0.7)) }; + 0.3*(-0.7+5.*std::sqrt(0.7))/(-2.+5.*std::sqrt(0.7)), + 0.3*(+0.7+5.*std::sqrt(0.7))/(+2.+5.*std::sqrt(0.7)) }; // points and weights on [0,1] static const double xpts[] = { (xpts_normal[0]+1)/2., diff --git a/deal.II/base/source/tensor.cc b/deal.II/base/source/tensor.cc index 86efca7a03..af1e614210 100644 --- a/deal.II/base/source/tensor.cc +++ b/deal.II/base/source/tensor.cc @@ -42,8 +42,8 @@ template void Tensor::unroll( Vector& result) const { - Assert(result.size()==pow(dim,rank_), - ExcWrongVectorSize(static_cast(pow(dim,rank_)), + Assert(result.size()==std::pow(static_cast(dim),rank_), + ExcWrongVectorSize(static_cast(std::pow(static_cast(dim),rank_)), result.size())); unsigned index = 0;