-
Notifications
You must be signed in to change notification settings - Fork 78
Extract trans values for level zero cells that appearon leaf grid #961
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
Conversation
c9a690d to
749efe9
Compare
|
jenkins build this opm-simulators=6661 serial please |
2d765ae to
2980349
Compare
|
jenkins build this opm-simulators=6661 serial please |
2980349 to
253035b
Compare
|
jenkins build this opm-simulators=6661 serial please |
blattms
left a comment
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.
If it turns out that we need this, then we will need to address the issue with the superfluous container.
opm/grid/cpgrid/LgrOutputHelpers.hpp
Outdated
| int maxCartIdx = std::max(cartIdxIn, cartIdxOut); | ||
|
|
||
| if (maxCartIdx - minCartIdx == 1 && cartDims[0] > 1 ) { | ||
| tranx.template data<double>()[cartIdxIn] += leafTrans.transmissibility(leafIdxIn, leafIdxOut); |
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.
Assignment would also work.
| if constexpr (std::is_same_v<Grid, Dune::CpGrid>) { | ||
| // To detect direct vertical neighboring cells: | ||
| const Opm::LevelCartesianIndexMapper<Dune::CpGrid> levelCartMapp(grid); | ||
| const auto levelCartToLevelCompressed = Opm::Lgr::levelCartesianToLevelCompressedMaps(grid, levelCartMapp); |
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.
Two comments here:
- If we only need level 0 then we should not set up all the other levels
- The map that we are using in opm-simulators already seems the one that we need here. This due to our cartesian index on the leaf grid (same as the one of the parent on level 0) and the fact that this map from global to compressed index is only used to check whether it contains a global index (See function directVerticalNeighbour
Hence I think that we do not need this container at all.
opm/grid/cpgrid/LgrOutputHelpers.hpp
Outdated
| int minCartIdx = std::min(cartIdxIn, cartIdxOut); | ||
| int maxCartIdx = std::max(cartIdxIn, cartIdxOut); |
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.
Nitpic: I think the result should be clear because of the if statement above.
253035b to
9116df6
Compare
9116df6 to
1630890
Compare
|
Closing since OPM/opm-simulators#6706 does the job |
This PR provides a method to extract TRANS* from the leaf grid to the level zero grid. For now, refined cells and cells that vanished during refinement, i.e., parent cells, are not considered. This will be improved and corrected in future PRs.
Keywords: LGRs, output file INIT