]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Clear the meaning of inverse output frequency
authorBruno Blais <blais.bruno@gmail.com>
Sun, 2 Jul 2023 18:18:11 +0000 (14:18 -0400)
committerBruno Blais <blais.bruno@gmail.com>
Sun, 2 Jul 2023 18:18:11 +0000 (14:18 -0400)
examples/step-68/parameters.prm
examples/step-68/step-68.cc

index 587898ee1cd631d49aaa94c2c5cadde0b2d7b8e5..3756507e28d02146ab1c4f48b71602a8b14cb554 100644 (file)
@@ -9,13 +9,13 @@ subsection Particle Tracking Problem
   set Output directory              = ./
 
   # Iteration frequency at which output results are written
-  set Output frequency              = 10
+  set Output inverse frequency              = 10
 
   # Refinement of the volumetric mesh used to insert the particles
   set Particle insertion refinement = 3
 
   # Iteration frequency at which the mesh is load balanced
-  set Repartition frequency         = 5
+  set Repartition inverse frequency         = 5
   set Time step                     = 0.002
   set Velocity degree               = 1
 end
index f19595cc90df4f74c3bf155bf48289c7ae47c365..580b05c85bcc185cc48a64db1d845e96a12fdc4f 100644 (file)
@@ -100,15 +100,15 @@ namespace Step68
     // describe the details of the particle tracking simulation and its
     // discretization. The following parameters are about where output should
     // written to, the spatial discretization of the velocity (the default is
-    // $Q_1$), the time step and the output frequency (how many time steps
-    // should elapse before we generate graphical output again):
+    // $Q_1$), the time step and the output inverse frequency (how many time
+    // steps should elapse before we generate graphical output again):
     std::string output_directory = "./";
 
-    unsigned int velocity_degree       = 1;
-    double       time_step             = 0.002;
-    double       final_time            = 4.0;
-    unsigned int output_frequency      = 10;
-    unsigned int repartition_frequency = 5;
+    unsigned int velocity_degree               = 1;
+    double       time_step                     = 0.002;
+    double       final_time                    = 4.0;
+    unsigned int output_inverse_frequency      = 10;
+    unsigned int repartition_inverse_frequency = 5;
 
     // We allow every grid to be refined independently. In this tutorial, no
     // physics is resolved on the fluid grid, and its velocity is calculated
@@ -128,17 +128,19 @@ namespace Step68
     add_parameter(
       "Velocity degree", velocity_degree, "", prm, Patterns::Integer(1));
 
-    add_parameter("Output frequency",
-                  output_frequency,
-                  "Iteration frequency at which output results are written",
-                  prm,
-                  Patterns::Integer(1));
+    add_parameter(
+      "Output inverse frequency",
+      output_inverse_frequency,
+      "Iteration inverse frequency at which output results are written",
+      prm,
+      Patterns::Integer(1));
 
-    add_parameter("Repartition frequency",
-                  repartition_frequency,
-                  "Iteration frequency at which the mesh is load balanced",
-                  prm,
-                  Patterns::Integer(1));
+    add_parameter(
+      "Repartition inverse frequency",
+      repartition_inverse_frequency,
+      "Iteration inverse frequency at which the mesh is load balanced",
+      prm,
+      Patterns::Integer(1));
 
     add_parameter("Output directory", output_directory);
 
@@ -718,7 +720,8 @@ namespace Step68
         discrete_time.advance_time();
         velocity.set_time(discrete_time.get_previous_time());
 
-        if ((discrete_time.get_step_number() % par.repartition_frequency) == 0)
+        if ((discrete_time.get_step_number() %
+             par.repartition_inverse_frequency) == 0)
           {
             particle_handler.prepare_for_coarsening_and_refinement();
             background_triangulation.repartition();
@@ -741,7 +744,8 @@ namespace Step68
         // <code>sort_particles_into_subdomains_and_cells</code>
         particle_handler.sort_particles_into_subdomains_and_cells();
 
-        if ((discrete_time.get_step_number() % par.output_frequency) == 0)
+        if ((discrete_time.get_step_number() % par.output_inverse_frequency) ==
+            0)
           {
             output_particles(discrete_time.get_step_number());
             if (interpolated_velocity)

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.