Modeling of Holographic Gratings in Photorefractive Graded-index Planar Waveguides