Influence of size and distribution of grains and the grain boundary state on the flow stress of polycrystals