Skip to content

Commit

Permalink
Update name of end time parameter in simulation control
Browse files Browse the repository at this point in the history
  • Loading branch information
lpsaavedra committed Nov 8, 2024
1 parent a2d8068 commit 6c28487
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion include/core/parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions source/core/parameters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion source/core/simulation_control.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SimulationControl::SimulationControl(const Parameters::SimulationControl &param)
, 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)
Expand Down
2 changes: 1 addition & 1 deletion tests/core/simulation_control_01.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/core/simulation_control_02.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions tests/core/simulation_control_03.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/core/simulation_control_04.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/core/simulation_control_05.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/core/specific_heat_phase_change_01.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions tests/solvers/average_velocities_01.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions tests/solvers/average_velocities_02.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions tests/solvers/average_velocities_03.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions tests/solvers/reynolds_stress_01.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions tests/solvers/reynolds_stress_02.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions tests/solvers/reynolds_stress_03.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -81,7 +81,7 @@ test()
LinearAlgebra::distributed::Vector<double> 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;
Expand Down

0 comments on commit 6c28487

Please sign in to comment.