]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix two warnings with clang-3.5 137/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Fri, 5 Sep 2014 16:32:45 +0000 (18:32 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Fri, 5 Sep 2014 16:32:45 +0000 (18:32 +0200)
source/fe/fe_values.cc
source/grid/manifold_lib.cc

index 3169217a6cde4fcf6929fb158d6bfb28061ec8bf..06cb38946d966c0b14b42ddc520d76f523ebf365 100644 (file)
@@ -966,38 +966,37 @@ namespace FEValuesViews
 
       for (unsigned int shape_function=0;
            shape_function<dofs_per_cell; ++shape_function)
-        if (shape_function_data[shape_function].is_nonzero_shape_function_component)
-          {
-            const int snc = shape_function_data[shape_function].single_nonzero_component;
+        {
+          const int snc = shape_function_data[shape_function].single_nonzero_component;
 
-            if (snc == -2)
-              // shape function is zero for the selected components
-              continue;
+          if (snc == -2)
+            // shape function is zero for the selected components
+            continue;
 
-            const double value = dof_values(shape_function);
-            if (value == 0.)
-              continue;
+          const double value = dof_values(shape_function);
+          if (value == 0.)
+            continue;
 
-            if (snc != -1)
-              {
-                const unsigned int comp =
-                  shape_function_data[shape_function].single_nonzero_component_index;
-                const dealii::Tensor<2,spacedim> *shape_hessian_ptr =
-                  &shape_hessians[snc][0];
-                for (unsigned int q_point=0; q_point<n_quadrature_points; ++q_point)
-                  laplacians[q_point][comp] += value * trace(*shape_hessian_ptr++);
-              }
-            else
-              for (unsigned int d=0; d<spacedim; ++d)
-                if (shape_function_data[shape_function].is_nonzero_shape_function_component[d])
-                  {
-                    const dealii::Tensor<2,spacedim> *shape_hessian_ptr =
-                      &shape_hessians[shape_function_data[shape_function].
-                                      row_index[d]][0];
-                    for (unsigned int q_point=0; q_point<n_quadrature_points; ++q_point)
-                      laplacians[q_point][d] += value * trace(*shape_hessian_ptr++);
-                  }
-          }
+          if (snc != -1)
+            {
+              const unsigned int comp =
+                shape_function_data[shape_function].single_nonzero_component_index;
+              const dealii::Tensor<2,spacedim> *shape_hessian_ptr =
+                &shape_hessians[snc][0];
+              for (unsigned int q_point=0; q_point<n_quadrature_points; ++q_point)
+                laplacians[q_point][comp] += value * trace(*shape_hessian_ptr++);
+            }
+          else
+            for (unsigned int d=0; d<spacedim; ++d)
+              if (shape_function_data[shape_function].is_nonzero_shape_function_component[d])
+                {
+                  const dealii::Tensor<2,spacedim> *shape_hessian_ptr =
+                    &shape_hessians[shape_function_data[shape_function].
+                                    row_index[d]][0];
+                  for (unsigned int q_point=0; q_point<n_quadrature_points; ++q_point)
+                    laplacians[q_point][d] += value * trace(*shape_hessian_ptr++);
+                }
+        }
     }
 
 
index b164676afa54da63f1c3f8c8db5871ed2c264560..e9a0e9c2d1bcd185f43cd73b4205bed8fb4ecebe 100644 (file)
@@ -275,8 +275,8 @@ FunctionManifold<dim,spacedim,chartdim>::push_forward(const Point<chartdim> &cha
   pull_back_function->vector_value(result, pb);
   for (unsigned int i=0; i<chartdim; ++i)
     Assert((chart_point.norm() > tolerance &&
-            (abs(pb[i]-chart_point[i]) < tolerance*chart_point.norm())) ||
-           (abs(pb[i]-chart_point[i]) < tolerance),
+            (std::abs(pb[i]-chart_point[i]) < tolerance*chart_point.norm())) ||
+           (std::abs(pb[i]-chart_point[i]) < tolerance),
            ExcMessage("The push forward is not the inverse of the pull back! Bailing out."));
 #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.