]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make code in step-44 easier to read. 17991/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 15 Jan 2025 03:18:55 +0000 (20:18 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 15 Jan 2025 03:18:55 +0000 (20:18 -0700)
examples/step-44/step-44.cc

index 1652e79ed73d90123ebbb485b59939cd0a3e3241..9ca6c994b59ca6c336ce1c52e75eb37d2ed91d6b 100644 (file)
@@ -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();

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.