From 6c2848712d35bbfa082016a904207ecab54a95f5 Mon Sep 17 00:00:00 2001 From: Laura Prieto Saavedra Date: Fri, 8 Nov 2024 11:24:31 -0500 Subject: [PATCH] Update name of end time parameter in simulation control --- include/core/parameters.h | 2 +- source/core/parameters.cc | 6 +++--- source/core/simulation_control.cc | 2 +- tests/core/simulation_control_01.cc | 2 +- tests/core/simulation_control_02.cc | 2 +- tests/core/simulation_control_03.cc | 10 +++++----- tests/core/simulation_control_04.cc | 2 +- tests/core/simulation_control_05.cc | 2 +- tests/core/specific_heat_phase_change_01.cc | 2 +- tests/solvers/average_velocities_01.cc | 4 ++-- tests/solvers/average_velocities_02.cc | 4 ++-- tests/solvers/average_velocities_03.cc | 4 ++-- tests/solvers/reynolds_stress_01.cc | 4 ++-- tests/solvers/reynolds_stress_02.cc | 4 ++-- tests/solvers/reynolds_stress_03.cc | 4 ++-- 15 files changed, 27 insertions(+), 27 deletions(-) diff --git a/include/core/parameters.h b/include/core/parameters.h index 2f053e96dc..246556b934 100644 --- a/include/core/parameters.h +++ b/include/core/parameters.h @@ -94,7 +94,7 @@ namespace Parameters double dt; // End time - double timeEnd; + double time_end; // Boolean to keep the time step for the last iteration regardless of the // end time specify. Both for fixed time step and adaptive time step. diff --git a/source/core/parameters.cc b/source/core/parameters.cc index add539579f..12c3240cb7 100644 --- a/source/core/parameters.cc +++ b/source/core/parameters.cc @@ -238,9 +238,9 @@ namespace Parameters { std::runtime_error("Invalid output control scheme"); } - dt = prm.get_double("time step"); - timeEnd = prm.get_double("time end"); - adapt = prm.get_bool("adapt"); + dt = prm.get_double("time step"); + time_end = prm.get_double("time end"); + adapt = prm.get_bool("adapt"); time_step_independent_of_end_time = prm.get_bool("time step independent of end time"); maxCFL = prm.get_double("max cfl"); diff --git a/source/core/simulation_control.cc b/source/core/simulation_control.cc index fe8c690564..670407f922 100644 --- a/source/core/simulation_control.cc +++ b/source/core/simulation_control.cc @@ -15,7 +15,7 @@ SimulationControl::SimulationControl(const Parameters::SimulationControl ¶m) , current_time(0) , time_step(param.dt) , initial_time_step(param.dt) - , end_time(param.timeEnd) + , end_time(param.time_end) , time_step_independent_of_end_time(param.time_step_independent_of_end_time) , iteration_number(0) , number_mesh_adapt(param.number_mesh_adaptation) diff --git a/tests/core/simulation_control_01.cc b/tests/core/simulation_control_01.cc index 576629d3ed..7af5789e64 100644 --- a/tests/core/simulation_control_01.cc +++ b/tests/core/simulation_control_01.cc @@ -22,7 +22,7 @@ test() simulationControlParameters.maxCFL = 99; simulationControlParameters.method = Parameters::SimulationControl::TimeSteppingMethod::bdf1; - simulationControlParameters.timeEnd = 999; + simulationControlParameters.time_end = 999; simulationControlParameters.number_mesh_adaptation = 9; simulationControlParameters.output_name = "test"; simulationControlParameters.subdivision = 7; diff --git a/tests/core/simulation_control_02.cc b/tests/core/simulation_control_02.cc index 8f519be370..1dd25d757f 100644 --- a/tests/core/simulation_control_02.cc +++ b/tests/core/simulation_control_02.cc @@ -24,7 +24,7 @@ test() simulationControlParameters.method = Parameters::SimulationControl::TimeSteppingMethod::bdf1; - simulationControlParameters.timeEnd = 999; + simulationControlParameters.time_end = 999; simulationControlParameters.number_mesh_adaptation = 9; simulationControlParameters.output_name = "test"; simulationControlParameters.subdivision = 7; diff --git a/tests/core/simulation_control_03.cc b/tests/core/simulation_control_03.cc index 0f10f49a6b..ff022afa41 100644 --- a/tests/core/simulation_control_03.cc +++ b/tests/core/simulation_control_03.cc @@ -22,7 +22,7 @@ test() simulation_control_parameters.maxCFL = 2; simulation_control_parameters.method = Parameters::SimulationControl::TimeSteppingMethod::bdf1; - simulation_control_parameters.timeEnd = 0.5; + simulation_control_parameters.time_end = 0.5; simulation_control_parameters.output_control = Parameters::SimulationControl::OutputControl::iteration; simulation_control_parameters.output_iteration_frequency = 2; @@ -156,7 +156,7 @@ test() { simulation_control_parameters.adapt = true; - simulation_control_parameters.timeEnd = 20; + simulation_control_parameters.time_end = 20; simulation_control_parameters.dt = 1; simulation_control_parameters.adaptative_time_step_scaling = 1.2; simulation_control_parameters.maxCFL = 2; @@ -197,7 +197,7 @@ test() } { simulation_control_parameters.adapt = true; - simulation_control_parameters.timeEnd = 25; + simulation_control_parameters.time_end = 25; simulation_control_parameters.dt = 1; simulation_control_parameters.adaptative_time_step_scaling = 1.2; simulation_control_parameters.maxCFL = 2; @@ -239,7 +239,7 @@ test() { simulation_control_parameters.adapt = true; - simulation_control_parameters.timeEnd = 25; + simulation_control_parameters.time_end = 25; simulation_control_parameters.dt = 1; simulation_control_parameters.adaptative_time_step_scaling = 1.2; simulation_control_parameters.maxCFL = 2; @@ -281,7 +281,7 @@ test() { simulation_control_parameters.adapt = true; - simulation_control_parameters.timeEnd = 25; + simulation_control_parameters.time_end = 25; simulation_control_parameters.dt = 1; simulation_control_parameters.adaptative_time_step_scaling = 1.2; simulation_control_parameters.maxCFL = 2; diff --git a/tests/core/simulation_control_04.cc b/tests/core/simulation_control_04.cc index 2951a87ff0..c62cc2f205 100644 --- a/tests/core/simulation_control_04.cc +++ b/tests/core/simulation_control_04.cc @@ -25,7 +25,7 @@ test() Parameters::SimulationControl::TimeSteppingMethod::bdf1; simulation_control_parameters.time_step_independent_of_end_time = true; - simulation_control_parameters.timeEnd = 20; + simulation_control_parameters.time_end = 20; simulation_control_parameters.number_mesh_adaptation = 0; simulation_control_parameters.output_name = "test"; simulation_control_parameters.subdivision = 7; diff --git a/tests/core/simulation_control_05.cc b/tests/core/simulation_control_05.cc index 3568e8566c..022549947d 100644 --- a/tests/core/simulation_control_05.cc +++ b/tests/core/simulation_control_05.cc @@ -23,7 +23,7 @@ test() simulation_control_parameters.startup_timestep_scaling = 0.4; simulation_control_parameters.bdf_startup_method = Parameters::SimulationControl::BDFStartupMethods::multiple_step_bdf; - simulation_control_parameters.timeEnd = 4; + simulation_control_parameters.time_end = 4; simulation_control_parameters.number_mesh_adaptation = 0; simulation_control_parameters.output_name = "test"; simulation_control_parameters.subdivision = 7; diff --git a/tests/core/specific_heat_phase_change_01.cc b/tests/core/specific_heat_phase_change_01.cc index eb64ad2669..f77833ae84 100644 --- a/tests/core/specific_heat_phase_change_01.cc +++ b/tests/core/specific_heat_phase_change_01.cc @@ -44,7 +44,7 @@ test() simulationControlParameters.maxCFL = 99; simulationControlParameters.method = Parameters::SimulationControl::TimeSteppingMethod::bdf1; - simulationControlParameters.timeEnd = 999; + simulationControlParameters.time_end = 999; simulationControlParameters.number_mesh_adaptation = 9; simulationControlParameters.output_name = "test"; simulationControlParameters.subdivision = 7; diff --git a/tests/solvers/average_velocities_01.cc b/tests/solvers/average_velocities_01.cc index a21e3874d3..9dcf8a11dd 100644 --- a/tests/solvers/average_velocities_01.cc +++ b/tests/solvers/average_velocities_01.cc @@ -37,7 +37,7 @@ test() simulation_control_parameters.method = Parameters::SimulationControl::TimeSteppingMethod::bdf1; simulation_control_parameters.dt = 0.1; - simulation_control_parameters.timeEnd = 1.0; + simulation_control_parameters.time_end = 1.0; simulation_control_parameters.adapt = false; simulation_control_parameters.time_step_independent_of_end_time = true; @@ -74,7 +74,7 @@ test() GlobalVectorType average_solution; // Time info - const double time_end = simulation_control_parameters.timeEnd; + const double time_end = simulation_control_parameters.time_end; const double initial_time = postprocessing_parameters.initial_time; double time = simulation_control->get_current_time(); double epsilon = 1e-6; diff --git a/tests/solvers/average_velocities_02.cc b/tests/solvers/average_velocities_02.cc index c0947eb22e..b0d7f7d9c5 100644 --- a/tests/solvers/average_velocities_02.cc +++ b/tests/solvers/average_velocities_02.cc @@ -39,7 +39,7 @@ test() simulation_control_parameters.method = Parameters::SimulationControl::TimeSteppingMethod::bdf1; simulation_control_parameters.dt = 0.1; - simulation_control_parameters.timeEnd = 1.0; + simulation_control_parameters.time_end = 1.0; simulation_control_parameters.output_iteration_frequency = 1; simulation_control_parameters.adapt = true; simulation_control_parameters.adaptative_time_step_scaling = 0.95; @@ -84,7 +84,7 @@ test() GlobalBlockVectorType average_solution(locally_owned_dofs, mpi_communicator); // Time and output info - const double time_end = simulation_control_parameters.timeEnd; + const double time_end = simulation_control_parameters.time_end; const double initial_time = postprocessing_parameters.initial_time; double time = simulation_control->get_current_time(); double dt = 0.0; diff --git a/tests/solvers/average_velocities_03.cc b/tests/solvers/average_velocities_03.cc index cafac32523..f9b992e725 100644 --- a/tests/solvers/average_velocities_03.cc +++ b/tests/solvers/average_velocities_03.cc @@ -35,7 +35,7 @@ test() simulation_control_parameters.method = Parameters::SimulationControl::TimeSteppingMethod::bdf1; simulation_control_parameters.dt = 0.1; - simulation_control_parameters.timeEnd = 1.0; + simulation_control_parameters.time_end = 1.0; simulation_control_parameters.adapt = false; simulation_control_parameters.time_step_independent_of_end_time = true; @@ -79,7 +79,7 @@ test() // average_solution.update_ghost_values(); // Time and output info - const double time_end = simulation_control_parameters.timeEnd; + const double time_end = simulation_control_parameters.time_end; const double initial_time = postprocessing_parameters.initial_time; double time = simulation_control->get_current_time(); const double epsilon = 1e-6; diff --git a/tests/solvers/reynolds_stress_01.cc b/tests/solvers/reynolds_stress_01.cc index 9c20b97bfe..84873ea01a 100644 --- a/tests/solvers/reynolds_stress_01.cc +++ b/tests/solvers/reynolds_stress_01.cc @@ -39,7 +39,7 @@ test() simulation_control_parameters.method = Parameters::SimulationControl::TimeSteppingMethod::bdf1; simulation_control_parameters.dt = 0.1; - simulation_control_parameters.timeEnd = 1.0; + simulation_control_parameters.time_end = 1.0; simulation_control_parameters.adapt = false; simulation_control_parameters.time_step_independent_of_end_time = true; @@ -83,7 +83,7 @@ test() GlobalVectorType reynolds_shear_stresses; // Time info - const double time_end = simulation_control_parameters.timeEnd; + const double time_end = simulation_control_parameters.time_end; const double initial_time = postprocessing_parameters.initial_time; double time = simulation_control->get_current_time(); double epsilon = 1e-6; diff --git a/tests/solvers/reynolds_stress_02.cc b/tests/solvers/reynolds_stress_02.cc index ec212f6617..8f9adbdd10 100644 --- a/tests/solvers/reynolds_stress_02.cc +++ b/tests/solvers/reynolds_stress_02.cc @@ -40,7 +40,7 @@ test() simulation_control_parameters.method = Parameters::SimulationControl::TimeSteppingMethod::bdf1; simulation_control_parameters.dt = 0.1; - simulation_control_parameters.timeEnd = 1.0; + simulation_control_parameters.time_end = 1.0; simulation_control_parameters.adapt = true; simulation_control_parameters.adaptative_time_step_scaling = 0.99; simulation_control_parameters.max_dt = 1e6; @@ -92,7 +92,7 @@ test() GlobalBlockVectorType reynolds_shear_stresses; // Time info - const double time_end = simulation_control_parameters.timeEnd; + const double time_end = simulation_control_parameters.time_end; const double initial_time = postprocessing_parameters.initial_time; double time = simulation_control->get_current_time(); double dt = 0.0; diff --git a/tests/solvers/reynolds_stress_03.cc b/tests/solvers/reynolds_stress_03.cc index dfbb83e28b..10a033459e 100644 --- a/tests/solvers/reynolds_stress_03.cc +++ b/tests/solvers/reynolds_stress_03.cc @@ -35,7 +35,7 @@ test() simulation_control_parameters.method = Parameters::SimulationControl::TimeSteppingMethod::bdf1; simulation_control_parameters.dt = 0.1; - simulation_control_parameters.timeEnd = 1.0; + simulation_control_parameters.time_end = 1.0; simulation_control_parameters.adapt = false; simulation_control_parameters.time_step_independent_of_end_time = true; @@ -81,7 +81,7 @@ test() LinearAlgebra::distributed::Vector reynolds_shear_stresses; // Time info - const double time_end = simulation_control_parameters.timeEnd; + const double time_end = simulation_control_parameters.time_end; const double initial_time = postprocessing_parameters.initial_time; double time = simulation_control->get_current_time(); double epsilon = 1e-6;