From 52877883d8adc8731b49fa9b61c6047f383afa91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Thu, 3 Jun 2021 13:01:56 +0200 Subject: [PATCH 1/3] Add virtual destructor for base class. --- ebos/eclgenericoutputblackoilmodule.hh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ebos/eclgenericoutputblackoilmodule.hh b/ebos/eclgenericoutputblackoilmodule.hh index 865fbc9e1..b2e7529b1 100644 --- a/ebos/eclgenericoutputblackoilmodule.hh +++ b/ebos/eclgenericoutputblackoilmodule.hh @@ -135,6 +135,9 @@ public: return this->initialInplace_.value(); } + // Virtual destructor for safer inheritance. + virtual ~EclGenericOutputBlackoilModule() = default; + protected: using ScalarBuffer = std::vector; using StringBuffer = std::vector; From 8e6e1c3d5ea0dbf9dc0ae197a450976db7d2d99a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Thu, 3 Jun 2021 13:02:31 +0200 Subject: [PATCH 2/3] Remove unused PhaseUsage data member. --- opm/simulators/wells/BlackoilWellModel_impl.hpp | 1 - opm/simulators/wells/GasLiftStage2.cpp | 2 -- opm/simulators/wells/GasLiftStage2.hpp | 2 -- 3 files changed, 5 deletions(-) diff --git a/opm/simulators/wells/BlackoilWellModel_impl.hpp b/opm/simulators/wells/BlackoilWellModel_impl.hpp index da495f39e..67c07cba9 100644 --- a/opm/simulators/wells/BlackoilWellModel_impl.hpp +++ b/opm/simulators/wells/BlackoilWellModel_impl.hpp @@ -1110,7 +1110,6 @@ namespace Opm { GasLiftStage2 glift {this->ebosSimulator_.episodeIndex(), this->ebosSimulator_.vanguard().grid().comm(), - this->phaseUsage(), ebosSimulator_.vanguard().schedule(), ebosSimulator_.vanguard().summaryState(), deferred_logger, this->wellState(), diff --git a/opm/simulators/wells/GasLiftStage2.cpp b/opm/simulators/wells/GasLiftStage2.cpp index 6fd56379f..4c96cc812 100644 --- a/opm/simulators/wells/GasLiftStage2.cpp +++ b/opm/simulators/wells/GasLiftStage2.cpp @@ -40,7 +40,6 @@ namespace Opm { GasLiftStage2::GasLiftStage2( const int report_step_idx, const Communication& comm, - const PhaseUsage& phase_usage, const Schedule& schedule, const SummaryState& summary_state, DeferredLogger &deferred_logger, @@ -57,7 +56,6 @@ GasLiftStage2::GasLiftStage2( report_step_idx_{report_step_idx}, summary_state_{summary_state}, schedule_{schedule}, - phase_usage_{phase_usage}, glo_{schedule_.glo(report_step_idx_)}, comm_{comm}, debug_{false} diff --git a/opm/simulators/wells/GasLiftStage2.hpp b/opm/simulators/wells/GasLiftStage2.hpp index 0cf5a5d31..d7f261e8b 100644 --- a/opm/simulators/wells/GasLiftStage2.hpp +++ b/opm/simulators/wells/GasLiftStage2.hpp @@ -67,7 +67,6 @@ class WellState; GasLiftStage2( const int report_step_idx, const Communication& comm, - const PhaseUsage& phase_usage, const Schedule& schedule, const SummaryState& summary_state, DeferredLogger &deferred_logger, @@ -136,7 +135,6 @@ class WellState; int report_step_idx_; const SummaryState &summary_state_; const Schedule &schedule_; - const PhaseUsage &phase_usage_; const GasLiftOpt& glo_; const Communication &comm_; GradMap inc_grads_; From be0515dcba841389b3b57a8cc4575d8e31c1e39c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Thu, 3 Jun 2021 13:19:43 +0200 Subject: [PATCH 3/3] Avoid warning by defining static variable inline. --- ebos/eclgenericproblem.cc | 3 --- ebos/eclgenericproblem.hh | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/ebos/eclgenericproblem.cc b/ebos/eclgenericproblem.cc index 14aef4009..b27b07836 100644 --- a/ebos/eclgenericproblem.cc +++ b/ebos/eclgenericproblem.cc @@ -51,9 +51,6 @@ namespace Opm { -template -std::string EclGenericProblem::briefDescription_; - template EclGenericProblem:: EclGenericProblem(const EclipseState& eclState, diff --git a/ebos/eclgenericproblem.hh b/ebos/eclgenericproblem.hh index 9958bde35..8ca65ec9d 100644 --- a/ebos/eclgenericproblem.hh +++ b/ebos/eclgenericproblem.hh @@ -251,7 +251,7 @@ protected: const Schedule& schedule_; const GridView& gridView_; - static std::string briefDescription_; + static inline std::string briefDescription_; std::array, 2> referencePorosity_; std::vector pvtnum_;