Rename mutable perfPhaseRates()

This commit is contained in:
Joakim Hove
2021-05-07 11:14:57 +02:00
parent aea80db23a
commit 846809ec29
4 changed files with 7 additions and 7 deletions

View File

@@ -1972,7 +1972,7 @@ namespace Opm {
auto * perf_pressure = well_state.perfPress().data() + wm.second[1];
auto * perf_rates = well_state.perfRates().data() + wm.second[1];
auto * perf_phase_rates = well_state.perfPhaseRates().data() + wm.second[1]*np;
auto * perf_phase_rates = well_state.mutable_perfPhaseRates().data() + wm.second[1]*np;
const auto& perf_data = this->well_perf_data_[well_index];
for (std::size_t perf_index = 0; perf_index < perf_data.size(); perf_index++) {

View File

@@ -2664,7 +2664,7 @@ namespace Opm
// store the perf pressure and rates
const int rate_start_offset = (first_perf_ + perf) * number_of_phases_;
for (int comp_idx = 0; comp_idx < num_components_; ++comp_idx) {
well_state.perfPhaseRates()[rate_start_offset + ebosCompIdxToFlowCompIdx(comp_idx)] = cq_s[comp_idx].value();
well_state.mutable_perfPhaseRates()[rate_start_offset + ebosCompIdxToFlowCompIdx(comp_idx)] = cq_s[comp_idx].value();
}
well_state.perfPress()[first_perf_ + perf] = perf_press.value();

View File

@@ -620,7 +620,7 @@ namespace Opm
if (has_solvent && componentIdx == contiSolventEqIdx) {
well_state.perfRateSolvent()[first_perf_ + perf] = cq_s[componentIdx].value();
} else {
well_state.perfPhaseRates()[(first_perf_ + perf) * np + ebosCompIdxToFlowCompIdx(componentIdx)] = cq_s[componentIdx].value();
well_state.mutable_perfPhaseRates()[(first_perf_ + perf) * np + ebosCompIdxToFlowCompIdx(componentIdx)] = cq_s[componentIdx].value();
}
}

View File

@@ -293,13 +293,13 @@ namespace Opm
for (int perf_phase_idx = connpos*np;
perf_phase_idx < (connpos + num_perf_this_well)*np; ++perf_phase_idx, ++old_perf_phase_idx )
{
perfPhaseRates()[ perf_phase_idx ] = prevState->perfPhaseRates()[ old_perf_phase_idx ];
mutable_perfPhaseRates()[ perf_phase_idx ] = prevState->perfPhaseRates()[ old_perf_phase_idx ];
}
} else {
const int global_num_perf_this_well = parallel_well_info[w]->communication().sum(num_perf_this_well);
for (int perf = connpos; perf < connpos + num_perf_this_well; ++perf) {
for (int p = 0; p < np; ++p) {
perfPhaseRates()[np*perf + p] = wellRates()[np*newIndex + p] / double(global_num_perf_this_well);
mutable_perfPhaseRates()[np*perf + p] = wellRates()[np*newIndex + p] / double(global_num_perf_this_well);
}
}
}
@@ -409,7 +409,7 @@ namespace Opm
}
/// One rate per phase and well connection.
std::vector<double>& perfPhaseRates() { return perfphaserates_; }
std::vector<double>& mutable_perfPhaseRates() { return perfphaserates_; }
const std::vector<double>& perfPhaseRates() const { return perfphaserates_; }
/// One current control per injecting well.
@@ -690,7 +690,7 @@ namespace Opm
// maybe the best way is to initialize the fractions first then get the rates
for (int perf = 0; perf < n_activeperf; perf++) {
const int perf_pos = start_perf + perf;
perfPhaseRates()[np * perf_pos + gaspos] *= 100.;
mutable_perfPhaseRates()[np * perf_pos + gaspos] *= 100.;
}
}