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
base: master
Are you sure you want to change the base?
Conversation
|
||
{ | ||
const auto& ecl_actnum = ecl_grid.getACTNUM(); | ||
for (std::size_t g = 0; g < ecl_grid.getCartesianSize(); g++) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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); | |||
} | |||
|
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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]) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 ... :-(
630b3b3
to
3eb9dc3
Compare
3eb9dc3
to
9f861fd
Compare
This switch is added to be able to support the grid construction from opm-upscaling.
Related to: OPM/opm-common#1059
Observe that the uglyness in the second commit is to support opm-upscaling: OPM/opm-upscaling#279