]> https://gitweb.dealii.org/ - dealii.git/commitdiff
minor code cleanup in dof_tools_constraints 6827/head
authorDenis Davydov <davydden@gmail.com>
Fri, 22 Jun 2018 20:24:57 +0000 (22:24 +0200)
committerDenis Davydov <davydden@gmail.com>
Fri, 22 Jun 2018 20:25:50 +0000 (22:25 +0200)
source/dofs/dof_tools_constraints.cc

index 4cd35045f94710cea367d6d33e27e653d680e04b..99d70c5a1e7dfd2c508156a0f642d2ce307f0e09 100644 (file)
@@ -1138,18 +1138,19 @@ namespace DoFTools
                   for (unsigned int c = 0;
                        c < cell->face(face)->number_of_children();
                        ++c)
-                    if (!cell->neighbor_child_on_subface(face, c)
-                           ->is_artificial())
-                      {
-                        mother_face_dominates =
-                          mother_face_dominates &
-                          (cell->get_fe().compare_for_face_domination(
-                            cell->neighbor_child_on_subface(face, c)
-                              ->get_fe()));
-                        fe_ind_face_subface.insert(
-                          cell->neighbor_child_on_subface(face, c)
-                            ->active_fe_index());
-                      }
+                    {
+                      const auto subcell =
+                        cell->neighbor_child_on_subface(face, c);
+                      if (!subcell->is_artificial())
+                        {
+                          mother_face_dominates =
+                            mother_face_dominates &
+                            (cell->get_fe().compare_for_face_domination(
+                              subcell->get_fe()));
+                          fe_ind_face_subface.insert(
+                            subcell->active_fe_index());
+                        }
+                    }
 
                 switch (mother_face_dominates)
                   {
@@ -1251,10 +1252,10 @@ namespace DoFTools
                                                    [cell->active_fe_index()]
                                                    [subface_fe_index][c]),
                                                constraints);
-                          }
+                          } // loop over subfaces
 
                         break;
-                      }
+                      } // Case 1
 
                     case FiniteElementDomination::other_element_dominates:
                     case FiniteElementDomination::neither_element_dominates:
@@ -1445,10 +1446,10 @@ namespace DoFTools
                                                slave_dofs,
                                                constraint_matrix,
                                                constraints);
-                          }
+                          } // loop over subfaces
 
                         break;
-                      }
+                      } // Case 2
 
                     case FiniteElementDomination::no_requirements:
                       // there are no continuity requirements between the two

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.