From: Wolfgang Bangerth Date: Wed, 15 Jan 2025 03:18:55 +0000 (-0700) Subject: Make code in step-44 easier to read. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9d8fa9a19bf7d32d4b858b3b7027f5988a9edd1;p=dealii.git Make code in step-44 easier to read. --- diff --git a/examples/step-44/step-44.cc b/examples/step-44/step-44.cc index 1652e79ed7..9ca6c994b5 100644 --- a/examples/step-44/step-44.cc +++ b/examples/step-44/step-44.cc @@ -1519,12 +1519,11 @@ namespace Step44 for (unsigned int k = 0; k < fe.n_dofs_per_cell(); ++k) { - const unsigned int k_group = fe.system_to_base_index(k).first.first; - if (k_group == u_dof) + if (fe.shape_function_belongs_to(k, u_fe)) element_indices_u.push_back(k); - else if (k_group == p_dof) + else if (fe.shape_function_belongs_to(k, p_fe)) element_indices_p.push_back(k); - else if (k_group == J_dof) + else if (fe.shape_function_belongs_to(k, J_fe)) element_indices_J.push_back(k); else DEAL_II_ASSERT_UNREACHABLE();