]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove a few #ifdefs by just moving a variable into the Assertion.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 7 May 2015 16:47:33 +0000 (11:47 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 7 May 2015 16:47:33 +0000 (11:47 -0500)
include/deal.II/numerics/vector_tools.templates.h

index a2715b986fb032cdc09cd5d00304771c3079c96b..b71d1ac8094ed5bfc4255003cc11fcc24123d832 100644 (file)
@@ -6724,11 +6724,8 @@ namespace VectorTools
                const InVector        &fe_function,
                const Point<spacedim>      &point)
   {
-#ifdef DEBUG
-    const FiniteElement<dim> &fe = dof.get_fe();
-    Assert(fe.n_components() == 1,
+    Assert(dof.get_fe().n_components() == 1,
            ExcMessage ("Finite element is not scalar as is necessary for this function"));
-#endif
 
     Vector<double> value(1);
     point_value(mapping, dof, fe_function, point, value);
@@ -6744,11 +6741,8 @@ namespace VectorTools
                const InVector        &fe_function,
                const Point<spacedim>      &point)
   {
-#ifdef DEBUG
-    const hp::FECollection<dim, spacedim> &fe = dof.get_fe();
-    Assert(fe.n_components() == 1,
+    Assert(dof.get_fe().n_components() == 1,
            ExcMessage ("Finite element is not scalar as is necessary for this function"));
-#endif
 
     Vector<double> value(1);
     point_value(mapping, dof, fe_function, point, value);
@@ -6901,11 +6895,8 @@ namespace VectorTools
                   const InVector        &fe_function,
                   const Point<spacedim>      &point)
   {
-#ifdef DEBUG
-    const FiniteElement<dim> &fe = dof.get_fe();
-    Assert(fe.n_components() == 1,
+    Assert(dof.get_fe().n_components() == 1,
            ExcMessage ("Finite element is not scalar as is necessary for this function"));
-#endif
 
     std::vector<Tensor<1, dim> > gradient(1);
     point_gradient (mapping, dof, fe_function, point, gradient);
@@ -6921,11 +6912,8 @@ namespace VectorTools
                   const InVector        &fe_function,
                   const Point<spacedim>      &point)
   {
-#ifdef DEBUG
-    const hp::FECollection<dim, spacedim> &fe = dof.get_fe();
-    Assert(fe.n_components() == 1,
+    Assert(dof.get_fe().n_components() == 1,
            ExcMessage ("Finite element is not scalar as is necessary for this function"));
-#endif
 
     std::vector<Tensor<1, dim> > gradient(1);
     point_gradient (mapping, dof, fe_function, point, gradient);

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.