mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
using C++17 style for to reduce nesting level of for loop
This commit is contained in:
parent
ed78d8c99a
commit
1b3cee8088
@ -1554,16 +1554,15 @@ assembleICDPressureEq(const int seg,
|
|||||||
// top segment can not be a spiral ICD device
|
// top segment can not be a spiral ICD device
|
||||||
assert(seg != 0);
|
assert(seg != 0);
|
||||||
|
|
||||||
if(this->segmentSet()[seg].segmentType() == Segment::SegmentType::VALVE) {
|
if (const auto& segment = this->segmentSet()[seg];
|
||||||
const Valve& valve = this->segmentSet()[seg].valve();
|
(segment.segmentType() == Segment::SegmentType::VALVE) &&
|
||||||
if (valve.status() == Opm::ICDStatus::SHUT) { // we switch here to be a zero rate equation
|
(segment.valve().status() == Opm::ICDStatus::SHUT) ) { // we use a zero rate equation to handle SHUT valve
|
||||||
resWell_[seg][SPres] = this->primary_variables_evaluation_[seg][GTotal].value();
|
resWell_[seg][SPres] = this->primary_variables_evaluation_[seg][GTotal].value();
|
||||||
duneD_[seg][seg][SPres][GTotal] = 1.;
|
duneD_[seg][seg][SPres][GTotal] = 1.;
|
||||||
|
|
||||||
auto& ws = well_state.well(baseif_.indexOfWell());
|
auto& ws = well_state.well(baseif_.indexOfWell());
|
||||||
ws.segments.pressure_drop_friction[seg] = 0.;
|
ws.segments.pressure_drop_friction[seg] = 0.;
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// the pressure equation is something like
|
// the pressure equation is something like
|
||||||
|
Loading…
Reference in New Issue
Block a user