  We propose a rigorous approach for the inverse design of functional photonic
structures by coupling the adjoint optimization method and the two-dimensional
generalized Mie theory (2D-GMT) for the multiple scattering problem of
finite-size arrays of dielectric nanocylinders optimized to display desired
functions. We refer to these functional scattering structures as "photonic
patches". We briefly introduce the formalism of 2D-GMT and the critical steps
necessary to implement the adjoint optimization algorithm to photonic patches
with designed radiation properties. In particular, we showcase several examples
of periodic and aperiodic photonic patches with optimal nanocylinder radii and
arrangements for radiation shaping, wavefront focusing in the Fresnel zone, and
for the enhancement of the local density of states (LDOS) at multiple
wavelengths over micron-size areas. Moreover, we systematically compare the
performances of periodic and aperiodic patches with different sizes and find
that optimized aperiodic Vogel spiral geometries feature significant advantages
in achromatic focusing compared to their periodic counterparts. Our results
show that adjoint optimization coupled to 2D-GMT is a robust methodology for
the inverse design of compact photonic devices that operate in the multiple
scattering regime with optimal desired functionalities. Without the need of
spatial meshing, our approach provides efficient solutions at strongly reduced
computational burden compared to standard numerical optimization techniques and
suggests compact device geometries for on-chip photonics and metamaterials
technologies.
