Skip to content

Conversation

@GitPaean
Copy link
Member

hopefully helping the readability.

@GitPaean GitPaean added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Nov 25, 2025
@GitPaean
Copy link
Member Author

jenkins build this please

@GitPaean GitPaean force-pushed the small_code_adjustment branch from cf8606a to b1dd87a Compare December 3, 2025 09:24
@GitPaean
Copy link
Member Author

GitPaean commented Dec 3, 2025

jenkins build this please

@GitPaean GitPaean requested a review from hakonhagland December 3, 2025 09:27
/*is_producer=*/true,
/*injection_phase_not_used=*/Phase::OIL);
/*is_production_group=*/true,
/*injection_phase=*/Phase::OIL);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a dummy argument for production groups, right? It can be debated if it is more readable to indicate that in the comment or not. I think the original version is more readable here.

Copy link
Member Author

Choose a reason for hiding this comment

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

okay, fair enough. no strong opinion either. I can revert this one.

Copy link
Member Author

@GitPaean GitPaean Dec 3, 2025

Choose a reason for hiding this comment

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

actually I get a warning with my IDE editor because of the comment different from the function declaration.

I changed it to the following way,

        const int num_gr_ctrl = this->groupControlledWells(chain[ii],
                                                           /*always_included_child=*/"",
                                                           /*is_production_group=*/true,
                                                           /*injection_phase=*/Phase::OIL/*not used*/);

/*always_included_child=*/"",
/*is_producer=*/true,
/*injection_phase_not_used=*/Phase::OIL);
/*is_production_group=*/true,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we want to change is_producer to is_production_group here? I think both are readable, so no strong opinion.

Copy link
Member Author

@GitPaean GitPaean Dec 3, 2025

Choose a reason for hiding this comment

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

Just trying to be the same with the function declaration, and other usages in the same file.

    int groupControlledWells(const std::string& group_name,
                             const std::string& always_included_child,
                             const bool is_production_group,
                             const Phase injection_phase) const;

@GitPaean GitPaean force-pushed the small_code_adjustment branch from b1dd87a to 746b7d4 Compare December 3, 2025 10:11
@GitPaean
Copy link
Member Author

GitPaean commented Dec 3, 2025

jenkins build this please

@GitPaean
Copy link
Member Author

GitPaean commented Dec 3, 2025

Thanks for the review and approval. The firs commit is good to me since there is no loop with the OR operation, it should not be there for the sake of the readability. The second commit is mostly due to not updating the comments when the function declaration was adjusted.

@GitPaean
Copy link
Member Author

GitPaean commented Dec 3, 2025

With jenkins passes, I am getting the PR in now.

@GitPaean GitPaean merged commit 688e44d into OPM:master Dec 3, 2025
2 checks passed
@GitPaean GitPaean deleted the small_code_adjustment branch December 3, 2025 10:57
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