]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Minor updates to step-62. 15317/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 6 Jun 2023 14:34:41 +0000 (08:34 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 6 Jun 2023 14:34:41 +0000 (08:34 -0600)
examples/step-62/step-62.cc

index 3d31085566583c01b68194becafa2a0dbb9244b1..eef3c541359ed737803646a3311dd182bef1623f 100644 (file)
@@ -1386,9 +1386,7 @@ int main(int argc, char *argv[])
 
       // Each of the simulations (displacement and calibration) is stored in a
       // separate HDF5 group:
-      const std::vector<std::string> group_names = {"displacement",
-                                                    "calibration"};
-      for (auto group_name : group_names)
+      for (const std::string &group_name : {"displacement", "calibration"})
         {
           // For each of these two group names, we now create the group and put
           // attributes into these groups.
@@ -1420,7 +1418,7 @@ int main(int argc, char *argv[])
           group.set_attribute<double>("youngs_modulus", 270000000000.0);
           group.set_attribute<double>("material_a_rho", 3200);
 
-          if (group_name == std::string("displacement"))
+          if (group_name == "displacement")
             group.set_attribute<double>("material_b_rho", 2000);
           else
             group.set_attribute<double>("material_b_rho", 3200);

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.