mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Fix indexing error in if-test.
This commit is contained in:
parent
924080d8dc
commit
38a48dd149
@ -82,7 +82,7 @@ std::vector<double> Opm::WellDensitySegmented::computeConnectionPressureDelta(co
|
|||||||
// Iterate over well perforations from bottom to top.
|
// Iterate over well perforations from bottom to top.
|
||||||
for (int perf = wells.well_connpos[w+1] - 1; perf >= wells.well_connpos[w]; --perf) {
|
for (int perf = wells.well_connpos[w+1] - 1; perf >= wells.well_connpos[w]; --perf) {
|
||||||
for (int phase = 0; phase < np; ++phase) {
|
for (int phase = 0; phase < np; ++phase) {
|
||||||
if (perf == wells.well_connpos[w+1]) {
|
if (perf == wells.well_connpos[w+1] - 1) {
|
||||||
// This is the bottom perforation. No flow from below.
|
// This is the bottom perforation. No flow from below.
|
||||||
q_out_perf[perf*np + phase] = 0.0;
|
q_out_perf[perf*np + phase] = 0.0;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user