Merge pull request #3598 from bska/report-siunits-injgr-grouplevel

Report Group Level Inject Guiderate Values in Strict SI Units
This commit is contained in:
Bård Skaflestad 2021-10-19 13:20:58 +02:00 committed by GitHub
commit 37f589bff1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1286,12 +1286,14 @@ getGuideRateInjectionGroupValues(const Group& group) const
const auto& gname = group.name();
if (this->guideRate_.has(gname, Phase::GAS)) {
grval.set(data::GuideRateValue::Item::Gas,
this->guideRate_.get(gname, Phase::GAS));
this->guideRate_.getSI(gname, Phase::GAS));
}
if (this->guideRate_.has(gname, Phase::WATER)) {
grval.set(data::GuideRateValue::Item::Water,
this->guideRate_.get(gname, Phase::WATER));
this->guideRate_.getSI(gname, Phase::WATER));
}
return grval;
}
@ -1406,8 +1408,9 @@ calculateAllGroupGuiderates(const int reportStepIdx) const
gr[gname].production = this->getGuideRateValues(group);
}
if (this->guideRate_.has(gname, Phase::WATER)
|| this->guideRate_.has(gname, Phase::GAS)) {
if (this->guideRate_.has(gname, Phase::WATER) ||
this->guideRate_.has(gname, Phase::GAS))
{
gr[gname].injection = this->getGuideRateInjectionGroupValues(group);
}
@ -1416,6 +1419,7 @@ calculateAllGroupGuiderates(const int reportStepIdx) const
gr[parent].injection += gr[gname].injection;
gr[parent].production += gr[gname].production;
up.push_back(parent);
}