From: Wolfgang Bangerth Date: Wed, 31 Mar 2021 01:52:17 +0000 (-0600) Subject: Minor updates to step-15. X-Git-Tag: v9.3.0-rc1~262^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11985%2Fhead;p=dealii.git Minor updates to step-15. --- diff --git a/examples/step-15/step-15.cc b/examples/step-15/step-15.cc index eeab634d80..87c6c94e30 100644 --- a/examples/step-15/step-15.cc +++ b/examples/step-15/step-15.cc @@ -557,13 +557,12 @@ namespace Step15 // lines which we have already seen used in step-11: hanging_node_constraints.condense(residual); - std::vector boundary_dofs(dof_handler.n_dofs()); + IndexSet boundary_dofs(dof_handler.n_dofs()); DoFTools::extract_boundary_dofs(dof_handler, ComponentMask(), boundary_dofs); - for (unsigned int i = 0; i < dof_handler.n_dofs(); ++i) - if (boundary_dofs[i] == true) - residual(i) = 0; + for (types::global_dof_index i : boundary_dofs) + residual(i) = 0; // At the end of the function, we return the norm of the residual: return residual.l2_norm(); @@ -611,7 +610,7 @@ namespace Step15 GridGenerator::hyper_ball(triangulation); triangulation.refine_global(2); - setup_system(true); + setup_system(/*first time=*/true); set_boundary_values(); // The Newton iteration starts next. During the first step we do not have