]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify creation of a std::set.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 13 May 2020 21:32:27 +0000 (15:32 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 14 May 2020 20:26:27 +0000 (14:26 -0600)
examples/step-50/step-50.cc

index 86d354278050a29b05c221f7d4f3d77b07966a9f..b1f5b3c63a498d094743e9ec1312281339ffa09c 100644 (file)
@@ -562,9 +562,9 @@ void LaplaceProblem<dim, degree>::setup_multigrid()
 
   mg_constrained_dofs.clear();
   mg_constrained_dofs.initialize(dof_handler);
-  std::set<types::boundary_id> bset;
-  bset.insert(0);
-  mg_constrained_dofs.make_zero_boundary_constraints(dof_handler, bset);
+
+  const std::set<types::boundary_id> boundary_ids = {types::boundary_id(0)};
+  mg_constrained_dofs.make_zero_boundary_constraints(dof_handler, boundary_ids);
 
   const unsigned int n_levels = triangulation.n_global_levels();
   if (settings.solver == Settings::gmg_mf)

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.