Skip to content

Commit

Permalink
[DEV] Minor improvement for var looping
Browse files Browse the repository at this point in the history
  • Loading branch information
payetvin committed Sep 25, 2023
1 parent bbe7c31 commit 4703653
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/solver/hydro/monthly/h2o_m_ajouter_bruit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ void H2O_M_AjouterBruitAuCout(DONNEES_ANNUELLES& DonneesAnnuelles)
&CorrespondanceDesVariables.NumeroDeVariableDEcartPositifAuTurbineCible,
&CorrespondanceDesVariables.NumeroDeVariableDEcartNegatifAuTurbineCible};

for (const auto variable : monthlyVariables)
for (const auto& variable : monthlyVariables)
{
for (int Pdt = 0; Pdt < DonneesAnnuelles.NombreDePasDeTemps; Pdt++)
for (const auto& v : *variable)
{
int Var = (*variable)[Pdt];
int Var = v;
CoutLineaireBruite[Var]
= CoutLineaire[Var] + noiseGenerator() * Constants::noiseAmplitude;
}
Expand Down

0 comments on commit 4703653

Please sign in to comment.