From 5336822242fe7b56baff766dfb4096b91c66f562 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Mon, 1 Nov 2021 17:06:50 +0100 Subject: [PATCH] Remove unused utility class PhasePresence --- opm/core/props/BlackoilPhases.hpp | 37 ------------------------------- 1 file changed, 37 deletions(-) diff --git a/opm/core/props/BlackoilPhases.hpp b/opm/core/props/BlackoilPhases.hpp index 6eac384cf..c4afddcb8 100644 --- a/opm/core/props/BlackoilPhases.hpp +++ b/opm/core/props/BlackoilPhases.hpp @@ -63,43 +63,6 @@ namespace Opm }; - /// Check or assign presence of a formed, free phase. Limited to - /// the 'BlackoilPhases'. - /// - /// Use a std::vector to represent the conditions - /// in an entire model. - class PhasePresence - { - public: - PhasePresence() - : present_(0) - {} - - bool hasFreeWater() const { return present(BlackoilPhases::Aqua ); } - bool hasFreeOil () const { return present(BlackoilPhases::Liquid); } - bool hasFreeGas () const { return present(BlackoilPhases::Vapour); } - - void setFreeWater() { insert(BlackoilPhases::Aqua ); } - void setFreeOil () { insert(BlackoilPhases::Liquid); } - void setFreeGas () { insert(BlackoilPhases::Vapour); } - - bool operator==(const PhasePresence& other) const { return present_ == other.present_; } - bool operator!=(const PhasePresence& other) const { return !this->operator==(other); } - - private: - unsigned char present_; - - bool present(const BlackoilPhases::PhaseIndex i) const - { - return present_ & (1 << i); - } - - void insert(const BlackoilPhases::PhaseIndex i) - { - present_ |= (1 << i); - } - }; - } // namespace Opm #endif // OPM_BLACKOILPHASES_HEADER_INCLUDED