Diffraction gratings are an integral part of many modern optical applications and systems. It is not uncommon for gratings to be just one part of a more complex optical system, which often can contain lenses and other types of optical components. This combination can be challenging from a simulation perspective: diffraction gratings, particularly those with smaller feature sizes, necessitate a rigorous method to solve Maxwell’s equations – a particularly well-suited choice being the Fourier Modal Method/Rigorous Coupled Wave Analysis (FMM/RCWA), since it is a solver that rests on the assumption of periodicity in the problem. However, these methods are nothing short of overkill when it comes to dealing with lenses and other macroscopic elements: the stringent sampling requirements of the FMM make it impracticable to simulate a typical, macroscopic lens with this algorithm. This type of complex system is one of the strongest suits of the fast physical optics modeling and design software VirtualLab Fusion: its non-sequential “connecting field solvers” technology makes it possible to use the FMM for the gratings in your system, another solver for propagation in free space, and a different one for the lenses, each solver resting on assumptions that make sense for the component where it is applied. The consistent use of the electromagnetic model for the light means that complex vectorial behavior (e.g., polarization effects from the grating combined with a strong longitudinal component in strongly focused light) are taken into account in the simulation.