]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix various places where Compaq's cxx compiler is overly strict (it doesn't export...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 2 Jul 2001 14:03:15 +0000 (14:03 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 2 Jul 2001 14:03:15 +0000 (14:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@4784 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/exceptions.h
deal.II/base/source/convergence_table.cc
deal.II/base/source/job_identifier.cc
deal.II/base/source/legendre.cc
deal.II/base/source/parameter_handler.cc
deal.II/base/source/quadrature_lib.cc
deal.II/base/source/tensor.cc

index bbc2dcffaf514f7436fe70abfd246e2d7696aba5..32d48f5279de59bf271e7c61e6a0117c7bd01b56 100644 (file)
@@ -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
 
index 775c35bc06a59ae42003e916060cec90a0896b63..dc1ffb0f25f31d992ef992e0ece5643e6945d0ae 100644 (file)
@@ -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<n; ++i)
-             add_value(rate_key, log(values[i-1]/values[i])/log(2.0));
+             add_value(rate_key, std::log(values[i-1]/values[i])/std::log(2.0));
            break;
       default:
            ExcNotImplemented();  
index ce4aaae63af084cbce022e1dbe7d759b031f9989..c8d78afef8e94a74cc4bb12d2dcc011348321e23 100644 (file)
@@ -24,7 +24,7 @@ JobIdentifier dealjobid;
 
 JobIdentifier::JobIdentifier()
 {
-  time_t t = time(0);
+  time_t t = std::time(0);
   id = std::string(program_id());
 
 //TODO:[GK] try to avoid this hack
@@ -35,7 +35,7 @@ JobIdentifier::JobIdentifier()
   id += std::string(name) + std::string(" ");
 #endif
 
-  id += std::string(ctime(&t));
+  id += std::string(std::ctime(&t));
 }
 
 
index 4fbf97ceb36bb0eb47843811340e18bb074b95a8..bd3bbabe9b6241e65b12d16f008eb6f9542a079c 100644 (file)
@@ -36,8 +36,10 @@ namespace
 
 template <typename number>
 void
-Legendre<number>::compute_coefficients (unsigned int k)
+Legendre<number>::compute_coefficients (const unsigned int k_)
 {
+  unsigned int k = k_;
+
                                   // first make sure that no other
                                   // thread intercepts the operation
                                   // of this function
index 87a18c8d674b42c879996d46d4c87fffd53e0da6..ecb65a158b2feab0b8a038fab959d74487582b10 100644 (file)
@@ -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));
index 6e5172ea6acdf07bb3af1fbdfa103894cccc20ba..af3b8f3b3b7fce398ecaf926612b824d0458da02 100644 (file)
@@ -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.,
index 86efca7a03c221de8bc538c3f8ba30b7e104e409..af1e614210cd4fdcb9f2b5e01a6f0d64d2123554 100644 (file)
@@ -42,8 +42,8 @@ template <int rank_, int dim>
 void
 Tensor<rank_, dim>::unroll( Vector<double>& result) const
 {
-  Assert(result.size()==pow(dim,rank_),
-        ExcWrongVectorSize(static_cast<unsigned int>(pow(dim,rank_)),
+  Assert(result.size()==std::pow(static_cast<double>(dim),rank_),
+        ExcWrongVectorSize(static_cast<unsigned int>(std::pow(static_cast<double>(dim),rank_)),
                            result.size()));
 
   unsigned index = 0;

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.