Fix renumbering in parallel for hp.
When renumbering in parallel, the input are the new indices for
all locally owned DoFs on the current process. This means that we
need to be careful when we set new DoFs to only touch those DoF
indices that we actually own -- not doing so yields invalid
accesses that current abort the program.
The first part of the patch is therefore to only touch DoFs for
which we really know that we have a valid new index; for all
others, we need to set the index to numbers::invalid_dof_index
for the moment.
The second part is that we need to merge/unify DoF indices for
adjacent pairs of finite elements where the DoF on one side
may be unified with one on the neighboring cell. Because the
current cell may be locally owned but the neighboring cell be
a ghost cell, the right time to do this unification is between
the two exchange phases on ghost cells. This is indeed the
same place where the unification also happens on during the
initial enumeration process in distribute_dofs().
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams