Dataset Open Access

Source code and simulation results for the computation of eigenfrequency sensitivities using Riesz projections for efficient optimization of nanophotonic resonators

Binkowski, Felix; Betz, Fridtjof; Hammerschmidt, Martin; Schneider, Philipp-Immanuel; Zschiedrich, Lin; Burger, Sven


Data and source code relate to the article "Computation of eigenfrequency sensitivities using Riesz projections for
efficient optimization of nanophotonic resonators" [1]. It combines direct differentiation of scattering problems with a contour integral method [2] to compute eigenfrequency sensitivities. An optimization is used to demonstrate the relevance of the method.


The most important elements of this publication are the MATLAB scripts 'sensitivities.m' and 'optimization.m', which can be used to reproduce the most important results of the paper. The directories codescattering and results contain the software RPExpand [3], input files for JCMsuite [4] and results produced with the scripts, respectively. Furthermore, the latter contains the subfolder tabulated, which contains text files tabulating data presented in Figures 2 and 4 of the paper. Eventually, the function 'code/observation.m' evaluates the target for the optimization.

Additional Information

The applicaton is based on an example from the literature [5]. Using apriori knowledge about the eigenmode of interest, we chose the scalar observable, as defined in Section B of the paper, to be the component of the electric field normal to the plane defining the solid of revolution.

The convergence studies are based on the discrete, circular contour \(\tilde{C} = \big\{ c_n~|~ c_n=r_0 e^{2\pi i n/8}, n \in \{0,1,...,7\}\big\}\) with center \(\omega_0 = 2 \pi c/(1600~\mathrm{nm})\) and radius \(r_0 = \omega_0\times10^{-2}\). For finite element degrees \(d\) higher than 5, the error saturates. For this reason, the differences between results for \(d=5\) and \(d = 6\) may depend on the hardware architecture.

A larger radius \(r = 4\times10^{13}\) has been chosen for the optimization to include information from poles located further away from the frequency of interest. The target function \(t(p_1,\dots,p_5) = -q_n \left(1 - \frac{(\omega_n-\omega_0)^2}{r^2} \right)\)is minimized. The first factor is the negative Q-Factor and the second factor ensures that the target is zero at the boundary. If no eigenfrequency \(\omega_n\) is located inside the contour, the target is set to zero. For the purpose of this data publication some numerical parameters have been improved. This resulted in a faster convergence of the optimization.


  • JCMsuite (version 5.2.0 or newer)
  • MATLAB (tested with version R2019b)

In order to run the scripts you must replace the corresponding place holders in the files by a path to your installation of JCMsuite. Free trial licenses are available, please refer to the homepage of JCMwave


[1] Felix Binkowski, Fridtjof Betz, Martin Hammerschmidt, Philipp-Immanuel Schneider, Lin Zschiedrich, Sven Burger, Computation of eigenfrequency sensitivities using Riesz projections for efficient optimization of nanophotonic resonators, Communications Physics 5, 202 (2022),

[2] Felix Binkowski, Lin Zschiedrich, Sven Burger, A Riesz-projection-based method for nonlinear eigenvalue problems, Journal of Computational Physics 419, 109678 (2020),

[3] Fridtjof Betz, Felix Binkowski, Sven Burger, RPExpand: Software for Riesz projection expansion of resonance phenomena, SoftwareX 15, 100763 (2021),

[4] Jan Pomplun, Sven Burger, Lin Zschiedrich, Frank Schmidt, Adaptive finite element method for simulation of optical nano structures, Physica Status Solidi B 244, 3419 (2007),

[5] Kirill Koshelev, Sergey Kruk, Elizaveta Melik-Gaykazyan, Jae-Hyuck Choi, Andrey Bogdanov, Hong-Gyu Park, Yuri Kivshar, Subwavelength dielectric resonators for nonlinear nanophotonics, Science 367, 288 (2020),

We acknowledge funding by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany's Excellence Strategy - The Berlin Mathematics Research Center MATH+ (EXC-2046/1, project ID: 390685689) and the German Federal Ministry of Education and Research (BMBF Forschungscampus MODAL, project 05M20ZBM). This project has received funding from the EMPIR programme co-financed by the Participating States and from the European Union's Horizon 2020 research and innovation programme (project 20FUN02 POLIGHT). We further thank Kirill Koshelev for providing the experimental material data for the physical system investigated in this work.
Files (131.6 kB)
Name Size
131.6 kB Download
All versions This version
Views 189189
Downloads 1313
Data volume 1.7 MB1.7 MB
Unique views 150150
Unique downloads 1313


Cite as