GlobalIndex of ParallelIndexSet used out of specification.
ParallelIndexSet is by documentation a type that "[...] has to provide at least a operator< for sorting". In the documentation of the class it is named a global id and it is stated:
[...] the global id might not be consecutive but definitely is persistent.
So, it is a persistent (over grid changes) partially ordered id type. (Similar to the global entity id type of the grid)
While this is already not enough for the
GlobalLookupIndexSet implementation (I think, all comparison operators are used somewhere in the code), it gets worse in dune-istl code that uses the
- a maximal GlobalIndex is determined by first initializing a global index with 0 (not possible in general) and then pairwise
std::max. Why not using the already ordered list
- to determine the next free global index, the maximum is then incremented (using
operator++) and shifted (using
Both points are not guaranteed to work by the
So, here some cleanup or at least better specification of the requirements is necessary!