  Efficient numeric algorithm is the key for accurate evaluation of density of
states (DOS) in band theory. Gilat-Raubenheimer (GR) method proposed in 1966 is
an efficient linear extrapolation method which was limited in specific
lattices. Here, using an affine transformation, we provide a new generalization
of the original GR method to any Bravais lattices and show that it is superior
to the tetrahedron method and the adaptive Gaussian broadening method. Finally,
we apply our generalized GR (GGR) method to compute DOS of various gyroid
photonic crystals of topological degeneracies.
