From 60c5fab82d2d88932097bee308b8ece5daee682a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20H=C3=A6gland?= Date: Mon, 8 Mar 2021 16:08:00 +0100 Subject: [PATCH] Fix unused variable warnings. --- opm/simulators/flow/BlackoilModelEbos.hpp | 4 +--- opm/simulators/wells/GasLiftStage2_impl.hpp | 3 +-- opm/simulators/wells/GasLiftWellState.hpp | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/opm/simulators/flow/BlackoilModelEbos.hpp b/opm/simulators/flow/BlackoilModelEbos.hpp index 85309b774..856416441 100644 --- a/opm/simulators/flow/BlackoilModelEbos.hpp +++ b/opm/simulators/flow/BlackoilModelEbos.hpp @@ -416,13 +416,11 @@ namespace Opm { /// \param[in] reservoir_state reservoir state variables /// \param[in, out] well_state well state variables /// \param[in] initial_assembly pass true if this is the first call to assemble() in this timestep - SimulatorReportSingle assembleReservoir(const SimulatorTimerInterface &/*timer */, + SimulatorReportSingle assembleReservoir(const SimulatorTimerInterface& /* timer */, const int iterationIdx) { // -------- Mass balance equations -------- - //auto stepNum = timer.currentStepNum(); ebosSimulator_.model().newtonMethod().setIterationIndex(iterationIdx); - //ebosSimulator_.model().newtonMethod().setCurrentTimeStep(stepNum); ebosSimulator_.problem().beginIteration(); ebosSimulator_.model().linearizer().linearizeDomain(); ebosSimulator_.problem().endIteration(); diff --git a/opm/simulators/wells/GasLiftStage2_impl.hpp b/opm/simulators/wells/GasLiftStage2_impl.hpp index 5f9310463..2213d00fa 100644 --- a/opm/simulators/wells/GasLiftStage2_impl.hpp +++ b/opm/simulators/wells/GasLiftStage2_impl.hpp @@ -113,7 +113,6 @@ addOrRemoveALQincrement_(GradMap &grad_map, const std::string well_name, bool ad state.update(gi.new_oil_rate, gi.oil_is_limited, gi.new_gas_rate, gi.gas_is_limited, gi.alq, gi.alq_is_limited, add); - //gs_well.updateStage2State(gi, add); this->well_state_.setALQ(well_name, gi.alq); } @@ -702,7 +701,7 @@ GasLiftStage2:: saveGrad_(GradMap &map, const std::string &name, GradInfo &grad) { if (auto it = map.find(name); it == map.end()) { - auto result = map.emplace(name, grad); + [[maybe_unused]] auto result = map.emplace(name, grad); assert(result.second); // the insert was successful } else { diff --git a/opm/simulators/wells/GasLiftWellState.hpp b/opm/simulators/wells/GasLiftWellState.hpp index 1187b5b94..3cc63f5ad 100644 --- a/opm/simulators/wells/GasLiftWellState.hpp +++ b/opm/simulators/wells/GasLiftWellState.hpp @@ -31,7 +31,7 @@ namespace Opm class GasLiftWellState { public: - GasLiftWellState() { } + //GasLiftWellState() { } GasLiftWellState(double oil_rate, bool oil_is_limited, double gas_rate, bool gas_is_limited, double alq, bool alq_is_limited, std::optional increase) :