A novel method for simulating laser-solid interactions in semiconductors and layered structures