Remove unused bool flag

This commit is contained in:
Joakim Hove
2020-02-11 15:11:31 +01:00
parent b3d306482c
commit cac1dac893
3 changed files with 8 additions and 11 deletions

View File

@@ -93,7 +93,7 @@ namespace Opm {
const Segment& operator[](size_t idx) const;
void orderSegments();
void process(bool first_time);
void process();
bool operator==( const WellSegments& ) const;
bool operator!=( const WellSegments& ) const;
@@ -109,7 +109,7 @@ namespace Opm {
private:
void processABS();
void processINC(const bool first_time);
void processINC();
std::string m_well_name;
// depth of the nodal point of the top segment

View File

@@ -244,11 +244,11 @@ namespace Opm {
return m_segments[segment_index];
}
void WellSegments::process(bool first_time) {
void WellSegments::process() {
if (this->m_length_depth_type == LengthDepth::ABS)
this->processABS();
else if (this->m_length_depth_type == LengthDepth::INC)
this->processINC(first_time);
this->processINC();
else
throw std::logic_error("Invalid llength/depth/type in segment data structure");
}
@@ -337,14 +337,11 @@ namespace Opm {
}
}
void WellSegments::processINC(const bool first_time) {
void WellSegments::processINC() {
// update the information inside the WellSegments to be in ABS way
if (first_time) {
Segment new_top_segment(this->m_segments[0], depthTopSegment(), lengthTopSegment());
this->addSegment(new_top_segment);
}
Segment new_top_segment(this->m_segments[0], depthTopSegment(), lengthTopSegment());
this->addSegment(new_top_segment);
orderSegments();
// begin with the second segment

View File

@@ -761,7 +761,7 @@ bool Well::handleWELSEGS(const DeckKeyword& keyword) {
auto new_segmentset = std::make_shared<WellSegments>();
new_segmentset->loadWELSEGS(keyword);
new_segmentset->process(true);
new_segmentset->process();
if (new_segmentset != this->segments) {
this->segments = new_segmentset;
this->ref_depth = new_segmentset->depthTopSegment();