Skip to content

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

Closed
joakim-hove wants to merge 2 commits into
OPM:masterfrom
joakim-hove:invalid-to-deactivate-cells
Closed

WIP: The eclipse gride preprocessing is not allowed to deactivate cells#393
joakim-hove wants to merge 2 commits into
OPM:masterfrom
joakim-hove:invalid-to-deactivate-cells

Conversation

@joakim-hove

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

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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.

// Make the grid.
processEclipseFormat(g, nnc_cells, z_tolerance, false, turn_normals);
}

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.

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 ... :-(

@joakim-hove joakim-hove force-pushed the invalid-to-deactivate-cells branch from 3eb9dc3 to 9f861fd Compare October 4, 2019 10:03
This switch is added to be able to support the grid construction from
opm-upscaling.
@blattms

blattms commented Sep 27, 2024

Copy link
Copy Markdown
Member

Closing this one as the companion PR is closed (and pinch processing might also deactivate cells.

There is hope that that processing will move to an earlier stage and the changes in opm-common will really make sense.

@blattms blattms closed this Sep 27, 2024
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.

3 participants