Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RPTSCHED mnemonics instead of replace (support WELLS=N) #4220

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

vkip
Copy link
Member

@vkip vkip commented Sep 23, 2024

No description provided.

@vkip
Copy link
Member Author

vkip commented Sep 23, 2024

jenkins build this opm-simulators=5626 please

@vkip vkip marked this pull request as ready for review September 23, 2024 14:11
@bska
Copy link
Member

bska commented Sep 24, 2024

This looks fine from a quick glance, but I'll just ask a general question before I do a more thorough review: While there is an API change here, it does not appear that the downstream PR (OPM/opm-simulators#5626) depends on that API change. Do we need to review/merge the two PRs at the same time or can we review this PR–in opm-common–first and then review its companion PR once this has been merged?

@vkip
Copy link
Member Author

vkip commented Sep 24, 2024

This looks fine from a quick glance, but I'll just ask a general question before I do a more thorough review: While there is an API change here, it does not appear that the downstream PR (OPM/opm-simulators#5626) depends on that API change. Do we need to review/merge the two PRs at the same time or can we review this PR–in opm-common–first and then review its companion PR once this has been merged?

I think only the const 'at' function is required in simulators from the one is common, so doing common first should be fine.

Copy link
Member

@bska bska left a comment

Choose a reason for hiding this comment

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

Do we need to review/merge the two PRs at the same time or can we review this PR–in opm-common–first and then review its companion PR once this has been merged?

I think only the const 'at' function is required in simulators from the one is common, so doing common first should be fine.

Thanks a lot for the confirmation. I've reviewed this now and it looks good to me. I'll merge into master.

As an aside, the more common pattern would probably be to introduce a new function,

bool RPTConfig::update(const DeckKeyword& kw);

which returns true if the internal state was "updated" in some way. Then we'd call it from the keyword handler as

auto cfg = handlerContext.state().rpt_config(); // Intentional copy
if (cfg.update(handlerContext.keyword)) {
    handlerContext.state().rpt_config.update(std::move(cfg));
}

but the current approach is fine too. If we want to add RPTConfig::update() in the future we can do so in follow-up work.

@bska bska merged commit 8913039 into OPM:master Sep 24, 2024
1 check passed
@vkip
Copy link
Member Author

vkip commented Sep 24, 2024

Thanks! Will keep in mind for next time.

@vkip vkip deleted the rptsched_wells branch September 24, 2024 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants