opm-grid icon indicating copy to clipboard operation
opm-grid copied to clipboard

Add test to compare ids from Entity and EntityRep

Open aritorto opened this issue 4 months ago • 2 comments

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 is used.

Another alternative is implemented in OPM/opm-grid#898.

aritorto avatar Aug 01 '25 08:08 aritorto

jenkins build this serial please

aritorto avatar Aug 01 '25 08:08 aritorto

jenkins build this serial please

aritorto avatar Aug 08 '25 08:08 aritorto