]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Work around a number of problems with icc10
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 20 Aug 2007 22:39:16 +0000 (22:39 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 20 Aug 2007 22:39:16 +0000 (22:39 +0000)
git-svn-id: https://svn.dealii.org/trunk@14998 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-21/step-21.cc
deal.II/examples/step-22/step-22.cc
deal.II/examples/step-24/step-24.cc

index 4e4470e3cfdf071eb8c108e8086d1f947587c5e7..a009908aa17e7a0a33015c4d2eba466a6fe651f4 100644 (file)
@@ -291,18 +291,29 @@ InitialValues<dim>::vector_value (const Point<dim> &p,
 
                                  // @sect4{Single curving crack permeability}
 
-                                 // The first function for the permeability
-                                 // was the one that models a single curving
-                                 // crack. It was already used at the end of
-                                 // step-20, and its functional form is given
-                                 // in the introduction of the present
-                                 // tutorial program:
+                                 // The first function for the
+                                 // permeability was the one that
+                                 // models a single curving crack. It
+                                 // was already used at the end of
+                                 // step-20, and its functional form
+                                 // is given in the introduction of
+                                 // the present tutorial program. As
+                                 // in some previous programs, we have
+                                 // to declare a (seemingly
+                                 // unnecessary) default constructor
+                                 // of the KInverse class to avoid
+                                 // warnings from some compilers:
 namespace SingleCurvingCrack
 {
   template <int dim>
   class KInverse : public TensorFunction<2,dim>
   {
     public:
+      KInverse ()
+                     :
+                     TensorFunction<2,dim> ()
+       {}
+      
       virtual void value_list (const std::vector<Point<dim> > &points,
                                std::vector<Tensor<2,dim> >    &values) const;
   };
@@ -392,6 +403,11 @@ namespace RandomMedium
   class KInverse : public TensorFunction<2,dim>
   {
     public:
+      KInverse ()
+                     :
+                     TensorFunction<2,dim> ()
+       {}
+      
       virtual void value_list (const std::vector<Point<dim> > &points,
                                std::vector<Tensor<2,dim> >    &values) const;
 
index 774ea0025b28821c6ec5490b066d8ec58c331c4d..d6cc6b48db552ba270c0218d573e799249fbb351 100644 (file)
@@ -266,6 +266,11 @@ namespace RandomMedium
   class KInverse : public TensorFunction<2,dim>
   {
     public:
+      KInverse ()
+                     :
+                     TensorFunction<2,dim>()
+       {}
+      
       virtual void value_list (const std::vector<Point<dim> > &points,
                                std::vector<Tensor<2,dim> >    &values) const;
 
index 0b977696b65811411348cc8e09a287b6bbeb1264..c65c6a5c82d0953a5787059e209017c77627ed91 100644 (file)
@@ -159,7 +159,10 @@ template <int dim>
 class InitialValuesP : public Function<dim> 
 {
   public:
-    InitialValuesP () : Function<dim>() {}
+    InitialValuesP ()
+                   :
+                   Function<dim>()
+      {}
     
     virtual double value (const Point<dim> &p,
                          const unsigned int  component = 0) const;
@@ -167,6 +170,13 @@ class InitialValuesP : public Function<dim>
   private:
     struct Source
     {
+       Source (const Point<dim> &l,
+               const double      r)
+                       :
+                       location (l),
+                       radius (r)
+         {}
+       
        const Point<dim> location;
        const double     radius;
     };
@@ -177,11 +187,11 @@ template <int dim>
 double InitialValuesP<dim>::value (const Point<dim> &p,
                                    const unsigned int /*component*/) const       
 {
-  static const Source sources[] = {{ Point<dim> (0, 0),         0.025 },
-                                  { Point<dim> (-0.135, 0),    0.05 },
-                                  { Point<dim> (0.17, 0),      0.03 },
-                                  { Point<dim> (-0.25, 0),     0.02 },
-                                  { Point<dim> (-0.05, -0.15), 0.015 }};
+  static const Source sources[] = {Source (Point<dim> (0, 0),         0.025),
+                                  Source (Point<dim> (-0.135, 0),    0.05),
+                                  Source (Point<dim> (0.17, 0),      0.03),
+                                  Source (Point<dim> (-0.25, 0),     0.02),
+                                  Source (Point<dim> (-0.05, -0.15), 0.015)};
   static const unsigned int n_sources = sizeof(sources)/sizeof(sources[0]);
   
   for (unsigned int i=0; i<n_sources; ++i)

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.