Skip to content

[LGR] Add test for CpGrid::getParentIntersectionFromLgrBoundary#1023

Open
aritorto wants to merge 2 commits intoOPM:masterfrom
aritorto:interInInside
Open

[LGR] Add test for CpGrid::getParentIntersectionFromLgrBoundary#1023
aritorto wants to merge 2 commits intoOPM:masterfrom
aritorto:interInInside

Conversation

@aritorto
Copy link
Copy Markdown
Member

@aritorto aritorto commented Apr 13, 2026

Adding a test for an issue reported and fixed in #1022.
This PR should be merged after that one.

@aritorto aritorto added the manual:irrelevant This PR is a minor fix and should not appear in the manual label Apr 13, 2026
@aritorto
Copy link
Copy Markdown
Member Author

jenkins build this serial please

@aritorto
Copy link
Copy Markdown
Member Author

jenkins build this serial please

@aritorto aritorto marked this pull request as draft April 14, 2026 12:43
@aritorto aritorto marked this pull request as ready for review April 14, 2026 13:42
@aritorto
Copy link
Copy Markdown
Member Author

jenkins build this serial please

@aritorto aritorto requested a review from blattms April 17, 2026 07:51
@aritorto
Copy link
Copy Markdown
Member Author

jenkins build this serial please

for (const auto& intersection : Dune::intersections(grid.leafGridView(), element)) {
if (intersection.neighbor() && (intersection.inside().level() != intersection.outside().level())) {

const auto parentIntersection = grid.getParentIntersectionFromLgrBoundaryFace(intersection);
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.

Please do not copy non-pods but use const references. This class does have a few members.


const auto parentIntersection = grid.getParentIntersectionFromLgrBoundaryFace(intersection);

const auto parentInterToPoint = grid.currentData().front()->faceToPoint(parentIntersection.id());
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.

Same here. This is an array or vector.

Comment thread opm/grid/cpgrid/CpGrid.cpp Outdated
// - coarse inside (level 0): indexInInside() is already the level-0 face index.
// - refined inside: fine cells inherit face directions from their parent, so
// indexInInside() equals the parent's face index.
const auto insideOrigin = intersection.inside().getOrigin();
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.

This should probably be a reference

@aritorto
Copy link
Copy Markdown
Member Author

jenkins build this serial please

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