Use well index for segment pressure

This commit is contained in:
Joakim Hove
2021-05-26 08:17:46 +02:00
parent 3025bf3280
commit 34ef516472
5 changed files with 17 additions and 17 deletions

View File

@@ -976,10 +976,10 @@ void WellState::initWellStateMSWell(const std::vector<Well>& wells_ecl,
}
auto * segment_rates = &this->seg_rates_[new_top_segment_index*np];
auto * segment_pressure = &this->seg_press_[new_top_segment_index];
auto segment_pressure = this->segPress(w);
const auto * prev_segment_rates = &prev_well_state->segRates()[old_top_segment_index*np];
const auto * prev_segment_pressure = &prev_well_state->segPress()[new_top_segment_index];
const auto prev_segment_pressure = prev_well_state->segPress(old_index_well);
for (int seg=0; seg < number_of_segment; ++seg) {
for (int p = 0; p < np; ++p)
@@ -1162,7 +1162,7 @@ WellState::reportSegmentResults(const PhaseUsage& pu,
{
using Value = data::SegmentPressures::Value;
auto& segpress = seg_res.pressures;
segpress[Value::Pressure] = this->segPress()[seg_dof];
segpress[Value::Pressure] = this->segPress(well_id)[seg_ix];
segpress[Value::PDrop] = this->segPressDrop()[seg_dof];
segpress[Value::PDropHydrostatic] = this->segPressDropHydroStatic()[seg_dof];
segpress[Value::PDropFriction] = this->segPressDropFriction()[seg_dof];