pub fn gen_kmesh<T>(k_mesh: &Array1<usize>) -> Result<Array2<T>>Expand description
Generate a uniform k-point mesh in the Brillouin zone.
The k-points are distributed uniformly with coordinates in the range [0, 1] in fractional reciprocal space coordinates. For a 2D system with mesh [Nx, Ny], the k-points are arranged as: $$ \mathbf{k} = \left(\frac{i}{N_x}, \frac{j}{N_y}\right) \quad \text{for } i=0,\ldots,N_x-1, j=0,\ldots,N_y-1 $$
§Arguments
k_mesh- Array specifying the number of points along each reciprocal lattice direction
§Returns
Result<Array2<T>> where each row is a k-point in fractional coordinates
§Errors
Returns TbError if the mesh dimensions are invalid