Fig. 2: Flow chart of the optimization process.
From: Shape optimization for high efficiency metasurfaces: theory and implementation

The design domain is initialized with a given set of meta-atoms, for example with a library-based metasurface. Forward and adjoint simulations are performed and the figure of merit computed. If the figure of merit satisfies the target or if it has converged the optimization stops. If not, the shifting boundary gradients are calculated from the simulated fields, followed by Fourier decomposition and possibly additional fabrication constraints. The shape is then deformed according to the gradients and a new simulation is performed. The process repeats until convergence