]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid some warnings in case we don't have GSL available. 2707/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 24 Jun 2016 01:23:38 +0000 (20:23 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 24 Jun 2016 01:23:38 +0000 (20:23 -0500)
source/fe/fe_series.cc

index c647a7a2dcc680423ec16625c1c89759037e233e..0a186e38cc2c9b6144572568a2e10c771dd3b16a 100644 (file)
@@ -205,6 +205,7 @@ namespace FESeries
   double Lh(const Point<dim>  &x_q,
             const TableIndices<dim> &indices)
   {
+#ifdef DEAL_II_WITH_GSL
     double res = 1.0;
     for (unsigned int d = 0; d < dim; d++)
       {
@@ -212,14 +213,18 @@ namespace FESeries
         Assert ( (x_q[d] <= 1.0) && (x_q[d] >= 0.),
                  ExcLegendre(d,x_q[d]));
         const int ind = indices[d];
-#ifdef DEAL_II_WITH_GSL
         res *= sqrt(2.0) * gsl_sf_legendre_Pl (ind, x);
-#else
-        AssertThrow(false, ExcMessage("deal.II has to be configured with GSL"
-                                      "in order to use Legendre transformation."));
-#endif
       }
     return res;
+
+#else
+
+    (void)x_q;
+    (void)indices;
+    AssertThrow(false, ExcMessage("deal.II has to be configured with GSL"
+                                  "in order to use Legendre transformation."));
+    return 0;
+#endif
   }
 
   /*

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.