]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
fix warning about ambiguous else branch
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 11 Jan 2014 01:52:06 +0000 (01:52 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 11 Jan 2014 01:52:06 +0000 (01:52 +0000)
git-svn-id: https://svn.dealii.org/trunk@32193 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/fe/fe_poly_tensor.cc

index 84a20f281014e0bc951ede838fcfeeb2a7e3306d..d3bbdb807c03535065fce7d1fa64ed71799e7233 100644 (file)
@@ -585,27 +585,29 @@ FE_PolyTensor<POLY,dim,spacedim>::fill_fe_values (
     }
 
   if (flags & update_hessians && cell_similarity != CellSimilarity::translation)
-    if (mapping_type == mapping_nedelec)
     {
-      this->compute_2nd (mapping, cell,
-                         typename QProjector<dim>::DataSetDescriptor().cell(),
-                         mapping_data, fe_data, data, mapping_covariant_gradient);
+      if (mapping_type == mapping_nedelec)
+       {
+         this->compute_2nd (mapping, cell,
+                            typename QProjector<dim>::DataSetDescriptor().cell(),
+                            mapping_data, fe_data, data, mapping_covariant_gradient);
       
-      for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
-      {
-        const unsigned int first = data.shape_function_to_row_table[i * this->n_components() +
-                                                                    this->get_nonzero_components(i).first_selected_component()];
+         for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+           {
+             const unsigned int first = data.shape_function_to_row_table[i * this->n_components() +
+                                                                         this->get_nonzero_components(i).first_selected_component()];
         
-        for (unsigned int k = 0; k < n_q_points; ++k)
-          for (unsigned int d = 0; d < dim; ++d)
-            data.shape_hessians[first + d][k] *= sign_change[i];
-      }
-    }
+             for (unsigned int k = 0; k < n_q_points; ++k)
+               for (unsigned int d = 0; d < dim; ++d)
+                 data.shape_hessians[first + d][k] *= sign_change[i];
+           }
+       }
     
-    else
-      this->compute_2nd (mapping, cell,
-                         typename QProjector<dim>::DataSetDescriptor().cell(),
-                         mapping_data, fe_data, data);
+      else
+       this->compute_2nd (mapping, cell,
+                          typename QProjector<dim>::DataSetDescriptor().cell(),
+                          mapping_data, fe_data, data);
+    }
 }
 
 
@@ -809,23 +811,25 @@ FE_PolyTensor<POLY,dim,spacedim>::fill_fe_face_values (
     }
 
   if (flags & update_hessians)
-    if (mapping_type == mapping_nedelec)
     {
-      this->compute_2nd (mapping, cell, offset, mapping_data, fe_data, data, mapping_covariant_gradient);
+      if (mapping_type == mapping_nedelec)
+       {
+         this->compute_2nd (mapping, cell, offset, mapping_data, fe_data, data, mapping_covariant_gradient);
       
-      for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
-      {
-        const unsigned int first = data.shape_function_to_row_table[i * this->n_components() +
-                                                                    this->get_nonzero_components(i).first_selected_component()];
+         for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+           {
+             const unsigned int first = data.shape_function_to_row_table[i * this->n_components() +
+                                                                         this->get_nonzero_components(i).first_selected_component()];
         
-        for (unsigned int k = 0; k < n_q_points; ++k)
-          for (unsigned int d = 0; d < dim; ++d)
-            data.shape_hessians[first + d][k] *= sign_change[i];
-      }
-    }
+             for (unsigned int k = 0; k < n_q_points; ++k)
+               for (unsigned int d = 0; d < dim; ++d)
+                 data.shape_hessians[first + d][k] *= sign_change[i];
+           }
+       }
     
-    else
-      this->compute_2nd (mapping, cell, offset, mapping_data, fe_data, data);
+      else
+       this->compute_2nd (mapping, cell, offset, mapping_data, fe_data, data);
+    }
 }
 
 
@@ -1035,23 +1039,25 @@ FE_PolyTensor<POLY,dim,spacedim>::fill_fe_subface_values (
     }
 
   if (flags & update_hessians)
-    if (mapping_type == mapping_nedelec)
     {
-      this->compute_2nd (mapping, cell, offset, mapping_data, fe_data, data, mapping_covariant_gradient);
+      if (mapping_type == mapping_nedelec)
+       {
+         this->compute_2nd (mapping, cell, offset, mapping_data, fe_data, data, mapping_covariant_gradient);
       
-      for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
-      {
-        const unsigned int first = data.shape_function_to_row_table[i * this->n_components() +
-                                                                    this->get_nonzero_components(i).first_selected_component()];
+         for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
+           {
+             const unsigned int first = data.shape_function_to_row_table[i * this->n_components() +
+                                                                         this->get_nonzero_components(i).first_selected_component()];
         
-        for (unsigned int k = 0; k < n_q_points; ++k)
-          for (unsigned int d = 0; d < dim; ++d)
-            data.shape_hessians[first + d][k] *= sign_change[i];
-      }
-    }
+             for (unsigned int k = 0; k < n_q_points; ++k)
+               for (unsigned int d = 0; d < dim; ++d)
+                 data.shape_hessians[first + d][k] *= sign_change[i];
+           }
+       }
     
-    else
-      this->compute_2nd (mapping, cell, offset, mapping_data, fe_data, data);
+      else
+       this->compute_2nd (mapping, cell, offset, mapping_data, fe_data, data);
+    }
 }
 
 

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.