add equality operator to WellFoamProperties

This commit is contained in:
Arne Morten Kvarving
2019-12-10 13:58:53 +01:00
parent 72cd4cf1ad
commit 0e8ae81440
2 changed files with 6 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ struct WellFoamProperties
{
double m_foamConcentration = 0.0;
void handleWFOAM(const DeckRecord& rec);
bool operator==(const WellFoamProperties& other) const;
bool operator!=(const WellFoamProperties& other) const;
};

View File

@@ -27,6 +27,11 @@ void Opm::WellFoamProperties::handleWFOAM(const DeckRecord& rec)
this->m_foamConcentration = rec.getItem("FOAM_CONCENTRATION").get<UDAValue>(0).get<double>();
}
bool Opm::WellFoamProperties::operator==(const WellFoamProperties& other) const
{
return this->m_foamConcentration == other.m_foamConcentration;
}
bool Opm::WellFoamProperties::operator!=(const WellFoamProperties& other) const
{
return this->m_foamConcentration != other.m_foamConcentration;