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

Report the number of generated pinch-out connections. #767

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

blattms
Copy link
Member

@blattms blattms commented Oct 4, 2024

No description provided.

@blattms
Copy link
Member Author

blattms commented Oct 4, 2024

jenkins build this please

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.

I do wish you'd stop pushing your branches directly to the main OPM repository.

Other than that, this is okay save for a smaller grammar issue.

Comment on lines 317 to 318
Opm::OpmLog::info(fmt::format("{} pinch-out connections generated",
nnc_cells[PinchNNC].size()));
Copy link
Member

Choose a reason for hiding this comment

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

So this will print

0 pinch-out connections generated

if there are no additional connections. That's okay, if a little redundant. Worse, however, is that it will print

1 pinch-out connectionS generated

i.e., a plural, for the case of a single pinch-out connection. That's not ideal and there's no reason to do that here because we can easily query the number of connections emit a message in concord in this case.

@blattms blattms force-pushed the feature/report-num-pinch-out branch from 632a2bd to ae61c62 Compare October 5, 2024 10:55
@blattms
Copy link
Member Author

blattms commented Oct 5, 2024

Fixed.

I do wish you'd stop pushing your branches directly to the main OPM repository.

Thanks, that was intentional. Somehow I had the wrong URL in my second remote. 🙈

@blattms
Copy link
Member Author

blattms commented Oct 5, 2024

jenkins build this please

@@ -312,6 +314,10 @@ namespace cpgrid
}
}

Opm::OpmLog::info(fmt::format("{} pinch-out connection{} generated",
nnc_cells[PinchNNC].size(),
nnc_cells[PinchNNC].size()>1?"s":""));
Copy link
Member

Choose a reason for hiding this comment

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

Tiny nit: The condition needs to be size() != 1 here.

@blattms
Copy link
Member Author

blattms commented Oct 7, 2024

Thanks a lot for catching that. Always amazing what I mange to do wrong in the tiniest PRs ever 😅

@blattms
Copy link
Member Author

blattms commented Oct 7, 2024

jenkins build this please

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.

Thanks a lot for the updates. This looks good to me now and I'll merge into master.

@bska bska merged commit a646efb into master Oct 7, 2024
1 check passed
@bska bska deleted the feature/report-num-pinch-out branch October 7, 2024 07:52
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