Laser cavity fox-li iterative algorithm