Restructure dofmap computation in parallel.