Skip to content

Populate Region Variable Mapping From Summary Config - #5279

Draft
bska wants to merge 1 commit into
OPM:masterfrom
bska:reg-var-register-connopt
Draft

Populate Region Variable Mapping From Summary Config#5279
bska wants to merge 1 commit into
OPM:masterfrom
bska:reg-var-register-connopt

Conversation

@bska

@bska bska commented Aug 6, 2026

Copy link
Copy Markdown
Member

This PR adds a special purpose helper function,

populateRegVarMapping()

that, based on the run's configured summary vectors, populates an object of type data::RegionVariableMapping (#5274).

In this initial implementation, we define a variable named

  • ConnOPT

if any of the *OEW* summary vectors are configured in the run's SUMMARY section. Those OEW vectors require tracking the per-region cumulative oil production from wells and it's easier to have a dedicated variable for this than to introduce extra COPT summary vectors that are visible to the user through the result set's summary files (e.g., .SMSPEC and .UNSMRY).

@bska bska added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Aug 6, 2026
@bska

bska commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

I'm creating this PR in draft mode because it depends on, and contains, the earlier PR #5278. I will keep the PR in a draft state until such time as it is ready for review.

@bska
bska force-pushed the reg-var-register-connopt branch 13 times, most recently from f79428d to 64029bc Compare August 14, 2026 09:16
@bska
bska force-pushed the reg-var-register-connopt branch 5 times, most recently from 45d1850 to 312c517 Compare August 17, 2026 10:10
@bska
bska requested a lite review from Copilot August 17, 2026 10:11
@bska

bska commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

jenkins build this please

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new SummaryConfig-driven helper to register internal region-variable dependencies in a data::RegionVariableMapping, initially focused on oil-efficiency (*OEW*) summary vectors so required per-region cumulative production can be tracked without exposing extra COPT vectors in user-visible summary output.

Changes:

  • Introduces populateRegVarMapping() API for deriving mapping registrations from SummaryConfig.
  • Implements initial *OEW* detection and registration of ConnOPT plus required region sets (e.g., FIPNUM or configured region set for ROEW_*).
  • Wires the new compilation unit and public header into the build via CMake file lists.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
opm/input/eclipse/EclipseState/SummaryConfig/RegionVariableSupport.hpp Declares populateRegVarMapping() for populating a RegionVariableMapping from SummaryConfig.
opm/input/eclipse/EclipseState/SummaryConfig/RegionVariableSupport.cpp Implements initial mapping population for *OEW* vectors by registering ConnOPT and needed region sets.
CMakeLists_files.cmake Adds the new source and public header to the build/install lists.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +31 to +34
namespace Opm {
void populateRegVarMapping(const SummaryConfig& sumcfg,
data::RegionVariableMapping& regVarMap);
}
Comment on lines +30 to +34
// FOEW, ROEW, ROEW_<REG>
const auto oew_kws = sumcfg.keywords(R"(*OEW*)");

if (oew_kws.empty()) {
// No *OEW* vectors requested. Nothing to do.
@bska
bska force-pushed the reg-var-register-connopt branch 4 times, most recently from a18fca9 to 419e98e Compare August 20, 2026 07:12
@bska
bska force-pushed the reg-var-register-connopt branch from 419e98e to 0022324 Compare August 21, 2026 09:10
This commit adds a special purpose helper function,

    populateRegVarMapping()

that, based on the run's configured summary vectors, populates an
object of type data::RegionVariableMapping.

In this initial implementation, we define a variable named

    ConnOPT

if any of the *OEW* summary vectors are configured in the run's
SUMMARY section.  Those OEW vectors require tracking the per-region
cumulative oil production from wells and it's easier to have a
dedicated variable for this than to introduce extra "COPT" summary
vectors that are visible to the user through the result set's
summary files (e.g., .SMSPEC and .UNSMRY).
@bska
bska force-pushed the reg-var-register-connopt branch from 0022324 to 86f1597 Compare August 21, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual:irrelevant This PR is a minor fix and should not appear in the manual

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants