]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Change inverse frequency to interval 15594/head
authorBruno Blais <blais.bruno@gmail.com>
Mon, 3 Jul 2023 03:25:25 +0000 (23:25 -0400)
committerBruno Blais <blais.bruno@gmail.com>
Mon, 3 Jul 2023 03:25:25 +0000 (23:25 -0400)
examples/step-68/parameters.prm
examples/step-68/step-68.cc

index 3756507e28d02146ab1c4f48b71602a8b14cb554..b7f9d6340df4cc5740db18c67b7b5c2fb2053c00 100644 (file)
@@ -9,13 +9,13 @@ subsection Particle Tracking Problem
   set Output directory              = ./
 
   # Iteration frequency at which output results are written
-  set Output inverse frequency              = 10
+  set Output interval               = 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 inverse frequency         = 5
+  set Repartition interval          = 5
   set Time step                     = 0.002
   set Velocity degree               = 1
 end
index 580b05c85bcc185cc48a64db1d845e96a12fdc4f..47680ef3956a6fcc395a2e538e81c2244271012e 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 inverse frequency (how many time
+    // $Q_1$), the time step and the output interval (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_inverse_frequency      = 10;
-    unsigned int repartition_inverse_frequency = 5;
+    unsigned int velocity_degree      = 1;
+    double       time_step            = 0.002;
+    double       final_time           = 4.0;
+    unsigned int output_interval      = 10;
+    unsigned int repartition_interval = 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,19 +128,17 @@ namespace Step68
     add_parameter(
       "Velocity degree", velocity_degree, "", 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("Output interval",
+                  output_interval,
+                  "Iteration interval between which output results are written",
+                  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("Repartition interval",
+                  repartition_interval,
+                  "Iteration interval at which the mesh is load balanced",
+                  prm,
+                  Patterns::Integer(1));
 
     add_parameter("Output directory", output_directory);
 
@@ -720,8 +718,7 @@ namespace Step68
         discrete_time.advance_time();
         velocity.set_time(discrete_time.get_previous_time());
 
-        if ((discrete_time.get_step_number() %
-             par.repartition_inverse_frequency) == 0)
+        if ((discrete_time.get_step_number() % par.repartition_interval) == 0)
           {
             particle_handler.prepare_for_coarsening_and_refinement();
             background_triangulation.repartition();
@@ -744,8 +741,7 @@ 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_inverse_frequency) ==
-            0)
+        if ((discrete_time.get_step_number() % par.output_interval) == 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.