  Many photonic devices, such as photonic crystal slabs, cross gratings, and
periodic metasurfaces, are biperiodic structures with two independent periodic
directions, and are sandwiched between two homogeneous media. Many applications
of these devices are closely related to resonance phenomena. Therefore,
efficient computation of resonant modes is crucial in device design and
structure analysis. Since resonant modes satisfy outgoing radiation conditions,
perfectly matched layers (PMLs) are usually used to truncate the unbounded
spatial variable perpendicular to the periodic directions. In this paper, we
develop an efficient method without using PMLs to calculate resonant modes in
biperiodic structures. We reduce the original eigenvalue problem to a small
matrix nonlinear eigenvalue problem which is solved by the contour integral
method. Numerical examples show that our method is efficient with respect to
memory usage and CPU time, free of spurious solutions, and determines
degenerate resonant modes without any difficulty.
