From f9d8fa9a19bf7d32d4b858b3b7027f5988a9edd1 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 14 Jan 2025 20:18:55 -0700 Subject: [PATCH] Make code in step-44 easier to read. --- examples/step-44/step-44.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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(); -- 2.39.5