consolidate lattice generation functions