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

WIP: The eclipse gride preprocessing is not allowed to deactivate cells #393

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

joakim-hove
Copy link
Member

@joakim-hove joakim-hove commented Oct 3, 2019

Related to: OPM/opm-common#1059

Observe that the uglyness in the second commit is to support opm-upscaling: OPM/opm-upscaling#279


{
const auto& ecl_actnum = ecl_grid.getACTNUM();
for (std::size_t g = 0; g < ecl_grid.getCartesianSize(); g++) {
Copy link
Member

Choose a reason for hiding this comment

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

Using g for cell index is a little weird...? Other than that trivial observation, I'll try to run this through some cases to see if it is triggered.

Copy link
Member Author

Choose a reason for hiding this comment

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

I like using g for global_index - happy to change it thougth.

@@ -231,6 +231,14 @@ namespace cpgrid
// Make the grid.
processEclipseFormat(g, nnc_cells, z_tolerance, false, turn_normals);
}

Copy link
Member

Choose a reason for hiding this comment

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

Should we maybe deactivate this test in production by #ifndef NDEDUG

Copy link
Member Author

Choose a reason for hiding this comment

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

Better safe than sorry - I would prefer to leave that test in - even in release mode; can add a commented of #ifndef NDEBUG - which can be activated at some point in the future.

{
const auto& ecl_actnum = ecl_grid.getACTNUM();
for (std::size_t g = 0; g < ecl_grid.getCartesianSize(); g++) {
if (ecl_actnum[g] != g.actnum[g])
Copy link
Member

Choose a reason for hiding this comment

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

Are you sure this compiles? Looks like you are calling a member function on a g which is of type size_t 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.

Hehe - no this probably does not compile ... :-(

This switch is added to be able to support the grid construction from
opm-upscaling.
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.

None yet

3 participants