of the problem in this section closely follows the recently published paper [@Mansha-OpEx17], which explores a new computational method, “FLAME-slab,” for electromagnetic wave scattering problems in aperiodic photonic structures – specifically, structures possessing short-range regularity but lacking long-range order, such as amorphous or quasicrystalline lattices. Structures of this type can exhibit a variety of interesting properties, e.g. highly isotropic band gaps and fractal photonic spectra, but are difficult to study numerically . FLAME-slab exploits the short-range regularity of the structure by generating a Trefftz basis in a relatively small segment of the structure.

As an example, we consider a slab substrate patterned with aperiodically placed but geometrically identical pillars (Fig. \[fig:schematic\]). The slab has thickness $d$, and there are 10 pillars of height $d$ and width $w = 0.8 \, d$. Both the substrate and the pillars have dielectric constant $\varepsilon=12$. The surrounding medium is air. In our calculations, we adopt computational units where the vacuum constants and the speed of light are all set to unity: $\varepsilon_{0} = 1$, $\mu_{0} = 1$, $c = 1$. Then the frequency $f$ has the units of $1/\lambda$, where $\lambda$ is the free space wavelength.

Light is incident from the top, as shown 