Set up calcAdjacencies.