Skip to content

Commit

Permalink
Remove more warning in simulation control
Browse files Browse the repository at this point in the history
  • Loading branch information
blaisb committed Aug 16, 2024
1 parent e3ed1c0 commit 1ed0261
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
13 changes: 7 additions & 6 deletions include/core/simulation_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class SimulationControl
*
**/

SimulationControl(const Parameters::SimulationControl param);
SimulationControl(const Parameters::SimulationControl &param);

/**
* @brief Pure virtual function to control the progression of the simulation.
Expand Down Expand Up @@ -526,7 +526,7 @@ class SimulationControlTransient : public SimulationControl


public:
SimulationControlTransient(Parameters::SimulationControl param);
SimulationControlTransient(const Parameters::SimulationControl &param);

virtual void
print_progression(const ConditionalOStream &pcout) override;
Expand All @@ -551,7 +551,7 @@ class SimulationControlTransient : public SimulationControl
class SimulationControlTransientDEM : public SimulationControlTransient
{
public:
SimulationControlTransientDEM(Parameters::SimulationControl param);
SimulationControlTransientDEM(const Parameters::SimulationControl &param);

virtual void
print_progression(const ConditionalOStream &pcout) override;
Expand Down Expand Up @@ -579,7 +579,8 @@ class SimulationControlTransientDynamicOutput
calculate_time_step() override;

public:
SimulationControlTransientDynamicOutput(Parameters::SimulationControl param);
SimulationControlTransientDynamicOutput(
const Parameters::SimulationControl &param);


/**
Expand All @@ -593,7 +594,7 @@ class SimulationControlTransientDynamicOutput
class SimulationControlSteady : public SimulationControl
{
public:
SimulationControlSteady(Parameters::SimulationControl param);
SimulationControlSteady(const Parameters::SimulationControl &param);

virtual void
print_progression(const ConditionalOStream &pcout) override;
Expand All @@ -614,7 +615,7 @@ class SimulationControlSteady : public SimulationControl
class SimulationControlAdjointSteady : public SimulationControlTransient
{
public:
SimulationControlAdjointSteady(Parameters::SimulationControl param);
SimulationControlAdjointSteady(const Parameters::SimulationControl &param);

virtual void
print_progression(const ConditionalOStream &pcout) override;
Expand Down
13 changes: 7 additions & 6 deletions source/core/simulation_control.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <sstream>


SimulationControl::SimulationControl(const Parameters::SimulationControl param)
SimulationControl::SimulationControl(const Parameters::SimulationControl &param)
: method(param.method)
, assembly_method(param.method)
, current_time(0)
Expand Down Expand Up @@ -211,7 +211,7 @@ SimulationControl::get_checkpointed_simulation_control_info(
}

SimulationControlTransient::SimulationControlTransient(
Parameters::SimulationControl param)
const Parameters::SimulationControl &param)
: SimulationControl(param)
, adapt(param.adapt)
, adaptative_time_step_scaling(param.adaptative_time_step_scaling)
Expand Down Expand Up @@ -288,7 +288,7 @@ SimulationControlTransient::calculate_time_step()
}

SimulationControlTransientDEM::SimulationControlTransientDEM(
Parameters::SimulationControl param)
const Parameters::SimulationControl &param)
: SimulationControlTransient(param)
{}

Expand All @@ -313,7 +313,8 @@ SimulationControlTransientDEM::print_progression(


SimulationControlTransientDynamicOutput::
SimulationControlTransientDynamicOutput(Parameters::SimulationControl param)
SimulationControlTransientDynamicOutput(
const Parameters::SimulationControl &param)
: SimulationControlTransient(param)
, time_step_forced_output(false)
// To be fixed for restarts
Expand Down Expand Up @@ -368,7 +369,7 @@ SimulationControlTransientDynamicOutput::is_output_iteration()


SimulationControlSteady::SimulationControlSteady(
Parameters::SimulationControl param)
const Parameters::SimulationControl &param)
: SimulationControl(param)
{}

Expand Down Expand Up @@ -439,7 +440,7 @@ SimulationControlAdjointSteady::is_at_end()
}

SimulationControlAdjointSteady::SimulationControlAdjointSteady(
Parameters::SimulationControl param)
const Parameters::SimulationControl &param)
: SimulationControlTransient(param)
{}

Expand Down

0 comments on commit 1ed0261

Please sign in to comment.