]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid call to a deprecated function.
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 7 Apr 2023 20:32:37 +0000 (14:32 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 20 Apr 2023 19:56:44 +0000 (13:56 -0600)
examples/step-2/step-2.cc
examples/step-60/step-60.cc
source/particles/generators.cc

index cba004b43e7596c398acfa9b934da9b8d614e146..1426ae98db3b178d9e0b5cf0b5f850c55c3e626d 100644 (file)
@@ -120,8 +120,7 @@ void make_grid(Triangulation<2> &triangulation)
 // understand exactly what this function does, and you can skip over
 // it. But if you would like to know anyway: We want to call the
 // function DoFTools::map_dofs_to_support_points() that returns a list
-// of locations (in the form of Point objects that store
-// coordinates). It does so in the form of a map through which we can
+// of locations. It does so in the form of a map through which we can
 // query (in a statement such as `dof_location_map[42]`) where the DoF
 // is located (in the example, where the 42nd DoF is). It puts this
 // information into the `dof_location_map` object.
@@ -134,10 +133,8 @@ void make_grid(Triangulation<2> &triangulation)
 void write_dof_locations(const DoFHandler<2> &dof_handler,
                          const std::string &  filename)
 {
-  std::map<types::global_dof_index, Point<2>> dof_location_map;
-  DoFTools::map_dofs_to_support_points(MappingQ1<2>(),
-                                       dof_handler,
-                                       dof_location_map);
+  std::map<types::global_dof_index, Point<2>> dof_location_map =
+    DoFTools::map_dofs_to_support_points(MappingQ1<2>(), dof_handler);
 
   std::ofstream dof_location_file(filename);
   DoFTools::write_gnuplot_dof_support_point_info(dof_location_file,
index d3ace151d12619dc210d0430859f2bc924e21741..b9d9d16d9391beefadbac193d2fa97d6b8bda080 100644 (file)
@@ -709,7 +709,7 @@ namespace Step60
     //
     // With the mapping in place, it is now possible to query what is the
     // location of all support points associated with the `embedded_dh`, by
-    // calling the method DoFTools::map_dofs_to_support_points.
+    // calling the method DoFTools::map_dofs_to_support_points().
     //
     // This method has two variants. One that does *not* take a Mapping, and
     // one that takes a Mapping. If you use the second type, like we are doing
index fdebe39ee700a1f83dd82ac2517e4ab2afb87ea1..acd3caf205ed5068666c7828d6663e76eff43701 100644 (file)
@@ -468,12 +468,9 @@ namespace Particles
         (components.size() == 0 ? ComponentMask(fe.n_components(), true) :
                                   components);
 
-      std::map<types::global_dof_index, Point<spacedim>> support_points_map;
-
-      DoFTools::map_dofs_to_support_points(mapping,
-                                           dof_handler,
-                                           support_points_map,
-                                           mask);
+      const std::map<types::global_dof_index, Point<spacedim>>
+        support_points_map =
+          DoFTools::map_dofs_to_support_points(mapping, dof_handler, mask);
 
       // Generate the vector of points from the map
       // Memory is reserved for efficiency reasons

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.