From fc3c044a4e6bf8af6ccff70b5e873286e3eed240 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Thu, 20 May 2021 12:03:38 +0200 Subject: [PATCH] Remove WellState as base class --- opm/simulators/wells/WellState.hpp | 77 ------------------- .../wells/WellStateFullyImplicitBlackoil.hpp | 25 ++++-- 2 files changed, 19 insertions(+), 83 deletions(-) delete mode 100644 opm/simulators/wells/WellState.hpp diff --git a/opm/simulators/wells/WellState.hpp b/opm/simulators/wells/WellState.hpp deleted file mode 100644 index 3f5250a54..000000000 --- a/opm/simulators/wells/WellState.hpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - Copyright 2012 SINTEF ICT, Applied Mathematics. - - This file is part of the Open Porous Media project (OPM). - - OPM is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OPM is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef OPM_WELLSTATE_HEADER_INCLUDED -#define OPM_WELLSTATE_HEADER_INCLUDED - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -namespace Opm -{ - -class ParallelWellInfo; -class SummaryState; - -/// The state of a set of wells. -class WellState -{ -public: - using mapentry_t = std::array; - using WellMapType = std::map; - - explicit WellState(const PhaseUsage& pu) : - phase_usage_(pu) - {} - - WellState() = default; - WellState(const WellState& rhs) = default; - - virtual ~WellState() = default; - - WellState& operator=(const WellState& rhs) = default; - - -protected: - WellContainer status_; - WellContainer> well_perf_data_; - WellContainer parallel_well_info_; - WellMapType wellMap_; - std::vector bhp_; - std::vector thp_; - std::vector temperature_; - WellContainer> wellrates_; - PhaseUsage phase_usage_; - WellContainer> perfrates_; - WellContainer> perfpress_; -}; - -} // namespace Opm - -#endif // OPM_WELLSTATE_HEADER_INCLUDED diff --git a/opm/simulators/wells/WellStateFullyImplicitBlackoil.hpp b/opm/simulators/wells/WellStateFullyImplicitBlackoil.hpp index f421dd0db..3c6c77f66 100644 --- a/opm/simulators/wells/WellStateFullyImplicitBlackoil.hpp +++ b/opm/simulators/wells/WellStateFullyImplicitBlackoil.hpp @@ -21,11 +21,12 @@ #ifndef OPM_WELLSTATEFULLYIMPLICITBLACKOIL_HEADER_INCLUDED #define OPM_WELLSTATEFULLYIMPLICITBLACKOIL_HEADER_INCLUDED -#include #include #include #include #include +#include +#include #include #include @@ -46,12 +47,12 @@ class Schedule; /// The state of a set of wells, tailored for use by the fully /// implicit blackoil simulator. class WellStateFullyImplicitBlackoil - : public WellState { - typedef WellState BaseType; public: + using mapentry_t = std::array; + using WellMapType = std::map; + static const uint64_t event_mask = ScheduleEvents::WELL_STATUS_CHANGE + ScheduleEvents::PRODUCTION_UPDATE + ScheduleEvents::INJECTION_UPDATE; - typedef BaseType :: WellMapType WellMapType; virtual ~WellStateFullyImplicitBlackoil() = default; @@ -60,9 +61,9 @@ public: static const int Oil = BlackoilPhases::Liquid; static const int Gas = BlackoilPhases::Vapour; - explicit WellStateFullyImplicitBlackoil(const PhaseUsage& pu) : - WellState(pu) + explicit WellStateFullyImplicitBlackoil(const PhaseUsage& pu) { + this->phase_usage_ = pu; } const WellMapType& wellMap() const { return wellMap_; } @@ -439,6 +440,18 @@ public: private: + WellContainer status_; + WellContainer> well_perf_data_; + WellContainer parallel_well_info_; + WellMapType wellMap_; + std::vector bhp_; + std::vector thp_; + std::vector temperature_; + WellContainer> wellrates_; + PhaseUsage phase_usage_; + WellContainer> perfrates_; + WellContainer> perfpress_; + std::vector perfphaserates_; WellContainer is_producer_; // Size equal to number of local wells.