opm-grid
opm-grid copied to clipboard
Add test to compare ids from Entity and EntityRep
We expect the ids of Entity and EntityRep to only coincide in the level zero grid, for CpGrid with LGRs.
In serial execution, this works as intended.
| Grid level / Method | addLgrsUpdateLeafView() | adapt() | globalRefine(1) |
|---|---|---|---|
| Expected (serial execution) | |||
| level zero grid | coincide | coincide | coincide |
| refined level grid | differ | differ | differ |
| leaf grid | differ | differ | differ |
However, tests show that in parallel execution, they also coincide in refined and leaf grids.
| Grid level / Method | addLgrsUpdateLeafView() | adapt() | globalRefine(1) |
|---|---|---|---|
| Observed (parallel execution) | |||
| level zero grid | coincide | coincide | coincide |
| refined level grid | coincide(!!!) | differ | coincide(!!!) |
| leaf grid | coincide(!!!) | coincide(!!!) | coincide(!!!) |
Potential reason: global_id_set_ is not populated for each refined level and leaf grid, then the computation is triggered "on the fly" for each element. Precisely, for a LevelGlobalIdSet levelGlobalIdSet, idSet_ is nullptr and then getMapping
Another alternative is implemented in OPM/opm-grid#898.
jenkins build this serial please
jenkins build this serial please