Nanophotonic resonators in stratified media with the nanobem toolbox
nanobem is a recently developed matlab toolbox for the solution of Maxwell's equations using a boundary element method, which is particularly suited for nanophotonic resonators and the computation of resonance modes [Hohenester et al., CPC 276, 108337 (2022)]. In this paper we present an extension that allows simulating nanoparticles situated in stratified media, using the matrix-friendly approach of Chew. Possible simulation setups include nanoparticles on substrates or embedded in layer structures, holes in films, or void structures. We provide a detailed documentation of the various toolbox classes, and present selected showcase results and convergence studies.