Remove unused utility class PhasePresence

This commit is contained in:
Joakim Hove 2021-11-01 17:06:50 +01:00
parent bcdc974585
commit 5336822242

View File

@ -63,43 +63,6 @@ namespace Opm
};
/// Check or assign presence of a formed, free phase. Limited to
/// the 'BlackoilPhases'.
///
/// Use a std::vector<PhasePresence> 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