opm-grid icon indicating copy to clipboard operation
opm-grid copied to clipboard

Clean up a couple of friend declarations in CpGridData.hpp

Open aritorto opened this issue 1 year ago • 4 comments

Not relevant for the Reference Manual.

aritorto avatar Sep 16 '24 13:09 aritorto

jenkins build this please

aritorto avatar Sep 16 '24 13:09 aritorto

It's true that the clean up removed lines on the tests, however, those checked implementation details instead of features. For example, when we use "internally" -1 to denote that an entity does not verify certain property. Or when we check properties of children cells, it should be sufficient to use the hierarchic iterators instead of accessing via parent_to_children_cells_ . Sorry if "Clean up" on the title does not fully describe the PR intend

aritorto avatar Sep 20 '24 08:09 aritorto

I see. Fair enough.

I see that we have the checks using child_to_parent as we are checking Entity::father. But the checks the other way around (using parent_to_children) are removed. I think we should still have those, but refactored using HierarchicIterator. That should be possible, right?

I think moving more to the standard DUNE interface even in the tests is a very good change. Thanks a lot.

blattms avatar Sep 20 '24 08:09 blattms

True, I haven't tried to use the iterators "in the other direction". That's a great idea. I'll draft this PR for now. Thanks for your feedback!

aritorto avatar Sep 20 '24 08:09 aritorto