From: wolf Date: Tue, 3 Jul 2001 09:29:20 +0000 (+0000) Subject: Fix many missing std:: which Compaq's cxx wants to have, mostly for two reasons:... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0aea085826f517064dedc01ac4feb169d0fbf1c;p=dealii-svn.git 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@4802 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/dofs/dof_handler.cc b/deal.II/deal.II/source/dofs/dof_handler.cc index 04c6ddf248..a66760356a 100644 --- a/deal.II/deal.II/source/dofs/dof_handler.cc +++ b/deal.II/deal.II/source/dofs/dof_handler.cc @@ -1510,7 +1510,7 @@ void DoFHandler<1>::renumber_dofs (const std::vector &new_numbers) if (true) { std::vector tmp(new_numbers); - sort (tmp.begin(), tmp.end()); + std::sort (tmp.begin(), tmp.end()); std::vector::const_iterator p = tmp.begin(); unsigned int i = 0; for (; p!=tmp.end(); ++p, ++i) @@ -1612,7 +1612,7 @@ void DoFHandler<3>::renumber_dofs (const std::vector &new_numbers) if (true) { std::vector tmp(new_numbers); - sort (tmp.begin(), tmp.end()); + std::sort (tmp.begin(), tmp.end()); std::vector::const_iterator p = tmp.begin(); unsigned int i = 0; for (; p!=tmp.end(); ++p, ++i) diff --git a/deal.II/deal.II/source/grid/grid_generator.cc b/deal.II/deal.II/source/grid/grid_generator.cc index 264c18ca88..ba4e69ee28 100644 --- a/deal.II/deal.II/source/grid/grid_generator.cc +++ b/deal.II/deal.II/source/grid/grid_generator.cc @@ -656,9 +656,9 @@ GridGenerator::hyper_ball (Triangulation<3> &tria, // altogether Assert(false, ExcNotImplemented()); - const double a = 1./(1+sqrt(3)); // equilibrate cell sizes at transition - // from the inner part to the radial - // cells + const double a = 1./(1+std::sqrt(3)); // equilibrate cell sizes at transition + // from the inner part to the radial + // cells const unsigned int n_vertices = 16; const Point<3> vertices[n_vertices] = { diff --git a/deal.II/deal.II/source/grid/tria.cc b/deal.II/deal.II/source/grid/tria.cc index 0bc0aa6885..6a07e50324 100644 --- a/deal.II/deal.II/source/grid/tria.cc +++ b/deal.II/deal.II/source/grid/tria.cc @@ -989,8 +989,8 @@ void Triangulation<3>::create_triangulation (const std::vector > &v, // assert minimum touch count is at // least two - if (! (* (min_element(vertex_touch_count.begin(), - vertex_touch_count.end())) >= 2)) + if (! (* (std::min_element(vertex_touch_count.begin(), + vertex_touch_count.end())) >= 2)) { // clear will only work if // there are no @@ -1619,10 +1619,10 @@ void Triangulation<1>::distort_random (const double factor, // first compute a random shift vector for (unsigned int d=0; d::at_boundary () const template double TriaObjectAccessor<3, dim>::diameter () const { - return sqrt(std::max( std::max((vertex(6)-vertex(0)).square(), - (vertex(7)-vertex(1)).square()), - std::max((vertex(4)-vertex(2)).square(), - (vertex(5)-vertex(3)).square()) )); + return std::sqrt(std::max( std::max((vertex(6)-vertex(0)).square(), + (vertex(7)-vertex(1)).square()), + std::max((vertex(4)-vertex(2)).square(), + (vertex(5)-vertex(3)).square()) )); }; diff --git a/deal.II/deal.II/source/grid/tria_boundary.cc b/deal.II/deal.II/source/grid/tria_boundary.cc index 8e03f33c37..e5524a3f7c 100644 --- a/deal.II/deal.II/source/grid/tria_boundary.cc +++ b/deal.II/deal.II/source/grid/tria_boundary.cc @@ -178,7 +178,7 @@ get_intermediate_points_on_quad (const typename Triangulation::quad_iterato typename std::vector > &points) const { const unsigned int n=points.size(), - m=static_cast(sqrt(n)); + m=static_cast(std::sqrt(n)); // is n a square number Assert(m*m==n, ExcInternalError()); diff --git a/deal.II/deal.II/source/grid/tria_boundary_lib.cc b/deal.II/deal.II/source/grid/tria_boundary_lib.cc index c2e8e4e84c..5f516e38ed 100644 --- a/deal.II/deal.II/source/grid/tria_boundary_lib.cc +++ b/deal.II/deal.II/source/grid/tria_boundary_lib.cc @@ -192,7 +192,7 @@ HyperBallBoundary::get_intermediate_points_between_points ( // HyperBallBoundary for (unsigned int i=0; i::get_intermediate_points_on_quad ( const Triangulation<3>::quad_iterator &quad, std::vector > &points) const { - unsigned int m=static_cast (sqrt(points.size())); + unsigned int m=static_cast (std::sqrt(points.size())); Assert(points.size()==m*m, ExcInternalError()); std::vector > lp3(m); diff --git a/deal.II/deal.II/source/numerics/derivative_approximation.cc b/deal.II/deal.II/source/numerics/derivative_approximation.cc index 18c0595108..13386c8ecd 100644 --- a/deal.II/deal.II/source/numerics/derivative_approximation.cc +++ b/deal.II/deal.II/source/numerics/derivative_approximation.cc @@ -125,7 +125,7 @@ double DerivativeApproximation::SecondDerivative<1>:: derivative_norm (const Derivative &d) { - return fabs (d[0][0]); + return std::fabs (d[0][0]); }; #endif diff --git a/deal.II/deal.II/source/numerics/error_estimator.cc b/deal.II/deal.II/source/numerics/error_estimator.cc index a1a9ff3cfc..5f2c29f46e 100644 --- a/deal.II/deal.II/source/numerics/error_estimator.cc +++ b/deal.II/deal.II/source/numerics/error_estimator.cc @@ -386,7 +386,7 @@ void KellyErrorEstimator<1>::estimate (const Mapping<1> &mapp }; for (unsigned int s=0; s