]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Work around a bug in Compaq's cxx compiler.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 9 Jan 2002 08:15:14 +0000 (08:15 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 9 Jan 2002 08:15:14 +0000 (08:15 +0000)
git-svn-id: https://svn.dealii.org/trunk@5365 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-12/step-12.cc

index 0695675e26b39313134c61d1dfb3f01c6d535bcd..1686baaa51dc68f0f29d27d356d0f1f3fcc4d5db 100644 (file)
@@ -116,10 +116,19 @@ class BoundaryValues:  public Function<dim>
                                 // ``Tensor'', simplifying terms like
                                 // $\beta\cdot n$ and
                                 // $\beta\cdot\nabla v$.
+                                 //
+                                 // An unnecessary empty constructor
+                                 // is added to the class to work
+                                 // around a bug in Compaq's cxx
+                                 // compiler which otherwise reports
+                                 // an error about an omitted
+                                 // initializer for an object of
+                                 // this class further down.
 template <int dim>
 class Beta
 {
   public:
+    Beta () {};
     void value_list (const std::vector<Point<dim> > &points,
                     std::vector<Point<dim> > &values) const;
 };
@@ -161,9 +170,9 @@ void Beta<dim>::value_list(const std::vector<Point<dim> > &points,
       const Point<dim> &p=points[i];
       Point<dim> &beta=values[i];
 
-      beta(0)=-p(1);
-      beta(1)=p(0);
-      beta/=sqrt(beta.square());
+      beta(0) = -p(1);
+      beta(1) = p(0);
+      beta /= std::sqrt(beta.square());
     }
 }
 

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.