Add Empty Predicate to WellSegments Collection

Will be useful when deciding whether or not to collect segment
information in the RFT file.
This commit is contained in:
Bård Skaflestad 2022-10-10 11:48:01 +02:00
parent c7dc6de3b3
commit 56a53d4bde
2 changed files with 5 additions and 0 deletions

View File

@ -74,6 +74,7 @@ namespace Opm {
static WellSegments serializationTestObject();
std::size_t size() const;
bool empty() const;
double depthTopSegment() const;
double lengthTopSegment() const;
double volumeTopSegment() const;

View File

@ -73,6 +73,10 @@ namespace Opm {
return m_segments.size();
}
bool WellSegments::empty() const {
return this->m_segments.empty();
}
const Segment& WellSegments::topSegment() const {
return this->m_segments[0];
}