mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -06:00
opm-common : Cherry-pick region bugfix
This commit is contained in:
parent
e5e1f59aef
commit
da43084fcb
@ -1134,9 +1134,16 @@ std::string ESmry::makeKeyString(const std::string& keywordArg, const std::strin
|
||||
return "";
|
||||
}
|
||||
|
||||
if (keywordArg[1] == 'F') {
|
||||
std::string str34 = keywordArg.substr(2, 2);
|
||||
std::string str45 = keywordArg.substr(3, 2);
|
||||
|
||||
if (keywordArg == "RORFR") // exception, standard region summary keyword
|
||||
return fmt::format("{}:{}", keywordArg, num);
|
||||
|
||||
if ((str34 == "FR") || (str34 == "FT") || (str45 == "FR") || (str45 == "FT")) {
|
||||
|
||||
// NUMS = R1 + 32768*(R2 + 10)
|
||||
const auto r1 = num % (1UL << 15);
|
||||
const auto r1 = num % (1UL << 15);
|
||||
const auto r2 = (num / (1UL << 15)) - 10;
|
||||
|
||||
return fmt::format("{}:{}-{}", keywordArg, r1, r2);
|
||||
|
Loading…
Reference in New Issue
Block a user