Tpetra::Map: Make isContiguous() accurate instead of conservative
Created by: aprokop
In the Tpetra::Map constructor based on the element list (both Kokkos and Teuchos version), contiguous_
is unconditionally set to false. We could add a check first whether it is locally contigous (lastContiguousGID_ - firstContiguousGID_ == numLocal-1
) with a single global reduction to check the global contiguity.
I don't think this check would save much, probably only for non-savvy users that somehow construct contiguous maps based on element lists. Plus, there is a bunch of optimizations in LocalMap
based on firstContiguousGID_
and friends.
Feel free to close if you also think there are not situations where this would really help.