]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use C++11-style initialization of a std::map.
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 24 Oct 2017 04:21:43 +0000 (22:21 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 24 Oct 2017 04:36:23 +0000 (22:36 -0600)
examples/step-16/step-16.cc

index b7afd1728e0207895a84f531e79013c3cba80518..d3271fb1ce1a52544f028b49c33cbd6952b39b9f 100644 (file)
@@ -281,11 +281,10 @@ namespace Step16
     constraints.clear ();
     DoFTools::make_hanging_node_constraints (dof_handler, constraints);
 
-    std::set<types::boundary_id>         dirichlet_boundary_ids;
-    typename FunctionMap<dim>::type      dirichlet_boundary_functions;
-    Functions::ZeroFunction<dim>         homogeneous_dirichlet_bc;
-    dirichlet_boundary_ids.insert(0);
-    dirichlet_boundary_functions[0] = &homogeneous_dirichlet_bc;
+    std::set<types::boundary_id>          dirichlet_boundary_ids;
+    Functions::ZeroFunction<dim>          homogeneous_dirichlet_bc;
+    const typename FunctionMap<dim>::type dirichlet_boundary_functions
+    = { { types::boundary_id(0), &homogeneous_dirichlet_bc } };
     VectorTools::interpolate_boundary_values (static_cast<const DoFHandler<dim>&>(dof_handler),
                                               dirichlet_boundary_functions,
                                               constraints);

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.