No possibility for load-balancing data attached to boundarySegmentIndex()

Summary

There is no persistent global ID structure for handling data attached to boundary segment indices (i.e., to the return values of Intersection::boundarySegmentIndex().

Description

I want to attach data both to cells (codim 0 entities) and boundary segments of my grid. The data is parameters for the cells and boundary conditions for the boundary. This data should be persistent under load-balancing and local grid refinement. For cells, this is fairly straight-forward: I use the GlobalIDSet to persistently identify elements across all processors and then use the Dune::MultipleCodimMultipleGeomTypeMapper for the processor local mapping.

However, there is no such global ID for Dune::Intersections. The GlobalIDSet only maps entities with codim 1, which are typically not congruent with the grid entities. How can I associate the boundary segments globally to keep the data persistent under load-balancing and grid adaptivity?

In my concrete example, I use the GmshReader to read a GMSH file and create an UGGrid. Luckily, UG currently has the bug that boundarySegmentIndex returns indices that are persistent and global, but this is not the specified behavior (#76). How would I broadcast the data and associate it with the correct boundary segment after this is resolved?

Missing feature

Like the GlobalIDSetIndexSet relation, I need a way to globally identify boundary segments while also having a convenient processor-local mapping.