mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Rename mutable perfPhaseRates()
This commit is contained in:
@@ -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++) {
|
||||
|
@@ -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();
|
||||
|
||||
|
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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.;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user