Three-dimensional nonlinear analysis of free-electron-laser amplifiers with planar wigglers.