mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-24 00:10:02 -06:00
Merge pull request #4848 from vkip/gconsump_mpi_fix
Avoid adding/substracting GCONSUMP values per MPI process..
This commit is contained in:
commit
3673c05242
@ -947,7 +947,7 @@ updateAndCommunicateGroupData(const int reportStepIdx,
|
||||
std::vector<double> groupTargetReductionInj(numPhases(), 0.0);
|
||||
WellGroupHelpers::updateGroupTargetReduction(fieldGroup, schedule(), reportStepIdx, /*isInjector*/ true, phase_usage_, guideRate_, well_state, this->groupState(), groupTargetReductionInj);
|
||||
|
||||
WellGroupHelpers::updateREINForGroups(fieldGroup, schedule(), reportStepIdx, phase_usage_, summaryState_, well_state_nupcol, this->groupState());
|
||||
WellGroupHelpers::updateREINForGroups(fieldGroup, schedule(), reportStepIdx, phase_usage_, summaryState_, well_state_nupcol, this->groupState(), comm_.rank()==0);
|
||||
WellGroupHelpers::updateVREPForGroups(fieldGroup, schedule(), reportStepIdx, well_state_nupcol, this->groupState());
|
||||
|
||||
WellGroupHelpers::updateReservoirRatesInjectionGroups(fieldGroup, schedule(), reportStepIdx, well_state_nupcol, this->groupState());
|
||||
|
@ -657,12 +657,13 @@ namespace WellGroupHelpers
|
||||
const PhaseUsage& pu,
|
||||
const SummaryState& st,
|
||||
const WellState& wellState,
|
||||
GroupState& group_state)
|
||||
GroupState& group_state,
|
||||
bool sum_rank)
|
||||
{
|
||||
const int np = wellState.numPhases();
|
||||
for (const std::string& groupName : group.groups()) {
|
||||
const Group& groupTmp = schedule.getGroup(groupName, reportStepIdx);
|
||||
updateREINForGroups(groupTmp, schedule, reportStepIdx, pu, st, wellState, group_state);
|
||||
updateREINForGroups(groupTmp, schedule, reportStepIdx, pu, st, wellState, group_state, sum_rank);
|
||||
}
|
||||
|
||||
std::vector<double> rein(np, 0.0);
|
||||
@ -671,11 +672,13 @@ namespace WellGroupHelpers
|
||||
}
|
||||
|
||||
// add import rate and subtract consumption rate for group for gas
|
||||
if (schedule[reportStepIdx].gconsump().has(group.name())) {
|
||||
const auto& gconsump = schedule[reportStepIdx].gconsump().get(group.name(), st);
|
||||
if (pu.phase_used[BlackoilPhases::Vapour]) {
|
||||
rein[pu.phase_pos[BlackoilPhases::Vapour]] += gconsump.import_rate;
|
||||
rein[pu.phase_pos[BlackoilPhases::Vapour]] -= gconsump.consumption_rate;
|
||||
if (sum_rank) {
|
||||
if (schedule[reportStepIdx].gconsump().has(group.name())) {
|
||||
const auto& gconsump = schedule[reportStepIdx].gconsump().get(group.name(), st);
|
||||
if (pu.phase_used[BlackoilPhases::Vapour]) {
|
||||
rein[pu.phase_pos[BlackoilPhases::Vapour]] += gconsump.import_rate;
|
||||
rein[pu.phase_pos[BlackoilPhases::Vapour]] -= gconsump.consumption_rate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,8 @@ namespace WellGroupHelpers
|
||||
const PhaseUsage& pu,
|
||||
const SummaryState& st,
|
||||
const WellState& wellState,
|
||||
GroupState& group_state);
|
||||
GroupState& group_state,
|
||||
bool sum_rank);
|
||||
|
||||
template <class RegionalValues>
|
||||
void updateGpMaintTargetForGroups(const Group& group,
|
||||
|
Loading…
Reference in New Issue
Block a user