From: Denis Davydov Date: Fri, 22 Jun 2018 20:24:57 +0000 (+0200) Subject: minor code cleanup in dof_tools_constraints X-Git-Tag: v9.1.0-rc1~1001^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f003d318602ce7e879fc2b0d7455225ab136be2;p=dealii.git minor code cleanup in dof_tools_constraints --- diff --git a/source/dofs/dof_tools_constraints.cc b/source/dofs/dof_tools_constraints.cc index 4cd35045f9..99d70c5a1e 100644 --- a/source/dofs/dof_tools_constraints.cc +++ b/source/dofs/dof_tools_constraints.cc @@ -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