Computation of light refraction at the surface of a photonic crystal using DtN approach