Add operator== and operator!= to PhasePresence.

This makes it simpler to write code debugging or inspecting changed phase configurations.
This commit is contained in:
Atgeirr Flø Rasmussen 2016-06-15 08:57:20 +02:00
parent ec3d7e7702
commit b0c6e43cf8

View File

@ -60,6 +60,9 @@ namespace Opm
void setFreeOil () { insert(BlackoilPhases::Liquid); }
void setFreeGas () { insert(BlackoilPhases::Vapour); }
bool operator==(const PhasePresence& other) { return present_ == other.present_; }
bool operator!=(const PhasePresence& other) { return !this->operator==(other); }
private:
unsigned char present_;