Dynamic Formation of Diffraction Grating in a Photorefractive Liquid Crystal Cell With Mesoporous $\hbox{TiO}_{2}$ Layers