Dislocation emission criterion: Grain boundary effect