updateCartesianToCompressedMapping_() runs during load balancing, before addLgrs(). Refinement changes the leaf cell count and ordering, so afterwards the map still holds pre-refinement leaf indices and level-zero well connections resolve to wrong cells.
A plain rebuild is not enough: refined cells inherit their parent's Cartesian index, so including them makes the map many-to-one with an arbitrary child winning (pointed out in review of #7245). Restricting entries to level-zero cells keeps it one-to-one; refined cells are reached through their level grid instead.
Fix proposed in #7245.
updateCartesianToCompressedMapping_()runs during load balancing, beforeaddLgrs(). Refinement changes the leaf cell count and ordering, so afterwards the map still holds pre-refinement leaf indices and level-zero well connections resolve to wrong cells.A plain rebuild is not enough: refined cells inherit their parent's Cartesian index, so including them makes the map many-to-one with an arbitrary child winning (pointed out in review of #7245). Restricting entries to level-zero cells keeps it one-to-one; refined cells are reached through their level grid instead.
Fix proposed in #7245.