]> 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 12:35:51 +0000 (12:35 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 3 Jul 2001 12:35:51 +0000 (12:35 +0000)
git-svn-id: https://svn.dealii.org/trunk@4808 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-1/step-1.cc
deal.II/examples/step-2/step-2.cc
deal.II/examples/step-4/step-4.cc
deal.II/examples/step-7/step-7.cc
deal.II/examples/step-9/step-9.cc
deal.II/lac/include/lac/solver_bicgstab.h

index 01ebbf69811431e5d344d8447ddfb1826cb107a0..9250c7de89f4696bb43eee59de4e64f65185e7ae 100644 (file)
@@ -170,9 +170,9 @@ void second_grid ()
             const Point<2> vector_to_center
               = (cell->vertex(vertex) - center);
             const double distance_from_center
-              = sqrt(vector_to_center.square());
+              = std::sqrt(vector_to_center.square());
             
-            if (fabs(distance_from_center - inner_radius) < 1e-10)
+            if (std::fabs(distance_from_center - inner_radius) < 1e-10)
               {
                                                  // Ok, this is one of
                                                  // the cells we were
index 29fcc76fedd1b1a254fb7db762d9f11942980ab3..357553d9ea2607665179949d9edbb0dbf42bb0cd 100644 (file)
@@ -106,9 +106,9 @@ void make_grid (Triangulation<2> &triangulation)
            const Point<2> vector_to_center
              = (cell->vertex(vertex) - center);
            const double distance_from_center
-             = sqrt(vector_to_center.square());
+             = std::sqrt(vector_to_center.square());
            
-           if (fabs(distance_from_center - inner_radius) < 1e-10)
+           if (std::fabs(distance_from_center - inner_radius) < 1e-10)
              {
                cell->set_refine_flag ();
                break;
index 9066a1e4f9f218e967343911b438f3ed870e32f8..893a55f47713a84954bff0e734ffd7efb263d989 100644 (file)
@@ -173,7 +173,7 @@ double RightHandSide<dim>::value (const Point<dim> &p,
 {
   double return_value = 0;
   for (unsigned int i=0; i<dim; ++i)
-    return_value += 4*pow(p(i), 4);
+    return_value += 4*std::pow(p(i), 4);
 
   return return_value;
 };
index 068f017ba7d0518ba5244acfbc0e63ae349e70a3..c8bbcc6337e7edf028063676faaf6d25767b86fa 100644 (file)
@@ -217,7 +217,7 @@ double Solution<dim>::value (const Point<dim>   &p,
                                       // offers a member function
                                       // ``square'' that does what
                                       // it's name suggests.
-      return_value += exp(-shifted_point.square() / (width*width));
+      return_value += std::exp(-shifted_point.square() / (width*width));
     };
   
   return return_value;
@@ -264,7 +264,7 @@ Tensor<1,dim> Solution<dim>::gradient (const Point<dim>   &p,
                                       // vector, where the factor is
                                       // given by the exponentials.
       return_value += (-2 / (width*width) *
-                      exp(-shifted_point.square() / (width*width)) *
+                      std::exp(-shifted_point.square() / (width*width)) *
                       shifted_point);
     };
   
@@ -313,10 +313,10 @@ double RightHandSide<dim>::value (const Point<dim>   &p,
                                       // the Laplacian:
       return_value += ((2*dim - 4*shifted_point.square()/(width*width)) / 
                       (width*width) *
-                      exp(-shifted_point.square() / (width*width)));
+                      std::exp(-shifted_point.square() / (width*width)));
                                       // And the second is the
                                       // solution itself:
-      return_value += exp(-shifted_point.square() / (width*width));
+      return_value += std::exp(-shifted_point.square() / (width*width));
     };
   
   return return_value;
index b3356eebd9596428a410479c8cbfa7640c9dbfb3..8b97ffed216a0bac0a1d23221bc720ca4761e499 100644 (file)
@@ -323,7 +323,7 @@ AdvectionField<dim>::value (const Point<dim> &p) const
   Point<dim> value;
   value[0] = 2;
   for (unsigned int i=1; i<dim; ++i)
-    value[i] = 1+0.8*sin(8*M_PI*p[0]);
+    value[i] = 1+0.8*std::sin(8*M_PI*p[0]);
 
   return value;
 };
@@ -420,7 +420,7 @@ RightHandSide<dim>::value (const Point<dim>   &p,
   Assert (component == 0, ExcIndexRange (component, 0, 1));
   const double diameter = 0.1;
   return ( (p-center_point).square() < diameter*diameter ?
-          .1/pow(diameter,dim) :
+          .1/std::pow(diameter,dim) :
           0);
 };
 
@@ -466,8 +466,8 @@ BoundaryValues<dim>::value (const Point<dim>   &p,
 {
   Assert (component == 0, ExcIndexRange (component, 0, 1));
 
-  const double sine_term = sin(16*M_PI*sqrt(p.square()));
-  const double weight    = exp(-5*p.square()) / exp(-5.);
+  const double sine_term = std::sin(16*M_PI*std::sqrt(p.square()));
+  const double weight    = std::exp(-5*p.square()) / std::exp(-5.);
   return sine_term * weight;
 };
 
index a64e5e49520844779e3c166933d5bf88afccf8c5..9bff8e3e00b9bf82a3bd50be2212fb289d9d04af 100644 (file)
@@ -311,7 +311,7 @@ SolverBicgstab<VECTOR>::iterate(const MATRIX& A,
 
 //TODO:[?] Find better breakdown criterion
 
-      if (fabs(alpha) > 1.e10)
+      if (std::fabs(alpha) > 1.e10)
        return true;
     
       s.equ(1., r, -alpha, v);

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.