]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make a function simpler to read. 10265/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 19 May 2020 00:20:54 +0000 (18:20 -0600)
committerMatthias Maier <tamiko@43-1.org>
Tue, 19 May 2020 01:21:30 +0000 (20:21 -0500)
examples/step-70/step-70.cc

index b990664b247d7a775c78fa5ac45b31915aced042..7ab7f5faff639dd8c16da9a9b509350f2bb4ee0a 100644 (file)
@@ -386,46 +386,51 @@ namespace Step70
     // passive tracers.
     enter_my_subsection(this->prm);
     this->prm.enter_subsection("Grid generation");
-    this->prm.add_parameter("Fluid grid generator", name_of_fluid_grid);
-    this->prm.add_parameter("Fluid grid generator arguments",
-                            arguments_for_fluid_grid);
+    {
+      this->prm.add_parameter("Fluid grid generator", name_of_fluid_grid);
+      this->prm.add_parameter("Fluid grid generator arguments",
+                              arguments_for_fluid_grid);
 
-    this->prm.add_parameter("Solid grid generator", name_of_solid_grid);
-    this->prm.add_parameter("Solid grid generator arguments",
-                            arguments_for_solid_grid);
+      this->prm.add_parameter("Solid grid generator", name_of_solid_grid);
+      this->prm.add_parameter("Solid grid generator arguments",
+                              arguments_for_solid_grid);
 
-    this->prm.add_parameter("Particle grid generator", name_of_particle_grid);
-    this->prm.add_parameter("Particle grid generator arguments",
-                            arguments_for_particle_grid);
+      this->prm.add_parameter("Particle grid generator", name_of_particle_grid);
+      this->prm.add_parameter("Particle grid generator arguments",
+                              arguments_for_particle_grid);
+    }
     this->prm.leave_subsection();
-
     leave_my_subsection(this->prm);
 
 
 
     enter_my_subsection(this->prm);
     this->prm.enter_subsection("Refinement and remeshing");
-    this->prm.add_parameter("Refinement step frequency", refinement_frequency);
-    this->prm.add_parameter("Refinement maximal level", max_level_refinement);
-    this->prm.add_parameter("Refinement minimal level", min_level_refinement);
-    this->prm.add_parameter("Refinement strategy",
-                            refinement_strategy,
-                            "",
-                            Patterns::Selection("fixed_fraction|fixed_number"));
-    this->prm.add_parameter("Refinement coarsening fraction",
-                            coarsening_fraction);
-    this->prm.add_parameter("Refinement fraction", refinement_fraction);
-    this->prm.add_parameter("Maximum number of cells", max_cells);
-
+    {
+      this->prm.add_parameter("Refinement step frequency",
+                              refinement_frequency);
+      this->prm.add_parameter("Refinement maximal level", max_level_refinement);
+      this->prm.add_parameter("Refinement minimal level", min_level_refinement);
+      this->prm.add_parameter("Refinement strategy",
+                              refinement_strategy,
+                              "",
+                              Patterns::Selection(
+                                "fixed_fraction|fixed_number"));
+      this->prm.add_parameter("Refinement coarsening fraction",
+                              coarsening_fraction);
+      this->prm.add_parameter("Refinement fraction", refinement_fraction);
+      this->prm.add_parameter("Maximum number of cells", max_cells);
+    }
     this->prm.leave_subsection();
     leave_my_subsection(this->prm);
 
-    // correct the default dimension for the rhs function
+    // The final task is to correct the default dimension for the right hand
+    // side function and define a meaningful default angular velocity instead of
+    // zero.
     rhs.declare_parameters_call_back.connect([&]() {
       Functions::ParsedFunction<spacedim>::declare_parameters(this->prm,
                                                               spacedim + 1);
     });
-    // and define a meaningful default angular velocity instead of zero
     angular_velocity.declare_parameters_call_back.connect([&]() {
       this->prm.set("Function expression",
                     "t < .500001 ? 6.283185 : -6.283185");

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.