Merge pull request #3612 from bska/report-gxigr-if-present

Report Group Level Injection Guide Rates if Present
This commit is contained in:
Bård Skaflestad 2021-10-19 15:01:01 +02:00 committed by GitHub
commit c6ca024c74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1633,16 +1633,22 @@ assignGroupGuideRates(const Group& group,
auto& inj = gdata.guideRates.injection; inj .clear();
auto xgrPos = groupGuideRates.find(group.name());
if ((xgrPos == groupGuideRates.end()) ||
!this->guideRate_.has(group.name()))
{
if (xgrPos == groupGuideRates.end()) {
// No guiderates defined for this group.
return;
}
const auto& xgr = xgrPos->second;
prod = xgr.production;
inj = xgr.injection;
if (this->guideRate_.has(group.name())) {
prod = xgr.production;
}
if (this->guideRate_.has(group.name(), Phase::WATER) ||
this->guideRate_.has(group.name(), Phase::GAS))
{
inj = xgr.injection;
}
}
void