From: Bruno Blais Date: Mon, 3 Jul 2023 03:25:25 +0000 (-0400) Subject: Change inverse frequency to interval X-Git-Tag: relicensing~785^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15594%2Fhead;p=dealii.git Change inverse frequency to interval --- diff --git a/examples/step-68/parameters.prm b/examples/step-68/parameters.prm index 3756507e28..b7f9d6340d 100644 --- a/examples/step-68/parameters.prm +++ b/examples/step-68/parameters.prm @@ -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 diff --git a/examples/step-68/step-68.cc b/examples/step-68/step-68.cc index 580b05c85b..47680ef395 100644 --- a/examples/step-68/step-68.cc +++ b/examples/step-68/step-68.cc @@ -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 // sort_particles_into_subdomains_and_cells 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)