]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix many missing std:: which Compaq's cxx wants to have, mostly for two reasons:...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Jul 2001 09:29:20 +0000 (09:29 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Jul 2001 09:29:20 +0000 (09:29 +0000)
git-svn-id: https://svn.dealii.org/trunk@4802 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/dofs/dof_handler.cc
deal.II/deal.II/source/grid/grid_generator.cc
deal.II/deal.II/source/grid/tria.cc
deal.II/deal.II/source/grid/tria_accessor.cc
deal.II/deal.II/source/grid/tria_boundary.cc
deal.II/deal.II/source/grid/tria_boundary_lib.cc
deal.II/deal.II/source/numerics/derivative_approximation.cc
deal.II/deal.II/source/numerics/error_estimator.cc

index 04c6ddf2484709696d1fe95f0e5cca163f4d96a7..a66760356af25ee3d2d7375b7fa2dd118fa5b8f5 100644 (file)
@@ -1510,7 +1510,7 @@ void DoFHandler<1>::renumber_dofs (const std::vector<unsigned int> &new_numbers)
   if (true)
     {
       std::vector<unsigned int> tmp(new_numbers);
-      sort (tmp.begin(), tmp.end());
+      std::sort (tmp.begin(), tmp.end());
       std::vector<unsigned int>::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<unsigned int> &new_numbers)
   if (true)
     {
       std::vector<unsigned int> tmp(new_numbers);
-      sort (tmp.begin(), tmp.end());
+      std::sort (tmp.begin(), tmp.end());
       std::vector<unsigned int>::const_iterator p = tmp.begin();
       unsigned int                              i = 0;
       for (; p!=tmp.end(); ++p, ++i)
index 264c18ca88abddafa111aab224e333f9d4c24089..ba4e69ee28093bb6257dd8e97929c229a5a73ac8 100644 (file)
@@ -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]
     = {
index 0bc0aa6885dcf315fe0c3afe07322f053dd6dc3c..6a07e50324eb2915672ee50d82a2bf8da15a6cf7 100644 (file)
@@ -989,8 +989,8 @@ void Triangulation<3>::create_triangulation (const std::vector<Point<3> >    &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<dim; ++d)
-       shift_vector(d) = rand()*1.0/RAND_MAX;
+       shift_vector(d) = std::rand()*1.0/RAND_MAX;
 
       shift_vector *= factor * minimal_length[vertex] /
-                     sqrt(shift_vector.square());
+                     std::sqrt(shift_vector.square());
 
                                       // finally move the vertex
       vertices[vertex] += shift_vector;
index 7137bee4c9d3088913a84472df5a6f49d04a6d02..a105f51cc0f560ecaa743d35e8ff4c30a732c16a 100644 (file)
@@ -771,10 +771,10 @@ bool TriaObjectAccessor<3, dim>::at_boundary () const
 template <int dim>
 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()) ));
 };
 
 
index 8e03f33c37bfe1417921d13676b6fa78c778b7f5..e5524a3f7c6fae75342d16aa64c48bc546a737e6 100644 (file)
@@ -178,7 +178,7 @@ get_intermediate_points_on_quad (const typename Triangulation<dim>::quad_iterato
                                 typename std::vector<Point<dim> > &points) const
 {
   const unsigned int n=points.size(),
-                    m=static_cast<unsigned int>(sqrt(n));
+                    m=static_cast<unsigned int>(std::sqrt(n));
                                   // is n a square number
   Assert(m*m==n, ExcInternalError());
 
index c2e8e4e84c30144ad685454bd508d4f8ef5821e8..5f516e38ed2184ace966cef19ffaf20fbc0735dc 100644 (file)
@@ -192,7 +192,7 @@ HyperBallBoundary<dim>::get_intermediate_points_between_points (
                                   // HyperBallBoundary
   for (unsigned int i=0; i<n; ++i)
     {
-      points[i] *= r / sqrt(points[i].square());
+      points[i] *= r / std::sqrt(points[i].square());
       points[i] += center;
     }
 }
@@ -208,7 +208,7 @@ HyperBallBoundary<3>::get_intermediate_points_on_quad (
   const Triangulation<3>::quad_iterator &quad,
   std::vector<Point<3> > &points) const
 {
-  unsigned int m=static_cast<unsigned int> (sqrt(points.size()));
+  unsigned int m=static_cast<unsigned int> (std::sqrt(points.size()));
   Assert(points.size()==m*m, ExcInternalError());
 
   std::vector<Point<3> > lp3(m);
index 18c0595108c372f0a75fa2d222e177a64bc45f34..13386c8ecde9b09ace7e65cb85b941a7cdc2e5a7 100644 (file)
@@ -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
index a1a9ff3cfc2fd7e6dba70100b31c01d9cead38f1..5f2c29f46e0ecdcbf46ecbe701d60a5eae0caad5 100644 (file)
@@ -386,7 +386,7 @@ void KellyErrorEstimator<1>::estimate (const Mapping<1>                    &mapp
        };
       
       for (unsigned int s=0; s<n_solution_vectors; ++s)
-       (*errors[s])(cell_index) = sqrt((*errors[s])(cell_index));
+       (*errors[s])(cell_index) = std::sqrt((*errors[s])(cell_index));
     };
 };
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.