  We present two developments for the numerical integration of a function over
the Brillouin zone. First, we introduce a nonuniform grid, which we refer to as
the Farey grid, that generalizes regular grids. Second, we introduce
symmetry-adapted Voronoi tessellation, a general technique to assign weights to
the points in an arbitrary grid. Combining these two developments, we propose a
strategy to perform Brillouin zone integration and interpolation that provides
a significant computational advantage compared to the usual approach based on
regular uniform grids. We demonstrate our methodology in the context of first
principles calculations with the study of Kohn anomalies in the phonon
dispersions of graphene and MgB2, and in the evaluation of the electron-phonon
driven renormalization of the band gaps of diamond and bismuthene. In the
phonon calculations, we find speedups by a factor of 3 to 4 when using density
functional perturbation theory, and by a factor of 6 to 7 when using finite
differences in conjunction with supercells. As a result, the computational
expense between density functional perturbation theory and finite differences
becomes comparable. For electron-phonon coupling calculations we find even
larger speedups. Finally, we also demonstrate that the Farey grid can be
expressed as a combination of the widely used regular grids, which should
facilitate the adoption of this methodology.
