mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Remove unused utility class PhasePresence
This commit is contained in:
parent
bcdc974585
commit
5336822242
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user