The generalized periodic boundary condition for microscopic simulations of heat transfer in heterogeneous materials. (July 2021)