diff --git a/opm/output/data/Wells.hpp b/opm/output/data/Wells.hpp index b092ec51b..a9800deb1 100644 --- a/opm/output/data/Wells.hpp +++ b/opm/output/data/Wells.hpp @@ -82,8 +82,8 @@ namespace Opm { /// chaining. inline Rates& set( opt m, double value ); - /// true if any option is set; false otherwise - inline bool any() const noexcept; + /// Returns true if any of the rates oil, gas, water is nonzero + inline bool flowing() const; template void write(MessageBufferType& buffer) const; @@ -349,12 +349,15 @@ namespace Opm { ); } - inline bool Rates::any() const noexcept { - return static_cast< enum_size >( this->mask ) != 0; + + bool inline Rates::flowing() const { + return ((this->wat != 0) || + (this->oil != 0) || + (this->gas != 0)); } inline bool Well::flowing() const noexcept { - return this->rates.any(); + return this->rates.flowing(); } template diff --git a/src/opm/output/eclipse/AggregateWellData.cpp b/src/opm/output/eclipse/AggregateWellData.cpp index 509448be4..cbb325afc 100644 --- a/src/opm/output/eclipse/AggregateWellData.cpp +++ b/src/opm/output/eclipse/AggregateWellData.cpp @@ -348,7 +348,7 @@ namespace { std::end (xw.connections), [](const Opm::data::Connection& c) { - return c.rates.any(); + return c.rates.flowing(); }); iWell[Ix::item9] = any_flowing_conn