20#ifndef SEGMENT_MATCHER_HPP
21#define SEGMENT_MATCHER_HPP
59 std::string_view
well()
const {
return this->well_; }
71 std::string_view well_{};
78 WellSegmentRange() =
default;
90 std::string_view
well)
105 return this->segments_.empty();
117 return this->segments_.size() == std::vector<int>::size_type{1};
123 std::vector<std::string_view>
wells()
const;
130 return this->wells_.size();
157 std::vector<std::string> wells_{};
163 std::vector<std::vector<std::string>::size_type> wellNameIndex_{};
166 std::vector<std::vector<int>::size_type> segmentStart_{};
170 std::vector<int> segments_{};
175 void establishNameLookupIndex();
185 void addWellSegments(
const std::string& well,
222 SetDescriptor() =
default;
231 SetDescriptor& segmentNumber(
const int segNum);
244 SetDescriptor& segmentNumber(std::string_view segNum);
249 const std::optional<int>& segmentNumber()
const
251 return this->segmentNumber_;
259 SetDescriptor& wellNames(std::string_view wellNamePattern);
265 const std::optional<std::string>& wellNames()
const
267 return this->wellNamePattern_;
273 std::optional<std::string> wellNamePattern_{};
277 std::optional<int> segmentNumber_{};
283 SegmentMatcher() =
delete;
290 explicit SegmentMatcher(
const ScheduleState& mswInputData);
297 SegmentMatcher(
const SegmentMatcher& rhs) =
delete;
302 SegmentMatcher(SegmentMatcher&& rhs);
311 SegmentMatcher& operator=(
const SegmentMatcher& rhs) =
delete;
318 SegmentMatcher& operator=(SegmentMatcher&& rhs);
344 SegmentSet findSegments(
const SetDescriptor& segments)
const;
351 std::unique_ptr<Impl> pImpl_{};
Segment Range for Single MS Well.
Definition: SegmentMatcher.hpp:50
WellSegmentRangeIterator begin() const
Start of Range.
Definition: SegmentMatcher.hpp:53
std::string_view well() const
Name of well to which this segment range is attached.
Definition: SegmentMatcher.hpp:59
WellSegmentRangeIterator end() const
End of Range.
Definition: SegmentMatcher.hpp:56
Result Set From SegmentMatcher's Matching Process.
Definition: SegmentMatcher.hpp:43
std::vector< int >::const_iterator WellSegmentRangeIterator
Demarcation of Start/End of Segment Range for Single MS Well.
Definition: SegmentMatcher.hpp:46
bool empty() const
Predicate for whether or not segment set is empty.
Definition: SegmentMatcher.hpp:103
WellSegmentRange segments(std::string_view well) const
Retrive result set's segments for single MS well.
std::size_t numWells() const
Retrieve number of (MS) wells covered by this result set.
Definition: SegmentMatcher.hpp:128
friend class SegmentMatcher
Default constructor.
Definition: SegmentMatcher.hpp:153
SegmentSet()
Default Constructor.
WellSegmentRange segments(const std::size_t well) const
Retrive result set's segments for single MS well.
std::vector< std::string_view > wells() const
Retrieve list of (MS) well names covered by this result set.
bool isScalar() const
Predicate for whether or not segment set applies to a single segment in a single MS well.
Definition: SegmentMatcher.hpp:115
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30