Skip to content

Fix empty pointMapping_ when synchrCellIds in adapt() calls#906

Merged
blattms merged 2 commits into
OPM:masterfrom
aritorto:pointMapping
Aug 21, 2025
Merged

Fix empty pointMapping_ when synchrCellIds in adapt() calls#906
blattms merged 2 commits into
OPM:masterfrom
aritorto:pointMapping

Conversation

@aritorto

@aritorto aritorto commented Aug 1, 2025

Copy link
Copy Markdown
Member

PR #898 avoids implicit derived-to-base conversion (use Entity instead of EntityRep) by overloading id with explicit types Entity, codim = 0 and 3, ensuring the correct ids are used for Entity<0> and Entity<3> in CpGrid with LGRs.

To ensure that IDs are correctly handled in all possible refinement scenarios, one of the test cases invokes adapt() in both the global and distributed views, followed by synchronization of cell IDs. This is where the issue with an empty pointMapping_ arose. This PR provides a fix for it.

@aritorto aritorto added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Aug 1, 2025
@aritorto

aritorto commented Aug 1, 2025

Copy link
Copy Markdown
Member Author

jenkins build this serial please

@blattms blattms left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks a lot.
Nice catch. Just a small typo in the comment.

Comment thread opm/grid/cpgrid/CpGrid.cpp Outdated
@aritorto

Copy link
Copy Markdown
Member Author

jenkins build this serial please

aritorto and others added 2 commits August 21, 2025 11:11
@aritorto

Copy link
Copy Markdown
Member Author

jenkins build this serial please

@blattms blattms merged commit 47db457 into OPM:master Aug 21, 2025
2 checks passed
@aritorto aritorto deleted the pointMapping branch December 29, 2025 11:44
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