===========================================================
                                      .___ __  __   
          _________________  __ __  __| _/|__|/  |_ 
         / ___\_` __ \__  \ |  |  \/ __ | | \\_  __\
        / /_/  >  | \// __ \|  |  / /_/ | |  ||  |  
        \___  /|__|  (____  /____/\____ | |__||__|  
       /_____/            \/           \/           
              grep rough audit - static analysis tool
                  v2.8 written by @Wireghoul
=================================[justanotherhacker.com]===
meep-1.12.0/configure.ac-282-else
meep-1.12.0/configure.ac:283:  GUILE_LIBS=`$GUILE_CONFIG link`
meep-1.12.0/configure.ac:284:  GUILE_CPPFLAGS=`$GUILE_CONFIG compile`
meep-1.12.0/configure.ac-285-  CPPFLAGS="$CPPFLAGS $GUILE_CPPFLAGS"
##############################################
meep-1.12.0/configure.ac-533-      AC_MSG_CHECKING([for Python include directory])
meep-1.12.0/configure.ac:534:      pinc=`echo "import distutils.sysconfig; print (distutils.sysconfig.get_python_inc())" | $PYTHON - 2>/dev/null`
meep-1.12.0/configure.ac-535-      AC_MSG_RESULT([${pinc:-unknown}])
##############################################
meep-1.12.0/configure.ac-543-        AC_MSG_CHECKING([for Numpy include directory])
meep-1.12.0/configure.ac:544:        pinc=`echo "import numpy; print (numpy.get_include())" | $PYTHON - 2>/dev/null`
meep-1.12.0/configure.ac-545-        AC_MSG_RESULT([${pinc:-unknown}])
##############################################
meep-1.12.0/doc/docs/Build_From_Source.md-19-
meep-1.12.0/doc/docs/Build_From_Source.md:20:Most of the software below, including Meep, installs under `/usr/local` by default. That is, libraries go in `/usr/local/lib`, programs in `/usr/local/bin`, etc. If you don't have `root` privileges on your machine, you may need to install somewhere else, e.g. under `$HOME/install` (the `install/` subdirectory of your home directory). Most of the programs below use a GNU-style `configure` script, which means that all you would do to install there would be:
meep-1.12.0/doc/docs/Build_From_Source.md-21-
##############################################
meep-1.12.0/doc/docs/Build_From_Source.md-25-
meep-1.12.0/doc/docs/Build_From_Source.md:26:when configuring the program. The directories `$HOME/install/lib` etc. are created automatically as needed.
meep-1.12.0/doc/docs/Build_From_Source.md-27-
##############################################
meep-1.12.0/doc/docs/Build_From_Source.md-29-
meep-1.12.0/doc/docs/Build_From_Source.md:30:There are two further complications. First, if you install dependencies in a non-standard location like `$HOME/install/lib`, you will need to tell the compilers where to find the libraries and header files that you installed. You do this by passing two variables to `./configure`:
meep-1.12.0/doc/docs/Build_From_Source.md-31-
##############################################
meep-1.12.0/doc/docs/Build_From_Source.md-48-
meep-1.12.0/doc/docs/Build_From_Source.md:49:There are several ways to do this.  Suppose that you installed libraries into the directory `$HOME/install/lib`.   The most robust option is probably to include this path in the linker flags:
meep-1.12.0/doc/docs/Build_From_Source.md-50-
##############################################
meep-1.12.0/doc/docs/Build_From_Source.md-56-
meep-1.12.0/doc/docs/Build_From_Source.md:57:On many systems, you can also specify directories to the runtime linker via the `LD_LIBRARY_PATH` environment variable. In particular, by `export LD_LIBRARY_PATH="$HOME/install/lib:$LD_LIBRARY_PATH"`; you can add this to your `.profile` file (depending on your shell) to make it run every time you run your shell. On MacOS, a security feature called [System Integrity Protection](https://en.wikipedia.org/wiki/System_Integrity_Protection) causes the value of `LD_LIBRARY_PATH` to be ignored, so using environment variables won't work there.
meep-1.12.0/doc/docs/Build_From_Source.md-58-
##############################################
meep-1.12.0/doc/docs/Exploiting_Symmetry.md-45-
meep-1.12.0/doc/docs/Exploiting_Symmetry.md:46:In a cylindrical simulation, fields can be written in the form of a function of ($r$,$z$) multiplied by a function $\exp(im\phi)$ for the $\phi$ dependence, where $m$ is a user-specified parameter (related to the angular momentum of the field). If the cell includes the $r$=0 origin, then $m$ must be an integer to be single-valued at the origin. Otherwise, $m$ can be arbitrary (this is useful e.g. for bend simulations).
meep-1.12.0/doc/docs/Exploiting_Symmetry.md-47-
##############################################
meep-1.12.0/doc/docs/FAQ.md-483-
meep-1.12.0/doc/docs/FAQ.md:484:To model e.g., fiber waveguides with 2d claddings, diffractive binary gratings with arbitrary incident planewaves in 3d, etc. in Cartesian coordinates, you would create a 2d cell in the $xy$ plane and specify a `k_point` with *non-zero* component in $z$. The resulting 3d simulation involves all electromagnetic fields (rather than a 2d simulation which involves a subset of the fields determined by the polarization of the current source). Performance can be improved by specifying `special_kz=True` in the `Simulation` constructor; this results in a 2d simulation with real rather than complex fields (as long as the $x$ and $y$ components of `k_point` are zero).
meep-1.12.0/doc/docs/FAQ.md-485-
##############################################
meep-1.12.0/doc/docs/Guile_and_Scheme_Information.md-83-
meep-1.12.0/doc/docs/Guile_and_Scheme_Information.md:84:``for x in `seq a dx b`; do meep x=$x myfile.ctl; done``
##############################################
meep-1.12.0/doc/docs/Introduction.md-51-
meep-1.12.0/doc/docs/Introduction.md:52:For example, suppose we are describing some photonic structure at [infrared](https://en.wikipedia.org/wiki/Infrared) frequencies, where it is convenient to specify distances in [microns](https://en.wikipedia.org/wiki/Micrometre). Thus, we let $a$ = 1 μm. Then, if we want to specify a source corresponding to λ = 1.55 μm, we specify the frequency *f* as 1/1.55 = 0.6452. If we want to run our simulation for 100 periods, we then run it for 155 time units (= 100/*f*). At a grid resolution ($Δx$) of 10 pixels/μm and [Courant factor](https://en.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E2%80%93Lewy_condition) ($S$) of 0.5, one timestep is 0.05 time units or 166.67 μs ($cΔ t = SΔ x$).
meep-1.12.0/doc/docs/Introduction.md-53-
##############################################
meep-1.12.0/doc/docs/Introduction.md-62-
meep-1.12.0/doc/docs/Introduction.md:63:With ordinary [periodic boundaries](FAQ.md#how-does-k_point-define-the-phase-relation-between-adjacent-unit-cells) in a cell of size $L$, the field components satisfy $f(x+L) = f(x)$. **Bloch periodicity** is a generalization where $f(x+L) = e^{ik_x L} f(x)$ for some *Bloch wavevector* $\mathbf{k}$. This can be used to solve for the modes of waveguides, gratings, and so on, much like in [MPB](https://mpb.readthedocs.io). See Chapter 3 of [Photonic Crystals: Molding the Flow of Light (second edition)](http://ab-initio.mit.edu/book).
meep-1.12.0/doc/docs/Introduction.md-64-
##############################################
meep-1.12.0/doc/docs/Materials.md-33-
meep-1.12.0/doc/docs/Materials.md:34:where σ$_D$ is the electric conductivity, ω$_n$ and γ$_n$ are user-specified constants. Actually, the numbers that one specifies are f$_n$ = ω$_n$/2π and γ$_n$/2π. The  σ$_n(\mathbf{x})$ is a user-specified function of position giving the strength of the *n*-th resonance. The σ parameters can be anisotropic (real-symmetric) tensors, while the frequency-independent term ε$_\infty$ can be an arbitrary real-symmetric tensor as well. This corresponds to evolving **P** via the equations:
meep-1.12.0/doc/docs/Materials.md-35-
##############################################
meep-1.12.0/doc/docs/Materials.md-59-
meep-1.12.0/doc/docs/Materials.md:60:where λ is the vacuum wavelength, each term containing two coefficients (B<sub>n</sub> and C<sub>n</sub>) can be directly transferred to a Lorentzian polarization field using a simple substitution of variables: ω<sub>n</sub>=1/$\sqrt{C_n}$, γ<sub>n</sub>=0, and σ<sub>n</sub>=B<sub>n</sub>. Several examples of importing Sellmeier coefficients from published fitting data including [germanium](https://github.com/NanoComp/meep/blob/master/python/materials.py#L870-L886) (Ge) and [gallium nitride](https://github.com/NanoComp/meep/blob/master/python/materials.py#L1148-L1173) (GaN) are provided in the [Materials Library](#materials-library).
meep-1.12.0/doc/docs/Materials.md-61-
##############################################
meep-1.12.0/doc/docs/Materials.md-96-
meep-1.12.0/doc/docs/Materials.md:97:**Note**: the "conductivity" in Meep is slightly different from the conductivity you might find in a textbook, because for computational convenience it appears as $\sigma_D \mathbf{D}$ in our Maxwell equations rather than the more-conventional $\sigma \mathbf{E}$; this just means that our definition is different from the usual electric conductivity by a factor of ε. Also, just as Meep uses the dimensionless relative permittivity for ε, it uses nondimensionalized units of 1/*a* (where *a* is your unit of distance) for the conductivities $\sigma_{D,B}$. If you have the electric conductivity $\sigma$ in SI units and want to convert to $\sigma_D$ in Meep units, you can simply use the formula: $\sigma_D = (a/c) \sigma / \varepsilon_r \varepsilon_0$ where *a* is your unit of distance in meters, *c* is the vacuum speed of light in m/s, $\varepsilon_0$ is the SI vacuum permittivity, and $\varepsilon_r$ is the real relative permittivity.
meep-1.12.0/doc/docs/Materials.md-98-
##############################################
meep-1.12.0/doc/docs/Materials.md-133-
meep-1.12.0/doc/docs/Materials.md:134:where $\Delta N(\mathbf{x},t) = N_{\textrm{upper}} - N_{\textrm{lower}}$ is the inversion of the two atomic energy levels which comprise the $n$th lasing transition, $\omega_n$ is the central frequency of the atomic transition, $\Gamma_n$ is the full width half-maximum of the width of the transition, and $\boldsymbol{\sigma}_n$ is the strength and orientation of the $n$th transition which couples the electric field and the atomic medium. Note that this polarization equation is only modeling the nonlinear, saturable portion of the polarization. The atomic level population densities, $N_i(\mathbf{x},t)$, each satisfy a rate equation of the form:
meep-1.12.0/doc/docs/Materials.md-135-
##############################################
meep-1.12.0/doc/docs/Mode_Decomposition.md-66-
meep-1.12.0/doc/docs/Mode_Decomposition.md:67:+ `parity` is the parity of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry in the source region. If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `ODD_Z+EVEN_Y`. This is especially useful in 2d simulations to restrict yourself to a desired polarization
meep-1.12.0/doc/docs/Mode_Decomposition.md-68-
##############################################
meep-1.12.0/doc/docs/Mode_Decomposition.md-72-
meep-1.12.0/doc/docs/Mode_Decomposition.md:73:+ `coeffs` is a user-allocated array of type `std::complex<double>` (shortened hereafter to `cdouble`) of length `2*num_freqs*num_bands` where `num_freqs` is the number of frequencies stored in the `flux` object (equivalent to `flux->Nfreq`) and `num_bands` is the length of the `bands` input array. The expansion coefficients for the mode with frequency `nf` and band index `nb`  are stored sequentially as α$^+$, α$^-$ starting at slot `2*nb*num_freqs+nf` of this array
meep-1.12.0/doc/docs/Mode_Decomposition.md-74-
##############################################
meep-1.12.0/doc/docs/Mode_Decomposition.md-86-
meep-1.12.0/doc/docs/Mode_Decomposition.md:87:+ `kdom_list` is a user allocated array of `meep::vec` objects of length (`num_bands` * `num_freqs`). If non-null, this array is filled in with the wavevectors of the dominant planewave in the Fourier series expansion for each band from 1 to (`num_bands` * `num_freqs`). `kdom_list[nb*num_freqs + nf]` is the dominant planewave of the mode with frequency `nf` and band index `nb`. (Defaults to `NULL`.)  This is especially useful for interpreting the modes computed in a uniform medium, because those modes are exactly planewaves proportional to $exp(2\pi i \mathrm{kdom}\cdot \vec{x})$ where `kdom` is the wavevector.
meep-1.12.0/doc/docs/Mode_Decomposition.md-88-
##############################################
meep-1.12.0/doc/docs/Mode_Decomposition.md-203-
meep-1.12.0/doc/docs/Mode_Decomposition.md:204:where $S$ is any surface transverse to the direction of propagation and $\hat{\mathbf{n}}$ is the unit normal vector to $S$ (i.e. $\hat{\mathbf{z}}$ in the case considered above). The normalization constant $C_{m}$ is a matter of convention, but in MPB it is taken to be the group velocity of the mode, $v_m$, times the area $A_S$ of the cross-sectional surface $S$: $$C_m = v_m A_S$$.
meep-1.12.0/doc/docs/Mode_Decomposition.md-205-
##############################################
meep-1.12.0/doc/docs/Perfectly_Matched_Layer.md-27-
meep-1.12.0/doc/docs/Perfectly_Matched_Layer.md:28:For sources extending into the PML, such as planewaves which must span the entire width of the cell with Bloch-periodic boundary conditions (see e.g. [Tutorials/Basics/Mie Scattering of a Lossless Dielectric Sphere](Python_Tutorials/Basics.md#mie-scattering-of-a-lossless-dielectric-sphere)), the `is_integrated` parameter of the `Source` object must be set to `True` in order to generate planar wavefronts. This is demonstrated in the following example for an $E_z$-polarized planewave propagating in the $x$ direction in a 2d cell surrounded by PML. A side-by-side comparison of the $E_z$ field profile indicates that the wavefronts are not planar for `is_integrated=False` (the default).
meep-1.12.0/doc/docs/Perfectly_Matched_Layer.md-29-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Basics.md-51-
meep-1.12.0/doc/docs/Python_Tutorials/Basics.md:52:The waveguide is specified by a `Block` (parallelepiped) of size $\infty \times 1 \times \infty$, with $ε=12$, centered at (0,0) which is the center of the cell. By default, any place where there are no objects there is air ($ε=1$), although this can be changed by setting the `default_material` variable. The resulting structure is shown below.
meep-1.12.0/doc/docs/Python_Tutorials/Basics.md-53-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Basics.md-63-
meep-1.12.0/doc/docs/Python_Tutorials/Basics.md:64:We gave the source a frequency of 0.15, and specified a [`ContinuousSource`](../Python_User_Interface.md#continuoussource) which is just a fixed-frequency sinusoid $\exp(-i \omega t)$ that by default is turned on at $t=0$. Recall that, in [Meep units](../Introduction.md#units-in-meep), frequency is specified in units of 2πc, which is equivalent to the inverse of the vacuum wavelength. Thus, 0.15 corresponds to a vacuum wavelength of about 1/0.15=6.67 μm, or a wavelength of about 2 μm in the ε=12 material &mdash; thus, our waveguide is half a wavelength wide, which should hopefully make it single mode. In fact, the cutoff for single-mode behavior in this waveguide is analytically solvable, and corresponds to a frequency of 1/2√11 or roughly 0.15076. Note also that to specify a J<sub>z</sub>, we specify a component `Ez` (e.g., if we wanted a magnetic current, we would specify `Hx`, `Hy`, or `Hz`). The current is located at (-7,0), which is 1 μm to the right of the left edge of the cell &mdash; we always want to leave a little space between sources and the cell boundaries, to keep the boundary conditions from interfering with them.
meep-1.12.0/doc/docs/Python_Tutorials/Basics.md-65-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Basics.md-806-
meep-1.12.0/doc/docs/Python_Tutorials/Basics.md:807:The signal processing is performed by the `Harminv` routine, which takes four arguments: the field component E<sub>z</sub> and position ($r$+0.1,0) to analyze, and a frequency range given by a center frequency and bandwidth (same as the source pulse). Note that we wrap `Harminv` in `after_sources(...)`, since we only want to analyze the frequencies in the source-free system (the presence of a source will distort the analysis). At the end of the run, `Harminv` prints a series of lines (beginning with `harminv0:`) listing the frequencies it found:
meep-1.12.0/doc/docs/Python_Tutorials/Basics.md-808-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Eigenmode_Source.md-164-
meep-1.12.0/doc/docs/Python_Tutorials/Eigenmode_Source.md:165:Note that this example involves a `ContinuousSource` for the time profile. For a pulsed source, the oblique planewave is incident at a given angle for only a *single* frequency component of the source. This is a fundamental feature of FDTD simulations and not of Meep per se. Thus, to simulate an incident planewave at multiple angles for a given frequency ω, you will need to do separate simulations involving different values of $\vec{k}$ (`k_point`) since each set of ($\vec{k}$,ω) specifying the Bloch-periodic boundaries and the frequency of the source will produce a different angle of the planewave. For more details, refer to Section 4.5 ("Efficient Frequency-Angle Coverage") in [Chapter 4](https://arxiv.org/abs/1301.5366) ("Electromagnetic Wave Source Conditions") of [Advances in FDTD Computational Electrodynamics: Photonics and Nanotechnology](https://www.amazon.com/Advances-FDTD-Computational-Electrodynamics-Nanotechnology/dp/1608071707).
meep-1.12.0/doc/docs/Python_Tutorials/Eigenmode_Source.md-166-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/GDSII_Import.md-152-
meep-1.12.0/doc/docs/Python_Tutorials/GDSII_Import.md:153:For a given waveguide separation distance (`d`), the simulation computes the transmittance of Ports 2, 3, and 4. The transmittance is the square of the [S-parameter](https://en.wikipedia.org/wiki/Scattering_parameters) which is equivalent to the [mode coefficient](Mode_Decomposition.md). There is an additional mode monitor at Port 1 to compute the input power from the adjacent eigenmode source; this is used for normalization when computing the transmittance. The eight layers of the GDSII file are each converted to a `Simulation` object: the upper and lower branches of the coupler are defined as a collection of [`Prism`](../Python_User_Interface.md#prism)s, the rectilinear regions of the source and flux monitor as a [`Volume`](../Python_User_Interface.md#volume) and [`FluxRegion`](../Python_User_Interface.md#fluxregion). The size of the cell in the $y$ direction is dependent on `d`. The default dimensionality is 2d. An optional input parameter (`three_d`) converts the geometry to 3d by extruding the coupler geometry in the *z* direction and adding an oxide layer beneath similar to a [silicon on insulator](https://en.wikipedia.org/wiki/Silicon_on_insulator) (SOI) substrate. A schematic of the coupler design in 3d generated using MayaVi is shown below.
meep-1.12.0/doc/docs/Python_Tutorials/GDSII_Import.md-154-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Local_Density_of_States.md-14-
meep-1.12.0/doc/docs/Python_Tutorials/Local_Density_of_States.md:15:where $Q^{(n)}=\omega^{(n)}/2\gamma^{(n)}$ is the dimensionless [quality factor](https://en.wikipedia.org/wiki/Q_factor) and $V^{(n)}$ is the modal volume. This represents another way to compute the LDOS. In this tutorial, we will verify this expression by comparing it to the earlier one.
meep-1.12.0/doc/docs/Python_Tutorials/Local_Density_of_States.md-16-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Local_Density_of_States.md-18-
meep-1.12.0/doc/docs/Python_Tutorials/Local_Density_of_States.md:19:We will validate both this prediction and the LDOS calculations above by computing the LDOS at the center of the cavity, the point of peak $|\vec{E}|$, in two ways. First, we compute the LDOS directly from the power radiated by a dipole, Fourier-transforming the result of a pulse using the `dft_ldos` command. Second, we compute the cavity mode and its lifetime $Q$ using `Harminv` and then compute the LDOS by the Purcell formula shown above. The latter technique is much more efficient for high Q (small $w$), since one must run the simulation for a very long time to directly accumulate the Fourier transform of a slowly-decaying mode. The two calculations, we will demonstrate, agree to within discretization error, verifying the LDOS analysis above, and $Q/V$ is asymptotically linear on a semilog scale versus $1/w$ as predicted.
meep-1.12.0/doc/docs/Python_Tutorials/Local_Density_of_States.md-20-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Material_Dispersion.md-161-
meep-1.12.0/doc/docs/Python_Tutorials/Material_Dispersion.md:162:The `run_k_points` function returns a *list of lists* of frequencies &mdash; one list of complex frequencies for each *k* point &mdash; which we store in the `all_freqs` variable. Finally, we want to loop over this list and print out the corresponding ε via the ratio (ck/ω)$^2$ as described above. To do this, we will use Python's `zip` function which combines multiple lists into one:
meep-1.12.0/doc/docs/Python_Tutorials/Material_Dispersion.md-163-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Mode_Decomposition.md-249-
meep-1.12.0/doc/docs/Python_Tutorials/Mode_Decomposition.md:250:Note the use of the keyword parameter argument `eig_parity=mp.ODD_Z+mp.EVEN_Y` in the call to `get_eigenmode_coefficients`. This is important for specifying **non-degenerate** modes in MPB since the `k_point` is (0,0,0). `ODD_Z` is for modes with $E_z$ polarization. `EVEN_Y` is necessary since each diffraction order which is based on a given k<sub>x</sub> consists of *two* modes: one going in the +y direction and the other in the -y direction. `EVEN_Y` forces MPB to compute only the +k<sub>y</sub> + -k<sub>y</sub> (cosine) mode. As a result, the total transmittance must be halved in this case to obtain the transmittance for the individual +k<sub>y</sub> or -k<sub>y</sub> mode. For `ODD_Y`, MPB will compute the +k<sub>y</sub> - -k<sub>y</sub> (sine) mode but this will have zero power because the source is even. If the $y$ parity is left out, MPB will return a random superposition of the cosine and sine modes. Alternatively, in this example an input planewave with H<sub>z</sub> instead of $E_z$ polarization can be used which requires `eig_parity=mp.EVEN_Z+mp.ODD_Y` as well as an odd mirror symmetry plane in *y*. Finally, note the use of `add_flux` instead of `add_mode_monitor` when using symmetries.
meep-1.12.0/doc/docs/Python_Tutorials/Mode_Decomposition.md-251-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md-92-
meep-1.12.0/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md:93:For the second of two cases, we use the `get_farfield` routine to compute the far fields by looping over a set of 100 equally-spaced points along the circumference of a circle with radius of 1 mm. The six far field components ($E_x$, $E_y$, $E_z$, $H_x$, $H_y$, $H_z$) are stored as separate arrays of complex numbers. From the far fields at each point $\mathbf{r}$, we compute the outgoing or radial flux: $\sqrt{P_x^2+P_y^2}$, where $P_x$ and $P_y$ are the components of the Poynting vector $\mathbf{P}(\mathbf{r})=(P_x,P_y,P_z)=\mathrm{Re}\, \mathbf{E}(\mathbf{r})^*\times\mathbf{H}(\mathbf{r})$. Note that $P_z$ is always 0 since this is a 2d simulation. The total flux is computed and the three flux values are displayed.
meep-1.12.0/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md-94-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Optical_Forces.md-117-
meep-1.12.0/doc/docs/Python_Tutorials/Optical_Forces.md:118:There are two important items to note in `parallel_waveguide`: (1) a single flux surface is used to compute the Poynting flux in $z$ which spans an area slightly larger than both waveguides rather than two separate flux surfaces (one for each waveguide). This is because in the limit of small separation, two flux surfaces overlap whereas the total power through a single flux surface need, by symmetry, only be halved in order to determine the value for just one of the two waveguides. (2) Instead of defining a closed, four-sided "box" surrounding the waveguides, the MST is computed along just two $y$-oriented lines (to obtain the force in the $x$ direction) with different `weight` values to correctly sum the total force. By symmetry, the force in the $y$ direction is zero and need not be computed. Choosing a suitable runtime requires some care. A large runtime is necessary to obtain the steady-state response but this will also lead to large values for the discrete Fourier-transformed fields used to compute both the flux and the MST. Large floating-point numbers may contain [roundoff errors](https://en.wikipedia.org/wiki/Round-off_error).
meep-1.12.0/doc/docs/Python_Tutorials/Optical_Forces.md-119-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-88-
meep-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:89:The source will now be the usual Gaussian pulse centered at `fcen`, located at one edge of the cell just outside the PML, at `x = - 0.5 * sx + dpml`. Ideally, we would excite exactly the fundamental mode of the waveguide, but it is good enough to just excite it with a line source. Moreover, since we are interested in the $P$ polarization (electric field in the plane), we will excite it with a $J_y$ current source (transverse to the propagation direction), which is specified as `Ey`:
meep-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-90-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-277-
meep-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:278:The results, shown above, are exactly what we expected: at first, an exponential increase of $Q$ with `N`, and then a saturation at $Q_r \approx 8750$. However, when we look at the Harminv output for larger `N`, something strange happens &mdash; it starts to find *more modes*! For example, at `N=16`, the output is:
meep-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-279-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-306-
meep-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:307:Let us briefly review the problem. In a periodic system of this sort, the eigen-solutions can be expressed in the form of *Bloch modes*: a periodic *Bloch envelope* multiplied by a planewave $\exp[i(\mathbf{k}\cdot\mathbf{x}-ω t)]$, where **k** is the *Bloch wavevector*. We wish to find the *bands* $ω(\mathbf{k})$. In this case, there is only *one* direction of periodicity, so we only have one wavevector component $k_x$. Moreover, the solutions are periodic functions of this wavevector: for a unit-period structure, $k_x$ and $k_x+2\pi$ are redundant. Also, $k_x$ and $-k_x$ are redundant by time-reversal symmetry, so we only need to look for solutions in the *irreducible Brillouin zone* from $k_x=0$ to $k_x=\pi$.
meep-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-308-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-374-
meep-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:375:Here, we have used Meep's built-in `interpolate` function to interpolate a set of 19 $\mathbf{k}$ points between $\mathbf{k} = 0$ and $\mathbf{k} = 0.5 \cdot 2π \hat{\mathbf{x}}$, to cover the irreducible Brillouin zone. This function automatically runs Harminv, using the frequency range and location taken from the Gaussian source in the `sources` list. It also calls `output_epsilon`. The output is not only the usual `harminv:` lines, but it also outputs a series of lines like:
meep-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-376-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-38-
meep-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md:39:The key thing is to set the `dimensions` parameter to `CYLINDRICAL`. This means that all vectors will represent ($r$,φ,$z$) coordinates instead of ($x$,$y$,$z$). The computational cell in the $r$ direction is of size `sr = r + w + pad + dpml`, and runs from `0` to `sr` (by default) rather than from `-sr/2` to `sr/2` as it would for any other dimension. Note that our $z$ size is 0 because it is in 2d. The φ size is also 0, corresponding to the continuous rotational symmetry. A finite φ size might correspond to discrete rotational symmetry, but this is not currently supported.
meep-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-40-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-86-
meep-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md:87:At the very end, we'll also output one period of the fields to make movies, etcetera. A single field output would be a 1d dataset along the $r$ direction, so to make things more interesting we'll use `to_appended` to append these datasets to a single HDF5 file to get an $r \times t$ 2d dataset. We'll also use `in_volume` to specify a larger output volume than just the computational cell: in particular, we'll output from `-sr` to `sr` in the $r$ direction, where Meep will automatically infer the $-r$ field values from the reflection symmetry.
meep-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-88-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-133-
meep-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md:134:The problem is twofold. First, there is some signal-processing error in determining $Q$ in the 2d case, as indicated by the "error" column of the `harminv` output which is only 4e-7 for the 2d simulation vs. 6e-11 for the cylindrical case. We can bring this error down by running with a narrower bandwidth source, which excites just one mode and gives a cleaner signal, or by analyzing over a longer time than 200. Doing the former, we find that the 2d value of $Q$ at a resolution of 20 should really be $Q$=343. Second, [PML](../Perfectly_Matched_Layer.md) absorbing layers are really designed to absorb planewaves incident on flat interfaces, but here we have a *cylindrical* PML layer. Because of this, there are larger numerical reflections from the PML in the cylindrical simulation, which we can rectify by pushing the PML out to a larger radius (i.e. using a larger value of `pad`) and/or increasing the PML thickness (increasing `dpml`) so that it turns on more adiabatically. In the cylindrical simulation for `resolution = 20`, if we increase to `dpml = 16`, we get $Q$=343, which is in much better agreement with the 2d calculation and if we increase to `dpml = 32` we get the same $Q$=343, so it seems to be converged.
meep-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-135-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md-6-
meep-1.12.0/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md:7:Since this is a 1d calculation, we could implement it via a 2d cell of `Vector3(S,0,0)`, specifying periodic boundary conditions in the $y$ direction. However, this is slightly inefficient since the $y$ periodic boundaries are implemented internally via extra "ghost pixels" in the $y$ direction. Instead, Meep has special support for 1d simulations in the $z$ direction. To use this, we must explicitly set `dimensions` to `1`, and in that case we can *only* use $E_x$ (and $D_x$) and $H_y$ field components. This involves no loss of generality because of the symmetry of the problem.
meep-1.12.0/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md-8-
##############################################
meep-1.12.0/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md-98-
meep-1.12.0/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md:99:We could print these with more `display_fluxes` lines, but it is nice to print these on a single line along with χ$^{(3)}$ and the amplitude, so that we can eventually put them all into one table in our plotting program. To do this, we'll use the lower-level function `get_fluxes(trans1)`, which returns a list of the flux values, and take the first element of the list since there is only one:
meep-1.12.0/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md-100-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-97-meep-1.12.0/doc/docs/Python_User_Interface.md:98:Explicitly specifies the dimensionality of the simulation, if the value is less than 3. If the value is 3 (the default), then the dimensions are automatically reduced to 2 if possible when `cell_size` in the $z$ direction is `0`. If `dimensions` is the special value of `CYLINDRICAL`, then cylindrical coordinates are used and the $x$ and $z$ dimensions are interpreted as $r$ and $z$, respectively. If `dimensions` is 1, then the cell must be along the $z$ direction and only $E_x$ and $H_y$ field components are permitted. If `dimensions` is 2, then the cell must be in the $xy$ plane.
meep-1.12.0/doc/docs/Python_User_Interface.md-99-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-101-meep-1.12.0/doc/docs/Python_User_Interface.md:102:For `CYLINDRICAL` simulations, specifies that the angular $\phi$ dependence of the fields is of the form $e^{im\phi}$ (default is `m=0`). If the simulation cell includes the origin $r=0$, then `m` must be an integer.
meep-1.12.0/doc/docs/Python_User_Interface.md-103-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-105-meep-1.12.0/doc/docs/Python_User_Interface.md:106:For `CYLINDRICAL` simulations with |*m*| &gt; 1, compute more accurate fields near the origin $r=0$ at the expense of requiring a smaller Courant factor. Empirically, when this option is set to `True`, a Courant factor of roughly $\min[0.5, 1 / (|m| + 0.5)]$ or smaller seems to be needed. Default is `False`, in which case the $D_r$, $D_z$, and $B_r$ fields within |*m*| pixels of the origin are forced to zero, which usually ensures stability with the default Courant factor of 0.5, at the expense of slowing convergence of the fields near $r=0$.
meep-1.12.0/doc/docs/Python_User_Interface.md-107-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-113-meep-1.12.0/doc/docs/Python_User_Interface.md:114:If `False` (the default), then the boundaries are perfect metallic (zero electric field). If a `Vector3`, then the boundaries are Bloch-periodic: the fields at one side are $\exp(i\mathbf{k}\cdot\mathbf{R})$ times the fields at the other side, separated by the lattice vector $\mathbf{R}$. A non-zero `Vector3` will produce complex fields. The `k_point` vector is specified in Cartesian coordinates in units of 2π/distance. Note: this is *different* from [MPB](https://mpb.readthedocs.io), equivalent to taking MPB's `k_points` through its function `reciprocal->cartesian`.
meep-1.12.0/doc/docs/Python_User_Interface.md-115-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-117-meep-1.12.0/doc/docs/Python_User_Interface.md:118:A 2d cell (i.e., `dimensions=2`) combined with a `k_point` that has a *non-zero* component in $z$ would normally result in a 3d simulation with complex fields. However, by default (`kz_2d="complex"`), Meep will use a 2d computational cell in which $k_z$ is incorporated as an additional term in Maxwell's equations, which still results in complex fields but greatly improved performance.
meep-1.12.0/doc/docs/Python_User_Interface.md-119-Setting `kz_2d="3d"` will instead use a 3d cell that is one pixel thick (with Bloch-periodic boundary conditions), which is considerably more expensive. The third possibility, `kz_2d="real/imag"`, saves an additional factor of two by storing some field components as purely real and some as purely imaginary in a "real" field, but this option requires some care to use and will be explained elsewhere in the future.
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-333-meep-1.12.0/doc/docs/Python_User_Interface.md:334:The scale factor σ. You can also specify an anisotropic σ tensor by using the property `sigma_diag` which takes three numbers or a `Vector3` to give the σ$_n$ tensor diagonal, and `sigma_offdiag` which specifies the offdiagonal elements (defaults to 0). That is, `sigma_diag=mp.Vector3(a, b, c)` and `sigma_offdiag=mp.Vector3(u, v, w)` corresponds to a σ tensor
meep-1.12.0/doc/docs/Python_User_Interface.md-335-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-736-meep-1.12.0/doc/docs/Python_User_Interface.md:737:Specify the direction of the boundaries to put the PML layers next to. e.g. if `X`, then specifies PML on the $\pm x$ boundaries (depending on the value of `side`, below). Default is the special value `ALL`, which puts PML layers on the boundaries in all directions.
meep-1.12.0/doc/docs/Python_User_Interface.md-738-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-740-meep-1.12.0/doc/docs/Python_User_Interface.md:741:Specify which side, `Low` or `High` of the boundary or boundaries to put PML on. e.g. if side is `Low` and direction is `X`, then a PML layer is added to the $-x$ boundary. Default is the special value `ALL`, which puts PML layers on both sides.
meep-1.12.0/doc/docs/Python_User_Interface.md-742-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-748-meep-1.12.0/doc/docs/Python_User_Interface.md:749:By default, Meep turns on the PML conductivity quadratically within the PML layer &mdash; one doesn't want to turn it on suddenly, because that exacerbates reflections due to the discretization. More generally, with `pml_profile` one can specify an arbitrary PML "profile" function $f(u)$ that determines the shape of the PML absorption profile up to an overall constant factor. *u* goes from 0 to 1 at the start and end of the PML, and the default is $f(u) = u^2$. In some cases where a very thick PML is required, such as in a periodic medium (where there is technically no such thing as a true PML, only a pseudo-PML), it can be advantageous to turn on the PML absorption more smoothly. See [Optics Express, Vol. 16, pp. 11376-92, 2008](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). For example, one can use a cubic profile $f(u) = u^3$ by specifying `pml_profile=lambda u: u*u*u`.
meep-1.12.0/doc/docs/Python_User_Interface.md-750-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-764-
meep-1.12.0/doc/docs/Python_User_Interface.md:765:The `Source` class is used to specify the current sources via the `Simulation.sources` attribute. Note that all sources in Meep are separable in time and space, i.e. of the form $\mathbf{J}(\mathbf{x},t) = \mathbf{A}(\mathbf{x}) \cdot f(t)$ for some functions $\mathbf{A}$ and $f$. Non-separable sources can be simulated, however, by modifying the sources after each time step. When real fields are being used (which is the default in many cases; see `Simulation.force_complex_fields`), only the real part of the current source is used.
meep-1.12.0/doc/docs/Python_User_Interface.md-766-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-806-
meep-1.12.0/doc/docs/Python_User_Interface.md:807:This is a subclass of `Source` and has **all of the properties** of `Source` above. However, you normally do not specify a `component`. Instead of `component`, the current source components and amplitude profile are computed by calling MPB to compute the modes, $\mathbf{u}_{n,\mathbf{k}}(\mathbf{r}) e^{i \mathbf{k} \cdot \mathbf{r}}$, of the dielectric profile in the region given by the `size` and `center` of the source, with the modes computed as if the *source region were repeated periodically in all directions*. If an `amplitude` and/or `amp_func` are supplied, they are *multiplied* by this current profile. The desired eigenmode and other features are specified by the following properties:
meep-1.12.0/doc/docs/Python_User_Interface.md-808-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-814-meep-1.12.0/doc/docs/Python_User_Interface.md:815:By default (if `eig_match_freq` is `True`), Meep tries to find a mode with the same frequency ω<sub>*n*</sub>(**k**) as the `src` property (above), by scanning **k** vectors in the given `direction` using MPB's `find_k` functionality. Alternatively, if `eig_kpoint` is supplied, it is used as an initial guess for **k**. By default, `direction` is the direction normal to the source region, assuming `size` is $d$–1 dimensional in a $d$-dimensional simulation (e.g. a plane in 3d). If `direction` is set to `mp.NO_DIRECTION`, then `eig_kpoint` is not only the initial guess and the search direction of the **k** vectors, but is also taken to be the direction of the waveguide, allowing you to [launch modes in oblique ridge waveguides](Python_Tutorials/Eigenmode_Source.md#index-guided-modes-in-a-ridge-waveguide) (not perpendicular to the source plane).  If `eig_match_freq` is `False`, then the specific **k** vector of the desired mode is specified with  `eig_kpoint` (in Meep units of 2π/(unit length)). By default, the **k** components in the plane of the source region are zero.  However, if the source region spans the *entire* cell in some directions, and the cell has Bloch-periodic boundary conditions via the `k_point` parameter, then the mode's **k** components in those directions will match `k_point` so that the mode satisfies the Meep boundary conditions, regardless of `eig_kpoint`. Note that once **k** is either found by MPB, or specified by `eig_kpoint`, the field profile used to create the current sources corresponds to the [Bloch mode](https://en.wikipedia.org/wiki/Bloch_wave), $\mathbf{u}_{n,\mathbf{k}}(\mathbf{r})$, multiplied by the appropriate exponential factor, $e^{i \mathbf{k} \cdot \mathbf{r}}$.
meep-1.12.0/doc/docs/Python_User_Interface.md-816-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-818-meep-1.12.0/doc/docs/Python_User_Interface.md:819:The parity (= polarization in 2d) of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry *in the source region*, with respect to the `center` of the source region.  (In particular, it does not matter if your simulation as a whole has that symmetry, only the cross section where you are introducing the source.) If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `EVEN_Z + ODD_Y`. Default is `NO_PARITY`, in which case MPB computes all of the bands which will still be even or odd if the structure has mirror symmetry, of course. This is especially useful in 2d simulations to restrict yourself to a desired polarization.
meep-1.12.0/doc/docs/Python_User_Interface.md-820-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-900-meep-1.12.0/doc/docs/Python_User_Interface.md:901:How many `width`s the current decays for before it is cut off and set to zero &mdash; this applies for both turn-on and turn-off of the pulse. Default is 5.0. A larger value of `cutoff` will reduce the amount of high-frequency components that are introduced by the start/stop of the source, but will of course lead to longer simulation times. The peak of the Gaussian is reached at the time $t_0$=`start_time + cutoff*width`.
meep-1.12.0/doc/docs/Python_User_Interface.md-902-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-915-$$
meep-1.12.0/doc/docs/Python_User_Interface.md:916:where $G(t)$ is the current (not the dipole moment). In this formula, $\Delta f$ is the `fwidth` of the source, $\omega_0$ is $2\pi$ times its `frequency,` and $t_0$ is the peak time discussed above. Note that this does not include any `amplitude` or `amp_func` factor that you specified for the source.
meep-1.12.0/doc/docs/Python_User_Interface.md-917-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-1060-meep-1.12.0/doc/docs/Python_User_Interface.md:1061:Given a `direction` constant, and a `mp.Volume`, returns the flux (the integral of $\Re [\mathbf{E}^* \times \mathbf{H}]$) in that volume. Most commonly, you specify a volume that is a plane or a line, and a direction perpendicular to it, e.g. `flux_in_box(d=mp.X,mp.Volume(center=mp.Vector3(0,0,0),size=mp.Vector3(0,1,1)))`. If the `center` and `size` arguments are provided instead of `box`, Meep will construct the appropriate volume for you.
meep-1.12.0/doc/docs/Python_User_Interface.md-1062-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-1064-meep-1.12.0/doc/docs/Python_User_Interface.md:1065:Given a `mp.Volume`, returns the integral of the electric-field energy $\mathbf{E}^* \cdot \mathbf{D}/2$ in the given volume. If the volume has zero size along a dimension, a lower-dimensional integral is used. If the `center` and `size` arguments are provided instead of `box`, Meep will construct the appropriate volume for you.
meep-1.12.0/doc/docs/Python_User_Interface.md-1066-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-1068-meep-1.12.0/doc/docs/Python_User_Interface.md:1069:Given a `mp.Volume`, returns the integral of the magnetic-field energy $\mathbf{H}^* \cdot \mathbf{B}/2$ in the given volume. If the volume has zero size along a dimension, a lower-dimensional integral is used. If the `center` and `size` arguments are provided instead of `box`, Meep will construct the appropriate volume for you.
meep-1.12.0/doc/docs/Python_User_Interface.md-1070-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-1072-meep-1.12.0/doc/docs/Python_User_Interface.md:1073:Given a `mp.Volume`, returns the integral of the electric- and magnetic-field energy $\mathbf{E}^* \cdot \mathbf{D}/2 + \mathbf{H}^* \cdot \mathbf{B}/2$ in the given volume. If the volume has zero size along a dimension, a lower-dimensional integral is used. If the `center` and `size` arguments are provided instead of `box`, Meep will construct the appropriate volume for you.
meep-1.12.0/doc/docs/Python_User_Interface.md-1074-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-1221-
meep-1.12.0/doc/docs/Python_User_Interface.md:1222:The flux object should be created using `add_mode_monitor`.  (You could also use `add_flux`, but with `add_flux` you need to be more careful about symmetries that bisect the flux plane: the `add_flux` object should only be used with `get_eigenmode_coefficients` for modes of the same symmetry, e.g. constrained via `eig_parity`.  On the other hand, the performance of `add_flux` planes benefits more from symmetry.) `eig_vol` is the volume passed to [MPB](https://mpb.readthedocs.io) for the eigenmode calculation (based on interpolating the discretized materials from the Yee grid); in most cases this will simply be the volume over which the frequency-domain fields are tabulated, which is the default (i.e. `flux.where`). `eig_parity` should be one of [`mp.NO_PARITY` (default), `mp.EVEN_Z`, `mp.ODD_Z`, `mp.EVEN_Y`, `mp.ODD_Y`]. It is the parity (= polarization in 2d) of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry *in the source region*, just as for `EigenmodeSource` above. If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `EVEN_Z+ODD_Y`. Default is `NO_PARITY`, in which case MPB computes all of the bands which will still be even or odd if the structure has mirror symmetry, of course. This is especially useful in 2d simulations to restrict yourself to a desired polarization. `eig_resolution` is the spatial resolution to use in MPB for the eigenmode calculations. This defaults to the same resolution as Meep, but you can use a higher resolution in which case the structure is linearly interpolated from the Meep pixels. `eig_tolerance` is the tolerance to use in the MPB eigensolver. MPB terminates when the eigenvalues stop changing to less than this fractional tolerance. Defaults to `1e-12`.  (Note that this is the tolerance for the frequency eigenvalue ω; the tolerance for the mode profile is effectively the square root of this.) For examples, see [Tutorial/Mode Decomposition](Python_Tutorials/Mode_Decomposition.md).
meep-1.12.0/doc/docs/Python_User_Interface.md-1223-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-1324-
meep-1.12.0/doc/docs/Python_User_Interface.md:1325:Most commonly, you will want to **normalize** the force spectrum in some way, just as for flux spectra. Most simply, you could divide two different force spectra to compute the ratio of forces on two objects. Often, you will divide a force spectrum by a flux spectrum, to divide the force $F$ by the incident power $P$ on an object, in order to compute the useful dimensionless ratio $Fc$/$P$ where $c=1$ in Meep units. For example, it is a simple exercise to show that the force $F$ on a perfectly reflecting mirror with normal-incident power $P$ satisfies $Fc$/$P=2$, and for a perfectly absorbing (black) surface $Fc$/$P=1$.
meep-1.12.0/doc/docs/Python_User_Interface.md-1326-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-1464-meep-1.12.0/doc/docs/Python_User_Interface.md:1465:Given an HDF5 file name `fname` (does *not* include the `.h5` suffix), a `Volume` given by `where` (may be 0d, 1d, 2d, or 3d), and a `resolution` (in grid points / distance unit), outputs the far fields in `where` (which may lie *outside* the cell) in a grid with the given resolution (which may differ from the FDTD grid resolution) to the HDF5 file as a set of twelve array datasets `ex.r`, `ex.i`, ..., `hz.r`, `hz.i`, giving the real and imaginary parts of the Fourier-transformed $E$ and $H$ fields on this grid. Each dataset is an nx&#215;ny&#215;nz&#215;nfreq 4d array of space&#215;frequency although dimensions that =1 are omitted. The volume can optionally be specified via `center` and `size`.
meep-1.12.0/doc/docs/Python_User_Interface.md-1466-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-1760-meep-1.12.0/doc/docs/Python_User_Interface.md:1761:Given a list of `Vector3`, `k_points` of *k* vectors, runs a simulation for each *k* point (i.e. specifying Bloch-periodic boundary conditions) and extracts the eigen-frequencies, and returns a list of the complex frequencies. In particular, you should have specified one or more Gaussian sources. It will run the simulation until the sources are turned off plus an additional $t$ time units. It will run [Harminv](#harminv) at the same point/component as the first Gaussian source and look for modes in the union of the frequency ranges for all sources. Returns a list of lists of frequencies (one list of frequencies for each *k*). Also prints out a comma-delimited list of frequencies, prefixed by `freqs:`, and their imaginary parts, prefixed by `freqs-im:`. See [Tutorial/Resonant Modes and Transmission in a Waveguide Cavity](Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md).
meep-1.12.0/doc/docs/Python_User_Interface.md-1762-
##############################################
meep-1.12.0/doc/docs/Python_User_Interface.md-1817-
meep-1.12.0/doc/docs/Python_User_Interface.md:1818:It is often useful to use the h5topng `-C` or `-A` options to overlay the dielectric function when outputting fields. To do this, you need to know the name of the dielectric-function `.h5` file which must have been previously output by `output_epsilon`. To make this easier, a built-in shell variable `$EPS` is provided which refers to the last-output dielectric-function `.h5` file. So, for example `output_png(mp.Ez,"-C $EPS")` will output the $E_z$ field and overlay the dielectric contours.
meep-1.12.0/doc/docs/Python_User_Interface.md-1819-
##############################################
meep-1.12.0/doc/docs/Replacements.vim-22-:%s/\\)/$/g
meep-1.12.0/doc/docs/Replacements.vim:23::%s/^`\(.*\)`$/```\r\1\r```\r/g
meep-1.12.0/doc/docs/Replacements.vim-24-:%s/```\n\n```\n//g
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Basics.md-72-
meep-1.12.0/doc/docs/Scheme_Tutorials/Basics.md:73:We gave the source a frequency of 0.15, and specified a `continuous-src` which is just a fixed-frequency sinusoid $\exp(-i \omega t)$ that by default is turned on at $t$=0. Recall that, in [Meep units](../Introduction.md#units-in-meep), frequency is specified in units of 2πc, which is equivalent to the inverse of the vacuum wavelength. Thus, 0.15 corresponds to a vacuum wavelength of about 1/0.15=6.67 μm, or a wavelength of about 2 μm in the ε=12 material &mdash; thus, our waveguide is half a wavelength wide, which should hopefully make it single mode. In fact, the cutoff for single-mode behavior in this waveguide is analytically solvable, and corresponds to a frequency of 1/2√11 or roughly 0.15076. Note also that to specify a J<sub>z</sub>, we specify a component $Ez$ (e.g. if we wanted a magnetic current, we would specify `Hx`, `Hy`, or `Hz`). The current is located at (-7,0), which is 1 μm to the right of the left edge of the cell &mdash; we always want to leave a little space between sources and the cell boundaries, to keep the boundary conditions from interfering with them.
meep-1.12.0/doc/docs/Scheme_Tutorials/Basics.md-74-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Basics.md-170-
meep-1.12.0/doc/docs/Scheme_Tutorials/Basics.md:171:That is, the file contains a single dataset `ez` that is a 160$\times$160$\times$333 array, where the last dimension is time. This is rather a large file, 66MB; later, we'll see ways to reduce this size if we only want images. We have a number of choices of how to output the fields. To output a single time slice, we can use the same `h5topng` command as before, but with an additional `-t` option to specify the time index: e.g. `h5topng -t 332` will output the last time slice, similar to before. Instead, let's create an animation of the fields as a function of time. First, we have to create images for *all* of the time slices:
meep-1.12.0/doc/docs/Scheme_Tutorials/Basics.md-172-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Basics.md-602-
meep-1.12.0/doc/docs/Scheme_Tutorials/Basics.md:603:The signal processing is performed by the `harminv` function, which takes four arguments: the field component E<sub>z</sub> and position ($r$+0.1,0) to analyze, and a frequency range given by a center frequency and bandwidth (same as the source pulse). Note that we wrap `harminv` in `(after-sources ...)`, since we only want to analyze the frequencies in the source-free system (the presence of a source will distort the analysis). At the end of the run, `harminv` prints a series of lines (beginning with `harminv0:`, to make it easy to `grep` for) listing the frequencies it found:
meep-1.12.0/doc/docs/Scheme_Tutorials/Basics.md-604-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-143-
meep-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md:144:where $c_n = 1$ if $n=0$ and $c_n=2$ otherwise, $L$ is the side length (if each side has a different length, then the functions $f_n(x)$ will differ for each side). An illustration of these functions for the system under consideration, compared to point sources, is shown below:
meep-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-145-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-446-
meep-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md:447:This new function $g(t)$ is computed in the function `make-casimir-g-kz`; use this value of $g(t)$ in `casimir-force-contrib`:
meep-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-448-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-479-
meep-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md:480:In cylindrical coordinates, all source surfaces and objects have size `no-size` in the $phi$-direction. Also, the source index passed to `casimir-force-contrib` is given by:
meep-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-481-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-516-
meep-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md:517:The arguments are similar to `casimir-force-contrib`, except that now we pass in the Bloch vector (which will be set inside of the function), and instead of a side index we simply pass in $S$, which is only one side of the source surface. As the program cannot detect the orientation of the surface if there is only one side, we have to explicitly multiply by the normal vector (given by `curr-side`). Otherwise, the computation proceeds as in the above cases, with the integration over $k_x$ and $k_y$ done outside of the program.
meep-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-518-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Eigenmode_Source.md-146-
meep-1.12.0/doc/docs/Scheme_Tutorials/Eigenmode_Source.md:147:Note that this example involves a `continuous-source` for the time profile. For a pulsed source, the oblique planewave is incident at a given angle for only a *single* frequency component of the source. This is a fundamental feature of FDTD simulations and not of Meep per se. Thus, to simulate an incident planewave at multiple angles for a given frequency ω, you will need to do separate simulations involving different values of $\vec{k}$ (`k-point`) since each set of ($\vec{k}$,ω) specifying the Bloch-periodic boundaries and the frequency of the source will produce a different angle of the planewave. For more details, refer to Section 4.5 ("Efficient Frequency-Angle Coverage") in [Chapter 4](https://arxiv.org/abs/1301.5366) ("Electromagnetic Wave Source Conditions") of [Advances in FDTD Computational Electrodynamics: Photonics and Nanotechnology](https://www.amazon.com/Advances-FDTD-Computational-Electrodynamics-Nanotechnology/dp/1608071707).
meep-1.12.0/doc/docs/Scheme_Tutorials/Eigenmode_Source.md-148-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Local_Density_of_States.md-14-
meep-1.12.0/doc/docs/Scheme_Tutorials/Local_Density_of_States.md:15:where $Q^{(n)}=\omega^{(n)}/2\gamma^{(n)}$ is the dimensionless [quality factor](https://en.wikipedia.org/wiki/Q_factor) and $V^{(n)}$ is the modal volume. This represents another way to compute the LDOS. In this tutorial, we will verify this expression by comparing it to the earlier one.
meep-1.12.0/doc/docs/Scheme_Tutorials/Local_Density_of_States.md-16-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Local_Density_of_States.md-18-
meep-1.12.0/doc/docs/Scheme_Tutorials/Local_Density_of_States.md:19:We will validate both this prediction and the LDOS calculations above by computing the LDOS at the center of the cavity, the point of peak $|\vec{E}|$, in two ways. First, we compute the LDOS directly from the power radiated by a dipole, Fourier-transforming the result of a pulse using the `dft-ldos` command. Second, we compute the cavity mode and its lifetime $Q$ using `harminv` and then compute the LDOS by the Purcell formula shown above. The latter technique is much more efficient for high Q (small $w$), since one must run the simulation for a very long time to directly accumulate the Fourier transform of a slowly-decaying mode. The two calculations, we will demonstrate, agree to within discretization error, verifying the LDOS analysis above, and $Q/V$ is asymptotically linear on a semilog scale versus $1/w$ as predicted.
meep-1.12.0/doc/docs/Scheme_Tutorials/Local_Density_of_States.md-20-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Material_Dispersion.md-150-
meep-1.12.0/doc/docs/Scheme_Tutorials/Material_Dispersion.md:151:The `run-k-points` function returns a *list of lists* of frequencies &mdash; one list of complex frequencies for each *k* point &mdash; which we store in the `all-freqs` variable. Finally, we want to loop over this list and print out the corresponding ε via the ratio (ck/ω)$^2$ as described above. To do this, we will use the Scheme `map` function, which applies a given function to every element of a list (or lists), and since we have a list of lists we'll actually nest two `map` functions:
meep-1.12.0/doc/docs/Scheme_Tutorials/Material_Dispersion.md-152-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Mode_Decomposition.md-262-
meep-1.12.0/doc/docs/Scheme_Tutorials/Mode_Decomposition.md:263:Note the use of the keyword parameter argument `#eig-parity (+ ODD-Z EVEN-Y)` in the call to `get-eigenmode-coefficients`. This is important for specifying **non-degenerate** modes in MPB since the `k-point` is (0,0,0). `ODD-Z` is for modes with $E_z$ polarization. `EVEN-Y` is necessary since each diffraction order which is based on a given k<sub>x</sub> consists of *two* modes: one going in the +y direction and the other in the -y direction. `EVEN-Y` forces MPB to compute only the +k<sub>y</sub> + -k<sub>y</sub> (cosine) mode. As a result, the total transmittance must be halved in this case to obtain the transmittance for the individual +k<sub>y</sub> or -k<sub>y</sub> mode. For `ODD-Y`, MPB will compute the +k<sub>y</sub> - -k<sub>y</sub> (sine) mode but this will have zero power because the source is even. If the $y$ parity is left out, MPB will return a random superposition of the cosine and sine modes. Alternatively, in this example an input planewave with H<sub>z</sub> instead of $E_z$ polarization can be used which requires `#eig_parity (+ EVEN-Z ODD-Y)` as well as an odd mirror symmetry plane in *y*. Finally, note the use of `add-flux` instead of `add-mode-monitor` when using symmetries.
meep-1.12.0/doc/docs/Scheme_Tutorials/Mode_Decomposition.md-264-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Near_to_Far_Field_Spectra.md-107-
meep-1.12.0/doc/docs/Scheme_Tutorials/Near_to_Far_Field_Spectra.md:108:From the far fields at each point $\mathbf{r}$, we compute using Matlab/Octave the outgoing or radial flux: $\sqrt{P_x^2+P_y^2}$, where P$_x$ and P$_y$ are the components of the Poynting vector $\mathbf{P}(\mathbf{r})=(P_x,P_y,P_z)=\mathrm{Re}\, \mathbf{E}(\mathbf{r})^*\times\mathbf{H}(\mathbf{r})$. Note that $P_z$ is always 0 since this is a 2d simulation. The total flux is then computed and displayed:
meep-1.12.0/doc/docs/Scheme_Tutorials/Near_to_Far_Field_Spectra.md-109-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-83-
meep-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:84:The source will now be the usual Gaussian pulse centered at `fcen`, located at one edge of the cell just outside the PML, at `x = -0.5*sx + dpml`. Ideally, we would excite exactly the fundamental mode of the waveguide, but it is good enough to just excite it with a line source. Moreover, since we are interested in the $P$ polarization (electric field in the plane), we will excite it with a $J_y$ current source (transverse to the propagation direction), which is specified as `Ey`:
meep-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-85-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-260-
meep-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:261:The results, shown above, are exactly what we expected: at first, an exponential increase of $Q$ with `N`, and then a saturation at $Q_r \approx 8750$. However, when we look at the Harminv output for larger `N`, something strange happens &mdash; it starts to find *more modes*! For example, at `N=16`, the output is:
meep-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-262-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-289-
meep-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:290:Let us briefly review the problem. In a periodic system of this sort, the eigen-solutions can be expressed in the form of *Bloch modes*: a periodic *Bloch envelope* multiplied by a planewave $\exp[i(\mathbf{k}\cdot\mathbf{x}-ω t)]$, where **k** is the *Bloch wavevector*. We wish to find the *bands* $ω(\mathbf{k})$. In this case, there is only *one* direction of periodicity, so we only have one wavevector component $k_x$. Moreover, the solutions are periodic functions of this wavevector: for a unit-period structure, $k_x$ and $k_x+2\pi$ are redundant. Also, $k_x$ and $-k_x$ are redundant by time-reversal symmetry, so we only need to look for solutions in the *irreducible Brillouin zone* from $k_x=0$ to $k_x=\pi$.
meep-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-291-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-350-
meep-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:351:Here, we have used [libctl](https://libctl.readthedocs.io)'s built-in `interpolate` function to interpolate a set of 19 $\mathbf{k}$ points between $\mathbf{k} = 0$ and $\mathbf{k} = 0.5 \cdot 2π \hat{\mathbf{x}}$, to cover the irreducible Brillouin zone. `run-k-points` automatically runs `harminv`, using the frequency range and location taken from the Gaussian source in the `sources` list. It also calls `output-epsilon`. The output is not only the usual `harminv:` lines, but it also outputs a series of lines like:
meep-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-352-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-29-
meep-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md:30:The key thing is to set the `dimensions` parameter to `CYLINDRICAL`. This means that all vectors will represent ($r$,φ,$z$) coordinates instead of ($x$,$y$,$z$). The computational cell in the $r$ direction is of size `sr = r + w + pad + dpml`, and runs from `0` to `sr` (by default) rather than from `-sr/2` to `sr/2` as it would for any other dimension. Note that our $z$ size is `no-size` because it is in 2d. The φ size is also `no-size`, corresponding to the continuous rotational symmetry. A finite φ size might correspond to discrete rotational symmetry, but this is not currently supported.
meep-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-31-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-69-
meep-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md:70:At the very end, we'll also output one period of the fields to make movies, etcetera. A single field output would be a 1d dataset along the $r$ direction, so to make things more interesting we'll use `to-appended` to append these datasets to a single HDF5 file to get an $r \times t$ 2d dataset. We'll also use `in-volume` to specify a larger output volume than just the computational cell: in particular, we'll output from `-sr` to `sr` in the $r$ direction, where Meep will automatically infer the $-r$ field values from the reflection symmetry.
meep-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-71-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-105-
meep-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md:106:The problem is twofold. First, there is some signal-processing error in determining $Q$ in the 2d case, as indicated by the "error" column of the `harminv` output which is only 4e-7 for the 2d simulation vs. 6e-11 for the cylindrical case. We can bring this error down by running with a narrower bandwidth source, which excites just one mode and gives a cleaner signal, or by analyzing over a longer time than 200. Doing the former, we find that the 2d value of $Q$ at a resolution of 20 should really be $Q$=343. Second, [PML](../Perfectly_Matched_Layer.md) absorbing layers are really designed to absorb planewaves incident on flat interfaces, but here we have a *cylindrical* PML layer. Because of this, there are larger numerical reflections from the PML in the cylindrical simulation, which we can rectify by pushing the PML out to a larger radius (i.e. using a larger value of `pad`) and/or increasing the PML thickness (increasing `dpml`) so that it turns on more adiabatically. In the cylindrical simulation for `resolution=20`, if we increase to `dpml=16`, we get $Q$=343, which is in much better agreement with the 2d calculation and if we increase to `dpml=32` we get the same $Q$=343, so it seems to be converged.
meep-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-107-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md-6-
meep-1.12.0/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md:7:Since this is a 1d calculation, we could implement it via a 2d cell of `(size S no-size no-size)`, specifying periodic boundary conditions in the $y$ direction. However, this is slightly inefficient since the $y$ periodic boundaries are implemented internally via extra "ghost pixels" in the $y$ direction. Instead, Meep has special support for 1d simulations in the $z$ direction. To use this, we must explicitly set `dimensions` to `1`, and in that case we can *only* use $E_x$ (and $D_x$) and $H_y$ field components. This involves no loss of generality because of the symmetry of the problem.
meep-1.12.0/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md-8-
##############################################
meep-1.12.0/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md-85-
meep-1.12.0/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md:86:We could print these with more `display-fluxes` lines, but it is nice to print these on a single line along with χ$^{(3)}$ and the amplitude, so that we can eventually put them all into one table in our plotting program. To do this, we'll use the lower-level function `(get-fluxes trans1)`, which returns a list of the flux values, and take the first element of the list since there is only one:
meep-1.12.0/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md-87-
##############################################
meep-1.12.0/doc/docs/Scheme_User_Interface.md-49-meep-1.12.0/doc/docs/Scheme_User_Interface.md:50:Explicitly specifies the dimensionality of the simulation, if the value is less than 3. If the value is 3 (the default), then the dimensions are automatically reduced to 2 if possible when `geometry-lattice` size in the $z$ direction is `no-size`. If `dimensions` is the special value of `CYLINDRICAL`, then cylindrical coordinates are used and the $x$ and $z$ dimensions are interpreted as $r$ and $z$, respectively. If `dimensions` is 1, then the cell must be along the $z$ direction and only $E_x$ and $H_y$ field components are permitted. If `dimensions` is 2, then the cell must be in the $xy$ plane.
meep-1.12.0/doc/docs/Scheme_User_Interface.md-51-
##############################################
meep-1.12.0/doc/docs/Scheme_User_Interface.md-53-meep-1.12.0/doc/docs/Scheme_User_Interface.md:54:For `CYLINDRICAL` simulations, specifies that the angular $\phi$ dependence of the fields is of the form $e^{im\phi}$ (default is `m=0`). If the simulation cell includes the origin $r=0$, then `m` must be an integer.
meep-1.12.0/doc/docs/Scheme_User_Interface.md-55-
meep-1.12.0/doc/docs/Scheme_User_Interface.md-56-**`accurate-fields-near-cylorigin?` [`boolean`]**
meep-1.12.0/doc/docs/Scheme_User_Interface.md:57:—For `CYLINDRICAL` simulations with |*m*| &gt; 1, compute more accurate fields near the origin $r=0$ at the expense of requiring a smaller Courant factor. Empirically, when this option is set to `true`, a Courant factor of roughly $\min[0.5, 1 / (|m| + 0.5)]$ or smaller seems to be needed. Default is `false`, in which case the $D_r$, $D_z$, and $B_r$ fields within |*m*| pixels of the origin are forced to zero, which usually ensures stability with the default Courant factor of 0.5, at the expense of slowing convergence of the fields near $r=0$.
meep-1.12.0/doc/docs/Scheme_User_Interface.md-58-
##############################################
meep-1.12.0/doc/docs/Scheme_User_Interface.md-64-meep-1.12.0/doc/docs/Scheme_User_Interface.md:65:If `false` (the default), then the boundaries are perfect metallic (zero electric field). If a `vector3`, then the boundaries are Bloch-periodic: the fields at one side are $\exp(i\mathbf{k}\cdot\mathbf{R})$ times the fields at the other side, separated by the lattice vector $\mathbf{R}$. A non-zero `vector3` will produce complex fields. The `k-point` vector is specified in Cartesian coordinates in units of 2π/distance. Note: this is *different* from [MPB](https://mpb.readthedocs.io), equivalent to taking MPB's `k-points` through its function `reciprocal->cartesian`.
meep-1.12.0/doc/docs/Scheme_User_Interface.md-66-
##############################################
meep-1.12.0/doc/docs/Scheme_User_Interface.md-68-meep-1.12.0/doc/docs/Scheme_User_Interface.md:69:By default, a 2d cell (i.e., `dimensions` is `2`) combined with a `k-point` that has a *non-zero* component in $z$ results in a 3d simulation with complex fields. However, by setting `special-kz?` to `true`, Meep will use a 2d cell and real fields (if the $x$ and $y$ components of `k-point` are zero) which improves performance.
meep-1.12.0/doc/docs/Scheme_User_Interface.md-70-
##############################################
meep-1.12.0/doc/docs/Scheme_User_Interface.md-271-meep-1.12.0/doc/docs/Scheme_User_Interface.md:272:The scale factor σ. You can also specify an anisotropic σ tensor by using the property `sigma-diag` which takes three numbers or a `vector3` to give the σ$_n$ tensor diagonal, and `sigma-offdiag` which specifies the offdiagonal elements (defaults to 0). That is, `(sigma-diag a b c)` and `(sigma-offdiag u v w)` corresponds to a σ tensor
meep-1.12.0/doc/docs/Scheme_User_Interface.md-273-
##############################################
meep-1.12.0/doc/docs/Scheme_User_Interface.md-591-meep-1.12.0/doc/docs/Scheme_User_Interface.md:592:Specify the direction of the boundaries to put the PML layers next to. e.g. if `X`, then specifies PML on the $\pm x$ boundaries (depending on the value of `side`, below). Default is the special value `ALL`, which puts PML layers on the boundaries in all directions.
meep-1.12.0/doc/docs/Scheme_User_Interface.md-593-
##############################################
meep-1.12.0/doc/docs/Scheme_User_Interface.md-595-meep-1.12.0/doc/docs/Scheme_User_Interface.md:596:Specify which side, `Low` or `High` of the boundary or boundaries to put PML on. e.g. if side is `Low` and direction is `X`, then a PML layer is added to the $-x$ boundary. Default is the special value `ALL`, which puts PML layers on both sides.
meep-1.12.0/doc/docs/Scheme_User_Interface.md-597-
##############################################
meep-1.12.0/doc/docs/Scheme_User_Interface.md-607-meep-1.12.0/doc/docs/Scheme_User_Interface.md:608:By default, Meep turns on the PML conductivity quadratically within the PML layer &mdash; one doesn't want to turn it on suddenly, because that exacerbates reflections due to the discretization. More generally, with `pml-profile` one can specify an arbitrary PML "profile" function $f(u)$ that determines the shape of the PML absorption profile up to an overall constant factor. *u* goes from 0 to 1 at the start and end of the PML, and the default is $f(u) = u^2$. In some cases where a very thick PML is required, such as in a periodic medium (where there is technically no such thing as a true PML, only a pseudo-PML), it can be advantageous to turn on the PML absorption more smoothly. See [Optics Express, Vol. 16, pp. 11376-92, 2008](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). For example, one can use a cubic profile $f(u) = u^3$ by specifying `(pml-profile (lambda (u) (* u u u)))`.
meep-1.12.0/doc/docs/Scheme_User_Interface.md-609-
##############################################
meep-1.12.0/doc/docs/Scheme_User_Interface.md-623-
meep-1.12.0/doc/docs/Scheme_User_Interface.md:624:The `source` class is used to specify the current sources via the `sources` input variable. Note that all sources in Meep are separable in time and space, i.e. of the form $\mathbf{J}(\mathbf{x},t) = \mathbf{A}(\mathbf{x}) \cdot f(t)$ for some functions $\mathbf{A}$ and $f$. Non-separable sources can be simulated, however, by modifying the sources after each time step. When real fields are being used (which is the default in many cases; see the `force-complex-fields?` input variable), only the real part of the current source is used.
meep-1.12.0/doc/docs/Scheme_User_Interface.md-625-
##############################################
meep-1.12.0/doc/docs/Scheme_User_Interface.md-659-
meep-1.12.0/doc/docs/Scheme_User_Interface.md:660:This is a subclass of `source` and has **all of the properties** of `source` above. However, you normally do not specify a `component`. Instead of `component`, the current source components and amplitude profile are computed by calling MPB to compute the modes, $\mathbf{u}_{n,\mathbf{k}}(\mathbf{r}) e^{i \mathbf{k} \cdot \mathbf{r}}$, of the dielectric profile in the region given by the `size` and `center` of the source, with the modes computed as if the *source region were repeated periodically in all directions*. If an `amplitude` and/or `amp-func` are supplied, they are *multiplied* by this current profile. The desired eigenmode and other features are specified by the following properties:
meep-1.12.0/doc/docs/Scheme_User_Interface.md-661-
##############################################
meep-1.12.0/doc/docs/Scheme_User_Interface.md-667-meep-1.12.0/doc/docs/Scheme_User_Interface.md:668:By default (if `eig-match-freq?` is `true`), Meep tries to find a mode with the same frequency ω<sub>*n*</sub>(**k**) as the `src` property (above), by scanning **k** vectors in the given `direction` using MPB's `find-k` functionality. Alternatively, if `eig-kpoint` is supplied, it is used as an initial guess for **k**. By default, `direction` is the direction normal to the source region, assuming `size` is $d$–1 dimensional in a $d$-dimensional simulation (e.g. a plane in 3d). If `direction` is set to `NO-DIRECTION`, then `eig_kpoint` is not only the initial guess and the search direction of the **k** vectors, but is also taken to be the direction of the waveguide, allowing you to [launch modes in oblique ridge waveguides](Scheme_Tutorials/Eigenmode_Source.md#index-guided-modes-in-a-ridge-waveguide) (not perpendicular to the source plane). If `eig-match-freq?` is `false`, then the specific **k** vector of the desired mode is specified with `eig-kpoint` (in Meep units of 2π/(unit length)). By default, the **k** components in the plane of the source region are zero.  However, if the source region spans the *entire* cell in some directions, and the cell has Bloch-periodic boundary conditions via the `k-point` parameter, then the mode's **k** components in those directions will match `k-point` so that the mode satisfies the Meep boundary conditions, regardless of `eig-kpoint`. Note that once **k** is either found by MPB, or specified by `eig-kpoint`, the field profile used to create the current sources corresponds to the [Bloch mode](https://en.wikipedia.org/wiki/Bloch_wave), $\mathbf{u}_{n,\mathbf{k}}(\mathbf{r})$, multiplied by the appropriate exponential factor, $e^{i \mathbf{k} \cdot \mathbf{r}}$.
meep-1.12.0/doc/docs/Scheme_User_Interface.md-669-
##############################################
meep-1.12.0/doc/docs/Scheme_User_Interface.md-671-meep-1.12.0/doc/docs/Scheme_User_Interface.md:672:The parity (= polarization in 2d) of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry *in the source region*, with respect to the `center` of the source region.  (In particular, it does not matter if your simulation as a whole has that symmetry, only the cross section where you are introducing the source.) If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `EVEN-Z + ODD-Y`. Default is `NO-PARITY`, in which case MPB computes all of the bands which will still be even or odd if the structure has mirror symmetry, of course. This is especially useful in 2d simulations to restrict yourself to a desired polarization.
meep-1.12.0/doc/docs/Scheme_User_Interface.md-673-
##############################################
meep-1.12.0/doc/docs/Scheme_User_Interface.md-735-meep-1.12.0/doc/docs/Scheme_User_Interface.md:736:How many `width`s the current decays for before it is cut off and set to zero &mdash; this applies for both turn-on and turn-off of the pulse. Default is 5.0. A larger value of `cutoff` will reduce the amount of high-frequency components that are introduced by the start/stop of the source, but will of course lead to longer simulation times. The peak of the Gaussian is reached at the time $t_0$=`start-time + cutoff*width`.
meep-1.12.0/doc/docs/Scheme_User_Interface.md-737-
##############################################
meep-1.12.0/doc/docs/Scheme_User_Interface.md-864-meep-1.12.0/doc/docs/Scheme_User_Interface.md:865:Given a `direction` constant, and a `meep::volume*`, returns the flux (the integral of $\Re [\mathbf{E}^* \times \mathbf{H}]$) in that volume. Most commonly, you specify a volume that is a plane or a line, and a direction perpendicular to it, e.g. `(flux-in-box `X (volume (center 0) (size 0 1 1)))`.
meep-1.12.0/doc/docs/Scheme_User_Interface.md-866-
##############################################
meep-1.12.0/doc/docs/Scheme_User_Interface.md-1001-```
meep-1.12.0/doc/docs/Scheme_User_Interface.md:1002:The flux object must be created using `add-mode-monitor`.  (You could also use `add-flux`, but with `add_flux` you need to be more careful about symmetries that bisect the flux plane: the `add-flux` object should only be used with `get-eigenmode-coefficients` for modes of the same symmetry, e.g. constrained via `eig_parity`.  On the other hand, the performance of `add-flux` planes benefits more from symmetry.) `eig-vol` is the volume passed to [MPB](https://mpb.readthedocs.io) for the eigenmode calculation (based on interpolating the discretized materials from the Yee grid); in most cases this will simply be the volume over which the frequency-domain fields are tabulated, which is the default (i.e. `(meep-dft-flux-where-get flux)`). `eig-parity` should be one of [`NO-PARITY` (default), `EVEN-Z`, `ODD-Z`, `EVEN-Y`, `ODD-Y`]. It is the parity (= polarization in 2d) of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry *in the source region*, just as for `eigenmode-source` above. If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `(+ EVEN-Z ODD-Y)`. Default is `NO-PARITY`, in which case MPB computes all of the bands which will still be even or odd if the structure has mirror symmetry, of course. This is especially useful in 2d simulations to restrict yourself to a desired polarization. `eig-resolution` is the spatial resolution to use in MPB for the eigenmode calculations. This defaults to the same resolution as Meep, but you can use a higher resolution in which case the structure is linearly interpolated from the Meep pixels. `eig-tolerance` is the tolerance to use in the MPB eigensolver. MPB terminates when the eigenvalues stop changing to less than this fractional tolerance. Defaults to `1e-12`.  (Note that this is the tolerance for the frequency eigenvalue ω; the tolerance for the mode profile is effectively the square root of this.)
meep-1.12.0/doc/docs/Scheme_User_Interface.md-1003-
##############################################
meep-1.12.0/doc/docs/Scheme_User_Interface.md-1089-
meep-1.12.0/doc/docs/Scheme_User_Interface.md:1090:Most commonly, you will want to **normalize** the force spectrum in some way, just as for flux spectra. Most simply, you could divide two different force spectra to compute the ratio of forces on two objects. Often, you will divide a force spectrum by a flux spectrum, to divide the force $F$ by the incident power $P$ on an object, in order to compute the useful dimensionless ratio $Fc$/$P$ where $c=1$ in Meep units. For example, it is a simple exercise to show that the force $F$ on a perfectly reflecting mirror with normal-incident power $P$ satisfies $Fc$/$P=2$, and for a perfectly absorbing (black) surface $Fc$/$P=1$.
meep-1.12.0/doc/docs/Scheme_User_Interface.md-1091-
##############################################
meep-1.12.0/doc/docs/Scheme_User_Interface.md-1364-
meep-1.12.0/doc/docs/Scheme_User_Interface.md:1365:It is often useful to use the `h5topng` `-C` or `-A` options to overlay the dielectric function when outputting fields. To do this, you need to know the name of the dielectric-function `.h5` file which must have been previously output by `output-epsilon`. To make this easier, a built-in shell variable `$EPS` is provided which refers to the last-output dielectric-function `.h5` file. So, for example `(output-png Ez "-C $EPS")` will output the $E_z$ field and overlay the dielectric contours.
meep-1.12.0/doc/docs/Scheme_User_Interface.md-1366-
##############################################
meep-1.12.0/doc/docs/Scheme_User_Interface.md-1388-meep-1.12.0/doc/docs/Scheme_User_Interface.md:1389:Returns a step function that collects data from the field component `c` (e.g. $E_x$, etc.) at the given point `pt` (a `vector3`). Then, at the end of the run, it uses Harminv to look for modes in the given frequency range (center `fcen` and width `df`), printing the results to standard output (prefixed by `harminv:`) as comma-delimited text, and also storing them to the variable `harminv-results`. The optional argument `maxbands` is the maximum number of modes to search for. Defaults to 100.
meep-1.12.0/doc/docs/Scheme_User_Interface.md-1390-
##############################################
meep-1.12.0/doc/docs/Subpixel_Smoothing.md-25-
meep-1.12.0/doc/docs/Subpixel_Smoothing.md:26:where $\textbf{P}$ is the projection matrix $P_{ij}=n_{i}n_{j}$ onto the normal $\vec{n}$. The $\langle\cdots\rangle$ denotes an average over the voxel $sΔx\times sΔy\times sΔz$ surrounding the grid point in question where $s$ is a smoothing diameter in grid units equal to 1/`resolution`. If the initial materials are anisotropic (via `epsilon_diag` and `epsilon_offdiag`), a more complicated formula is used. They key point is that, even if the structure consists entirely of isotropic materials, the discretized structure will use anisotropic materials. For interface pixels, Meep computes the effective permittivity tensor automatically at the start of the simulation prior to time stepping via analytic expressions for the filling fraction and local normal vector. For details involving derivation of the effective permittivity tensor and its implementation in Meep/FDTD, see [Optics Letters, Vol. 36, pp. 2972-4, 2006](https://www.osapublishing.org/ol/abstract.cfm?uri=ol-31-20-2972) and [Optics Letters, Vol. 35, pp. 2778-80, 2009](https://www.osapublishing.org/abstract.cfm?uri=ol-34-18-2778).
meep-1.12.0/doc/docs/Subpixel_Smoothing.md-27-
##############################################
meep-1.12.0/doc/docs/Units_and_Nonlinearity.md-23-
meep-1.12.0/doc/docs/Units_and_Nonlinearity.md:24:where $n_0$ is the linear refractive index $n_0=\sqrt{\varepsilon}$. See, for example, Section 4.1 of [Nonlinear Optics (third edition)](https://www.amazon.com/Nonlinear-Optics-Third-Robert-Boyd/dp/0123694701) by R. W. Boyd.
meep-1.12.0/doc/docs/Units_and_Nonlinearity.md-25-
##############################################
meep-1.12.0/m4/ax_compiler_vendor.m4-20-  for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do 
meep-1.12.0/m4/ax_compiler_vendor.m4:21:    vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
meep-1.12.0/m4/ax_compiler_vendor.m4-22-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
##############################################
meep-1.12.0/m4/ax_compiler_vendor.m4-25-#endif
meep-1.12.0/m4/ax_compiler_vendor.m4:26:])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
meep-1.12.0/m4/ax_compiler_vendor.m4-27-  done
##############################################
meep-1.12.0/m4/ax_gcc_archflag.m4-114-     AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/])
meep-1.12.0/m4/ax_gcc_archflag.m4:115:     cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null`
meep-1.12.0/m4/ax_gcc_archflag.m4:116:     cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters`
meep-1.12.0/m4/ax_gcc_archflag.m4-117-     case $cputype in
##############################################
meep-1.12.0/m4/ax_gcc_archflag.m4-138-     cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null`
meep-1.12.0/m4/ax_gcc_archflag.m4:139:     cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'`
meep-1.12.0/m4/ax_gcc_archflag.m4-140-     case $cputype in
##############################################
meep-1.12.0/m4/pkg.m4-27-            AC_MSG_CHECKING($1_CFLAGS)
meep-1.12.0/m4/pkg.m4:28:            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
meep-1.12.0/m4/pkg.m4-29-            AC_MSG_RESULT($$1_CFLAGS)
##############################################
meep-1.12.0/m4/pkg.m4-31-            AC_MSG_CHECKING($1_LIBS)
meep-1.12.0/m4/pkg.m4:32:            $1_LIBS=`$PKG_CONFIG --libs "$2"`
meep-1.12.0/m4/pkg.m4-33-            AC_MSG_RESULT($$1_LIBS)
##############################################
meep-1.12.0/m4/pkg.m4-38-            ## do set a variable so people can do so.
meep-1.12.0/m4/pkg.m4:39:            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
meep-1.12.0/m4/pkg.m4-40-            ifelse([$4], ,echo $$1_PKG_ERRORS,)
##############################################
meep-1.12.0/python/examples/antenna-radiation.ipynb-201-   "source": [
meep-1.12.0/python/examples/antenna-radiation.ipynb:202:    "For the second of two cases, we use the `get_farfield` routine to compute the far fields by looping over a set of 100 equally-spaced points along the circumference of a circle with radius of 1 mm. The six far field components ($E_x$, $E_y$, $E_z$, $H_x$, $H_y$, $H_z$) are stored as separate arrays of complex numbers. From the far fields at each point $r$, we compute the outgoing or radial flux: $P^2_x+P^2_y$, where $P_x$ and $P_y$ are the components of the Poynting vector $P(r)=(P_x,P_y,P_z)=\\Re(E(r) \\times H(r))$. Note that $P_z$ is always 0 since this is a 2d simulation. The total flux is computed and the three flux values are displayed."
meep-1.12.0/python/examples/antenna-radiation.ipynb-203-   ]
##############################################
meep-1.12.0/python/examples/binary_grating.ipynb-294-   "source": [
meep-1.12.0/python/examples/binary_grating.ipynb:295:    "Note the use of the keyword parameter argument `eig_parity=mp.ODD_Z+mp.EVEN_Y` in the call to `get_eigenmode_coefficients`. This is important for specifying **non-degenerate** modes in MPB since the `k_point` is (0,0,0). `ODD_Z` is for modes with E<sub>z</sub> polarization. `EVEN_Y` is necessary since each diffraction order which is based on a given k<sub>x</sub> consists of *two* modes: one going in the +y direction and the other in the -y direction. `EVEN_Y` forces MPB to compute only the +k<sub>y</sub> + -k<sub>y</sub> (cosine) mode. As a result, the total transmittance must be halved in this case to obtain the transmittance for the individual +k<sub>y</sub> or -k<sub>y</sub> mode. For `ODD_Y`, MPB will compute the +k<sub>y</sub> - -k<sub>y</sub> (sine) mode but this will have zero power because the source is even. If the $y$ parity is left out, MPB will return a random superposition of the cosine and sine modes. Alternatively, in this example an input planewave with H<sub>z</sub> instead of E<sub>z</sub> polarization can be used which requires `eig_parity=mp.EVEN_Z+mp.ODD_Y` as well as an odd mirror symmetry plane in *y*. Finally, note the use of `add_flux` instead of `add_mode_monitor` when using symmetries.\n",
meep-1.12.0/python/examples/binary_grating.ipynb-296-    "\n",
##############################################
meep-1.12.0/python/examples/binary_grating.ipynb-343-    "\n",
meep-1.12.0/python/examples/binary_grating.ipynb:344:    "The diffraction orders/modes are a finite set of propagating planewaves. The wavevector $k_x$ of these modes can be computed analytically: for a frequency of $ω$ (in $c$=1 units), these propagating modes are the **real** solutions of sqrt(ω²n²-($k_y$+2π$m$/$Λ$)²) where $m$ is the diffraction order (an integer), $Λ$ is the periodicity of the grating, and $n$ is the refractive index of the propagating medium. In this example, $n$=1, $k_y$=0, and $Λ$=10 μm. Thus, at a wavelength of 0.5 μm there are a total of 20 diffraction orders of which we only computed the first 10. The wavevector $k_x$ is used to compute the angle of the diffraction order as cos<sup>-1</sup>($k_x$/($ωn$)). Evanescent modes, those with an imaginary k<sub>x</sub>, exist for |$m$|>20 but these modes carry no power. Note that currently Meep does not compute the number of propagating modes for you. If the mode number passed to `get_eigenmode_coefficients` is larger than the number of propagating modes at a given frequency/wavelength, MPB's Newton solver will fail to converge and will return zero for the mode\\ coefficient. It is therefore a good idea to know beforehand the number of propagating modes.\n",
meep-1.12.0/python/examples/binary_grating.ipynb-345-    "\n",
##############################################
meep-1.12.0/python/examples/coupler.ipynb-1010-   "source": [
meep-1.12.0/python/examples/coupler.ipynb:1011:    "For a given waveguide separation distance (`d`), the simulation computes the transmittance of Ports 2, 3, and 4. The transmittance is the square of the [S-parameter](https://en.wikipedia.org/wiki/Scattering_parameters) which is equivalent to the [mode coefficient](https://meep.readthedocs.io/en/latest/Mode_Decomposition). There is an additional mode monitor at Port 1 to compute the input power from the adjacent eigenmode source; this is used for normalization when computing the transmittance. The eight layers of the GDSII file are each converted to a `Simulation` object: the upper and lower branches of the coupler are defined as a collection of [`Prism`](https://meep.readthedocs.io/en/latest/Python_User_Interface/#prism)s, the rectilinear regions of the source and flux monitor as a [`Volume`](https://meep.readthedocs.io/en/latest/Python_User_Interface/#volume) and [`FluxRegion`](https://meep.readthedocs.io/en/latest/Python_User_Interface/#fluxregion). The size of the cell in the $y$ direction is dependent on `d`. The default dimensionality is 2d. An optional input parameter (`three_d`) converts the geometry to 3d by extruding the coupler geometry in the *z* direction and adding an oxide layer beneath similar to a [silicon on insulator](https://en.wikipedia.org/wiki/Silicon_on_insulator) (SOI) substrate. A schematic of the coupler design in 3d generated using MayaVi is shown below.\n",
meep-1.12.0/python/examples/coupler.ipynb-1012-    "\n",
##############################################
meep-1.12.0/python/examples/holey-wvg-bands.ipynb-10-    "\n",
meep-1.12.0/python/examples/holey-wvg-bands.ipynb:11:    "Let us briefly review the problem. In a periodic system of this sort, the eigen-solutions can be expressed in the form of Bloch modes: a periodic Bloch envelope multiplied by a planewave $exp[i(k⋅x−\\omega t)]$, where $k$ is the Bloch wavevector. We wish to find the bands $\\omega(k)$. In this case, there is only one direction of periodicity, so we only have one wavevector component $k_x$. Moreover, the solutions are periodic functions of this wavevector: for a unit-period structure, $k_x$ and $k_x+2\\pi$ are redundant. Also, $k_x$ and $−k_x$ are redundant by time-reversal symmetry, so we only need to look for solutions in the irreducible Brillouin zone from $k_x=0$ to $k_x=\\pi$.\n",
meep-1.12.0/python/examples/holey-wvg-bands.ipynb-12-    "\n",
##############################################
meep-1.12.0/python/examples/metal-cavity-ldos.ipynb-18-    "\n",
meep-1.12.0/python/examples/metal-cavity-ldos.ipynb:19:    "where $Q^{(n)}=\\omega^{(n)}/2\\gamma^{(n)}$ is the dimensionless [quality factor](https://en.wikipedia.org/wiki/Q_factor) and $V^{(n)}$ is the modal volume. This represents another way to compute the LDOS. In this tutorial, we will verify this expression by comparing it to the earlier one.\n",
meep-1.12.0/python/examples/metal-cavity-ldos.ipynb-20-    "\n",
##############################################
meep-1.12.0/python/examples/metal-cavity-ldos.ipynb-22-    "\n",
meep-1.12.0/python/examples/metal-cavity-ldos.ipynb:23:    "We will validate both this prediction and the LDOS calculations above by computing the LDOS at the center of the cavity, the point of peak $|\\vec{E}|$, in two ways. First, we compute the LDOS directly from the power radiated by a dipole, Fourier-transforming the result of a pulse using the `dft_ldos` command. Second, we compute the cavity mode and its lifetime $Q$ using `Harminv` and then compute the LDOS by the Purcell formula shown above. The latter technique is much more efficient for high Q (small $w$), since one must run the simulation for a very long time to directly accumulate the Fourier transform of a slowly-decaying mode. The two calculations, we will demonstrate, agree to within discretization error, verifying the LDOS analysis above, and $Q/V$ is asymptotically linear on a semilog scale versus $1/w$ as predicted."
meep-1.12.0/python/examples/metal-cavity-ldos.ipynb-24-   ]
##############################################
meep-1.12.0/python/examples/oblique-planewave.ipynb-229-   "source": [
meep-1.12.0/python/examples/oblique-planewave.ipynb:230:    "Note that this example involves a `ContinuousSource` for the time profile. For a pulsed source, the oblique planewave is incident at a given angle for only a *single* frequency component of the source. This is a fundamental feature of FDTD simulations and not of Meep per se. Thus, to simulate an incident planewave at multiple angles for a given frequency ω, you will need to do separate simulations involving different values of $\\vec{k}$ (`k_point`) since each set of ($\\vec{k}$,ω) specifying the Bloch-periodic boundaries and the frequency of the source will produce a different angle of the planewave. For more details, refer to Section 4.5 (\"Efficient Frequency-Angle Coverage\") in [Chapter 4](https://arxiv.org/abs/1301.5366) (\"Electromagnetic Wave Source Conditions\") of [Advances in FDTD Computational Electrodynamics: Photonics and Nanotechnology](https://www.amazon.com/Advances-FDTD-Computational-Electrodynamics-Nanotechnology/dp/1608071707)."
meep-1.12.0/python/examples/oblique-planewave.ipynb-231-   ]
##############################################
meep-1.12.0/python/examples/parallel-wvgs-force.ipynb-127-   "source": [
meep-1.12.0/python/examples/parallel-wvgs-force.ipynb:128:    "There are two important items to note in `parallel_waveguide`: (1) a single flux surface is used to compute the Poynting flux in $z$ which spans an area slightly larger than both waveguides rather than two separate flux surfaces (one for each waveguide). This is because in the limit of small separation, two flux surfaces overlap whereas the total power through a single flux surface need, by symmetry, only be halved in order to determine the value for just one of the two waveguides. (2) Instead of defining a closed, four-sided \"box\" surrounding the waveguides, the MST is computed along just two $y$-oriented lines (to obtain the force in the $x$ direction) with different `weight` values to correctly sum the total force. By symmetry, the force in the $y$ direction is zero and need not be computed. Choosing a suitable runtime requires some care. A large runtime is necessary to obtain the steady-state response but this will also lead to large values for the discrete Fourier-transformed fields used to compute both the flux and the MST. Large floating-point numbers may contain [roundoff errors](https://en.wikipedia.org/wiki/Round-off_error).\n",
meep-1.12.0/python/examples/parallel-wvgs-force.ipynb-129-    "\n",
##############################################
meep-1.12.0/python/examples/ring.ipynb-67-   "source": [
meep-1.12.0/python/examples/ring.ipynb:68:    "Later objects in the `geometry` object take precedence over or rather lie \"on top of\" earlier objects, so the second `air` ($\\epsilon$=1) cylinder cuts a circular hole out of the larger cylinder, leaving a ring of width `w`.\n",
meep-1.12.0/python/examples/ring.ipynb-69-    "\n",
##############################################
meep-1.12.0/debian/missing-sources/highlight.js-322-        r: 0
meep-1.12.0/debian/missing-sources/highlight.js:323:    }, e.ASM = {
meep-1.12.0/debian/missing-sources/highlight.js-324-        cN: "string",
##############################################
meep-1.12.0/debian/missing-sources/highlight.js-387-        i = {
meep-1.12.0/debian/missing-sources/highlight.js:388:            keyword: "int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required",
meep-1.12.0/debian/missing-sources/highlight.js-389-            literal: "false true FALSE TRUE nil YES NO NULL",
##############################################
meep-1.12.0/debian/missing-sources/highlight.js-666-    var r = {
meep-1.12.0/debian/missing-sources/highlight.js:667:            keyword: "abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",
meep-1.12.0/debian/missing-sources/highlight.js-668-            built_in: "bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",
##############################################
meep-1.12.0/debian/missing-sources/highlight.js-1991-hljs.registerLanguage("delphi", function (e) {
meep-1.12.0/debian/missing-sources/highlight.js:1992:    var r = "exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure",
meep-1.12.0/debian/missing-sources/highlight.js-1993-        t = [e.CLCM, e.C(/\{/, /\}/, {
##############################################
meep-1.12.0/debian/missing-sources/highlight.js-3655-        k: {
meep-1.12.0/debian/missing-sources/highlight.js:3656:            keyword: "addr and as asm bind block break|0 case|0 cast const|0 continue|0 converter discard distinct|10 div do elif else|0 end|0 enum|0 except export finally for from generic if|0 import|0 in include|0 interface is isnot|10 iterator|10 let|0 macro method|10 mixin mod nil not notin|10 object|0 of or out proc|10 ptr raise ref|10 return shl shr static template|10 try|0 tuple type|0 using|0 var|0 when while|0 with without xor yield",
meep-1.12.0/debian/missing-sources/highlight.js-3657-            literal: "shared guarded stdin stdout stderr result|10 true false"
##############################################
meep-1.12.0/debian/missing-sources/highlight.js-4507-    var i = {
meep-1.12.0/debian/missing-sources/highlight.js:4508:        keyword: "false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary intmax_t uintmax_t int8_t uint8_t int16_t uint16_t int32_t uint32_t  int64_t uint64_t int_least8_t uint_least8_t int_least16_t uint_least16_t int_least32_t uint_least32_t int_least64_t uint_least64_t int_fast8_t uint_fast8_t int_fast16_t uint_fast16_t int_fast32_t uint_fast32_t int_fast64_t uint_fast64_t intptr_t uintptr_t atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong atomic_wchar_t atomic_char16_t atomic_char32_t atomic_intmax_t atomic_uintmax_t atomic_intptr_t atomic_uintptr_t atomic_size_t atomic_ptrdiff_t atomic_int_least8_t atomic_int_least16_t atomic_int_least32_t atomic_int_least64_t atomic_uint_least8_t atomic_uint_least16_t atomic_uint_least32_t atomic_uint_least64_t atomic_int_fast8_t atomic_int_fast16_t atomic_int_fast32_t atomic_int_fast64_t atomic_uint_fast8_t atomic_uint_fast16_t atomic_uint_fast32_t atomic_uint_fast64_t",
meep-1.12.0/debian/missing-sources/highlight.js-4509-        built_in: "std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf"
##############################################
meep-1.12.0/debian/missing-sources/jquery-2.1.1.js-1731-                    else if (cb.test(e)) {
meep-1.12.0/debian/missing-sources/jquery-2.1.1.js:1732:                f = f || k.appendChild(b.createElement("div")), g = (bb.exec(e) || ["", ""])[1].toLowerCase(), h = ib[g] || ib._default, f.innerHTML = h[1] + e.replace(ab, "<$1></$2>") + h[2], j = h[0];
meep-1.12.0/debian/missing-sources/jquery-2.1.1.js-1733-                while (j--) f = f.lastChild;
##############################################
meep-1.16.1/configure.ac-283-else
meep-1.16.1/configure.ac:284:  GUILE_LIBS=`$GUILE_CONFIG link`
meep-1.16.1/configure.ac:285:  GUILE_CPPFLAGS=`$GUILE_CONFIG compile`
meep-1.16.1/configure.ac-286-  CPPFLAGS="$CPPFLAGS $GUILE_CPPFLAGS"
##############################################
meep-1.16.1/configure.ac-543-      AC_MSG_CHECKING([for Python include directory])
meep-1.16.1/configure.ac:544:      pinc=`echo "import distutils.sysconfig; print (distutils.sysconfig.get_python_inc())" | $PYTHON - 2>/dev/null`
meep-1.16.1/configure.ac-545-      AC_MSG_RESULT([${pinc:-unknown}])
##############################################
meep-1.16.1/configure.ac-553-        AC_MSG_CHECKING([for Numpy include directory])
meep-1.16.1/configure.ac:554:        pinc=`echo "import numpy; print (numpy.get_include())" | $PYTHON - 2>/dev/null`
meep-1.16.1/configure.ac-555-        AC_MSG_RESULT([${pinc:-unknown}])
##############################################
meep-1.16.1/doc/docs/2d_Cell_Special_kz.md-4-
meep-1.16.1/doc/docs/2d_Cell_Special_kz.md:5:A 2d cell with a `k_point` that has a *non-zero* $z$ component $\beta$ (e.g., planewaves incident on a 2d structure from an out-of-plane direction, propagating modes of fiber waveguides with 2d cladding cross section, etc.) could be accomplished by a "1-pixel-thick" 3d simulation with complex fields (this is done by the `kz_2d="3d"` option). However, Meep will by default model the $e^{i \beta z}$ dependence using a modified 2d simulation with complex fields (this is done by the `kz_2d="complex"` option), which improves performance with no loss in accuracy (as demonstrated below). As a further optimization, Meep can also model this problem with "real" fields via `kz_2d="real/imag"`, but the fields must be interpreted in a special way.
meep-1.16.1/doc/docs/2d_Cell_Special_kz.md-6-
##############################################
meep-1.16.1/doc/docs/2d_Cell_Special_kz.md-8-
meep-1.16.1/doc/docs/2d_Cell_Special_kz.md:9:However, an additional trick is possible.  Since the $i\beta\hat{z} \times {}$ complex term only couples $E_z$ and $H_z$ polarizations to one another, then we can choose the $H_z$ polarization ($E_x, E_y, H_z$ fields) to be purely real while the $E_z$ polarization ($H_x, H_y, E_z$ fields) is purely *imaginary*.   The `kz_2d="real/imag"` option does precisely this, but stores the purely imaginary $E_z$ polarization as the "real" parts of the fields, both internally and in the output.  So, if you use the `kz_2d="real/imag"` and you output both $E_x$ and $E_z$, the output will be real numbers, but you should multiply $E_z$ by $i$ to get the actual fields.    This requires some care, which is why this option is not the default.  The good news is that calculations of flux, energy, forces and similar real quantities are insensitive to this implicit $i$ factor (the $i$ cancels), so the built-in calculations do the right thing with no modification.
meep-1.16.1/doc/docs/2d_Cell_Special_kz.md-10-
##############################################
meep-1.16.1/doc/docs/Build_From_Source.md-19-
meep-1.16.1/doc/docs/Build_From_Source.md:20:Most of the software below, including Meep, installs under `/usr/local` by default. That is, libraries go in `/usr/local/lib`, programs in `/usr/local/bin`, etc. If you don't have `root` privileges on your machine, you may need to install somewhere else, e.g. under `$HOME/install` (the `install/` subdirectory of your home directory). Most of the programs below use a GNU-style `configure` script, which means that all you would do to install there would be:
meep-1.16.1/doc/docs/Build_From_Source.md-21-
##############################################
meep-1.16.1/doc/docs/Build_From_Source.md-25-
meep-1.16.1/doc/docs/Build_From_Source.md:26:when configuring the program. The directories `$HOME/install/lib` etc. are created automatically as needed.
meep-1.16.1/doc/docs/Build_From_Source.md-27-
##############################################
meep-1.16.1/doc/docs/Build_From_Source.md-29-
meep-1.16.1/doc/docs/Build_From_Source.md:30:There are two further complications. First, if you install dependencies in a non-standard location like `$HOME/install/lib`, you will need to tell the compilers where to find the libraries and header files that you installed. You do this by passing two variables to `./configure`:
meep-1.16.1/doc/docs/Build_From_Source.md-31-
##############################################
meep-1.16.1/doc/docs/Build_From_Source.md-48-
meep-1.16.1/doc/docs/Build_From_Source.md:49:There are several ways to do this.  Suppose that you installed libraries into the directory `$HOME/install/lib`.   The most robust option is probably to include this path in the linker flags:
meep-1.16.1/doc/docs/Build_From_Source.md-50-
##############################################
meep-1.16.1/doc/docs/Build_From_Source.md-56-
meep-1.16.1/doc/docs/Build_From_Source.md:57:On many systems, you can also specify directories to the runtime linker via the `LD_LIBRARY_PATH` environment variable. In particular, by `export LD_LIBRARY_PATH="$HOME/install/lib:$LD_LIBRARY_PATH"`; you can add this to your `.profile` file (depending on your shell) to make it run every time you run your shell. On MacOS, a security feature called [System Integrity Protection](https://en.wikipedia.org/wiki/System_Integrity_Protection) causes the value of `LD_LIBRARY_PATH` to be ignored, so using environment variables won't work there.
meep-1.16.1/doc/docs/Build_From_Source.md-58-
##############################################
meep-1.16.1/doc/docs/Eigensolver_Math.md-47-
meep-1.16.1/doc/docs/Eigensolver_Math.md:48:The eigenvalue problem is simply $$\hat{M}(\omega)\psi=0\Longleftrightarrow\hat{A}(\omega)\Psi=0$$ i.e. to find a (complex resonant) frequency $\omega$ for which $\hat{M}$ is singular, and a corresponding eigenvector $\psi$ in the nullspace of $\hat{M}(\omega)$. If we have *non-dispersive* materials, those where $1+\hat{\chi}$ is *independent* of $\omega$, then this is a linear generalized eigenproblem $$\hat{C}\psi=-i\omega(1+\hat{\chi})\psi$$ or equivalently a linear eigenproblem $$i(1+\hat{\chi})^{-1}\hat{C}\psi=\omega\psi\Longleftrightarrow i\hat{C}(1+\hat{\chi})^{-1}\Psi=\omega\Psi.$$ For lossless transparent materials, i.e. real $\hat{\chi}>-1$, these problems are Hermitian under an inner product weighted by $1+\hat{\chi}$ (for $\psi$) or $(1+\hat{\chi})^{-1}$ (for $\Psi$), which leads to real $\omega$. More generally, for *dispersive* ($\omega$-dependent) materials, $\hat{M}(\omega)\psi=0$ or $\hat{A}(\omega)\Psi=0$ is a "*nonlinear* eigenvalue problem."
meep-1.16.1/doc/docs/Eigensolver_Math.md-49-
##############################################
meep-1.16.1/doc/docs/Eigensolver_Math.md-54-
meep-1.16.1/doc/docs/Eigensolver_Math.md:55:In fact, suppose that $|\omega-\omega_{0}|\ll\omega_{0}$ is so small that we can approximate $\hat{\chi}(\omega_{0})\approx\hat{\chi}(\omega)$, allowing us to *neglect material dispersion* when computing $\omega$. In this case, we can use the standard [shift-and-invert power method](https://en.wikipedia.org/wiki/Inverse_iteration) to repeatedly solve $$\left[i(1-\hat{\chi})^{-1}\hat{C}-\omega_{0}\right]\psi_{n+1}=\psi_{n}\Longleftrightarrow\hat{M}(\omega_{0})\psi_{n+1}=-i(1+\hat{\chi})\psi_{n}\Longleftrightarrow\hat{A}(\omega_{0})\Psi_{n+1}=-i\Psi_{n}$$ with some arbitrary $\psi_{0}$ (e.g. random or a point source). This is, in fact, just a Maxwell solve, where the "current source" is $$\xi=-i(1+\hat{\chi})\psi_{n}=-i\Psi_{n},$$ i.e. the $\mathbf{D}$ and $\mathbf{B}$ fields of the previous solve. The $-i$ factor is essentially irrelevant, since we can scale eigenfunctions arbitrarily, and in fact one ordinarily wants to renormalize $\Psi_{n}\to\Psi_{n}/\Vert\Psi_{n}\Vert$ on each power iteration to prevent the iterations $\Psi_{n}$ from blowing up (or decaying to zero).
meep-1.16.1/doc/docs/Eigensolver_Math.md-56-
##############################################
meep-1.16.1/doc/docs/Eigensolver_Math.md-67-
meep-1.16.1/doc/docs/Eigensolver_Math.md:68:In the case of lossless media (Hermitian positive-definite $1+\hat{\chi}$) with real $\omega$, the accuracy of $\omega_{n}$ can be improved by using an inner product where $i\hat{A}$ is Hermitian, i.e. $\langle\Psi,\Phi\rangle_{\hat{\chi}}=\int\Psi^{*}(1+\hat{\chi})^{-1}\Phi$, which implies that $\langle\Psi,\Psi\rangle_{\hat{\chi}}=\int\Psi^{*}\psi=\int(\mathbf{D}^{*}\mathbf{E}+\mathbf{B}^{*}\mathbf{H})$ which corresponds physically to electromagnetic energy. Doing this essentially squares the error (i.e. it doubles the number of digits in the eigenvalue estimate) because eigenvalues of Hermitian operators are extrema of the Rayleigh quotient. Unfortunately, if the medium is not lossless, you can run into problems because this $\langle\Psi,\Phi\rangle_{\hat{\chi}}$ is not an inner product, and one can even have $\langle\Psi,\Psi\rangle_{\hat{\chi}}=0$ at exceptional points. Since the main utility of computing eigenvalues in Meep is arguably for computing resonance modes of non-Hermitian problems (since most Hermitian cases can be handled more efficiently in MPB), we should probably just stick with the $\langle\Psi,\Phi\rangle=\int\Psi^{*}\Phi$ inner product.
meep-1.16.1/doc/docs/Eigensolver_Math.md-69-
##############################################
meep-1.16.1/doc/docs/Exploiting_Symmetry.md-47-
meep-1.16.1/doc/docs/Exploiting_Symmetry.md:48:In a cylindrical simulation, fields can be written in the form of a function of $(r,z)$ multiplied by a function $\exp(im\phi)$ for the $\phi$ dependence, where $m$ is a user-specified parameter (related to the angular momentum of the field). If the cell includes the $r=0$ origin, then $m$ must be an integer to be single-valued at the origin. Otherwise, $m$ can be arbitrary (this is useful e.g. for bend simulations).
meep-1.16.1/doc/docs/Exploiting_Symmetry.md-49-
##############################################
meep-1.16.1/doc/docs/FAQ.md-134-
meep-1.16.1/doc/docs/FAQ.md:135:An arbitrary-angle planewave with wavevector $\vec{k}$ can be generated in two different ways: (1) by setting the amplitude function [`amp_func`](Python_User_Interface.md#source) to $exp(i\vec{k}\cdot\vec{r})$ for a $d-1$ dimensional source in a $d$ dimensional cell (i.e., line source in 2d, planar source in 3d), or (2) via the [eigenmode source](Python_User_Interface.md#eigenmodesource). These two approaches generate **identical** planewaves with the only difference being that the planewave produced by the eigenmode source is unidirectional. In both cases, generating an infinitely-extended planewave requires that: (1) the source span the *entire* length of the cell and (2) the Bloch-periodic boundary condition `k_point` be set to $\vec{k}$.
meep-1.16.1/doc/docs/FAQ.md-136-
##############################################
meep-1.16.1/doc/docs/FAQ.md-144-
meep-1.16.1/doc/docs/FAQ.md:145:A focused beam with a Gaussian envelope can be created using the [`GaussianBeamSource`](Python_User_Interface.md#gaussianbeamsource) as demonstrated in this [script](https://github.com/NanoComp/meep/blob/master/python/examples/gaussian-beam.py). The following are four snapshots of the resulting field profile generated using a line source (red line) in 2d for different values of the beam waist radius/width $w_0$ (`beam_w0`), propagation direction $\vec{k}$ (`beam_kdir`), and focus (`beam_x0`):
meep-1.16.1/doc/docs/FAQ.md-146-
##############################################
meep-1.16.1/doc/docs/FAQ.md-154-
meep-1.16.1/doc/docs/FAQ.md:155:A circularly polarized planewave in [cylindrical coordinates](Python_Tutorials/Cylindrical_Coordinates.md) corresponds to $\vec{E}=(\hat{r}+i\hat{\phi})\exp(i\phi)$. This can be created using a constant $E_r$ (radial) current source with `amplitude`=1 and a constant $E_p$ (azimuthal) current source with `amplitude`=0+1i as well as `m`=1.
meep-1.16.1/doc/docs/FAQ.md-156-
##############################################
meep-1.16.1/doc/docs/FAQ.md-168-
meep-1.16.1/doc/docs/FAQ.md:169:If the `width` is 0 (the default) then the source turns on sharply which creates high-frequency transient effects. Otherwise, the source turns on with a shape of (1 + tanh(t/`width` - `slowness`))/2. That is, the `width` parameter controls the width of the turn-on. The `slowness` parameter controls how far into the exponential tail of the tanh function the source turns on. The default `slowness` of 3.0 means that the source turns on at $(1 + \tanh(-3))/2 = 0.00247$ of its maximum amplitude.  A larger value for `slowness` means that the source turns on even more gradually at the beginning (i.e., farther in the exponential tail). The effect of varying the two parameters `width` and `slowness` independently in the turn-on function is shown below.
meep-1.16.1/doc/docs/FAQ.md-170-
##############################################
meep-1.16.1/doc/docs/FAQ.md-227-
meep-1.16.1/doc/docs/FAQ.md:228:To obtain the loss in time, you make your computational cell a cross-section of your waveguide (i.e. 2d for a waveguide with constant cross-section), and set Bloch-periodic boundary conditions via the `k_point` input variable &mdash; this specifies your (real) $\beta$. You then treat it exactly the same as a [resonant-cavity problem](Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md#resonant-modes): you excite the system with a short pulse source, monitor the field at some point, and then analyze the result with [`Harminv`](Python_User_Interface.md#harminv); all of which is done if you call `run_kpoints`. This will give you the complex $\omega$ at the given $\beta$, where the imaginary part is the loss rate in time. Note: the loss in a uniform waveguide, with no absorption or disorder, is zero, even in the discretized system.
meep-1.16.1/doc/docs/FAQ.md-229-
meep-1.16.1/doc/docs/FAQ.md:230:That is, you have $\omega(\beta_r) = \omega_r + i\omega_i$ where the subscripts $r$ and $i$ denote real and imaginary parts. Now, what you want to do is to get the complex $\beta$ at the real $\omega$ which is given by: $\beta(\omega_r) = \beta_r - i\omega_i/v_g + \mathcal{O}(\omega_i^2)$. That is, to first order in the loss, the imaginary part of $\beta$ (the propagation loss) at the real frequency $\omega_r$ is given just by dividing $\omega_i$ by the group velocity $v_g = \frac{d\omega}{d\beta}$, which you can [get from the dispersion relation in the absence of loss](#how-do-i-compute-the-group-velocity-of-a-mode). This relationship is just a consequence of the first-order Taylor expansion of the dispersion relation $\omega(\beta)$ in the complex plane.
meep-1.16.1/doc/docs/FAQ.md-231-
##############################################
meep-1.16.1/doc/docs/FAQ.md-245-
meep-1.16.1/doc/docs/FAQ.md:246:The decay coefficient of the fields within any PML contains a $\cos(\theta)$ factor where $\theta$ is the incidence angle ($\theta=0^{\circ}$ is normal incidence). The decay therefore becomes *slower* as glancing incidence ($\theta=90^{\circ}$) is approached. This is true in the continuum limit and can be demonstrated by verifying that the reflections from the PML do *not* change with resolution. Otherwise, if the reflection decreases with increasing resolution then it may be due to transition reflections (i.e., the impedance mismatch at the PML interface) which can also be reduced by making the PML thicker instead of increasing the resolution. Transition reflections also increase as glancing incidence is approached, because at glancing incidence the phase-velocity mismatch between incident and reflected waves goes to zero as described in [Optics Express, Vol. 16, pp. 11376-92, 2008](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). Glancing-angle fields commonly arise in simulations where one direction is periodic and the other is terminated by a PML (such as in [diffraction gratings](Python_Tutorials/Mode_Decomposition.md#diffraction-spectrum-of-a-binary-grating)), in which case you can have spurious solutions that travel *parallel* to the PML interface; a workaround is to use a thicker non-PML [absorber](Python_User_Interface.md#absorber). This is demonstrated in the figure below by the glancing-angle fields remaining in the cell after a [source planewave](Python_Tutorials/Eigenmode_Source.md#planewaves-in-homogeneous-media) at 45° has long been turned off: the PML (left inset) is unable to absorb these fields unlike the absorber (right inset).
meep-1.16.1/doc/docs/FAQ.md-247-
##############################################
meep-1.16.1/doc/docs/FAQ.md-277-
meep-1.16.1/doc/docs/FAQ.md:278:For the instantaneous fields, you can use [`electric_energy_in_box`](Python_User_Interface.md#field-computations) to compute the integral of $\varepsilon|\mathbf{E}|^2$ in some region. For the magnetic or total field energy, you can use `magnetic_energy_in_box` or `field_energy_in_box`. When computing the total field energy, you will need to first [synchronize the magnetic and electric fields](Synchronizing_the_Magnetic_and_Electric_Fields.md). To compute the integral of the energy density for a *single* field component e.g. $\varepsilon|E_z|^2/2$, you can use the [field function](Field_Functions.md): `integrate_field_function([meep.Dielectric, meep.Ez], def f(eps,ez): return 0.5*eps*abs(ez)**2, where=meep.Volume(...))`.
meep-1.16.1/doc/docs/FAQ.md-279-
##############################################
meep-1.16.1/doc/docs/FAQ.md-314-
meep-1.16.1/doc/docs/FAQ.md:315:Only the [harmonic mean](https://en.wikipedia.org/wiki/Harmonic_mean) of eigenvalues of the $\varepsilon$/$\mu$ tensor are written to an HDF5 file using `output_epsilon`/`output_mu`. The complex $\varepsilon$ and $\mu$ tensor can be obtained at the frequency `f` as a 3x3 Numpy array via the functions `epsilon(f)` and `mu(f)` of the [`Medium`](Python_User_Interface.md#medium) class.
meep-1.16.1/doc/docs/FAQ.md-316-
##############################################
meep-1.16.1/doc/docs/FAQ.md-328-
meep-1.16.1/doc/docs/FAQ.md:329:There are five ways to define a structure: (1) the [`GeometricObject`](Python_User_Interface.md#geometricobject) (Python) or [`geometric-object`](Scheme_User_Interface.md#geometric-object) (Scheme) class used to specify a collection of predefined shapes including `Prism`, `Sphere`, `Cylinder`, `Cone`, `Block`, and `Ellipsoid`, (2) [`material_function`](Python_User_Interface.md#material-function) (Python) or [`material-function`](Scheme_User_Interface.md#material-function) (Scheme) used to define an arbitrary function: for a given position in the cell, return the $\varepsilon$/$\mu$ at that point, (3) import the scalar, real-valued, frequency-independent permittivity from an HDF5 file (which can be created using e.g., [h5py](http://docs.h5py.org/en/stable/)) via the `epsilon_input_file` (Python) or `epsilon-input-file` (Scheme) input parameter, (4) import planar geometries from a [GDSII file](Python_User_Interface.md#gdsii-support), or (5) load the raw $\varepsilon$/$\mu$ saved from a previous simulation using [`load_structure`](Python_User_Interface.md#load-and-dump-structure) (Python) or [`meep-structure-load`](Scheme_User_Interface.md#load-and-dump-structure) (Scheme). Combinations of (1), (2), and (4) are allowed but not (3) or (5).
meep-1.16.1/doc/docs/FAQ.md-330-
##############################################
meep-1.16.1/doc/docs/FAQ.md-453-
meep-1.16.1/doc/docs/FAQ.md:454:No. Frequency inputs and outputs in Meep are the ordinary frequency $f$, not the angular frequency $\omega=2\pi f$. Similarly, spatial wavevectors $k$ (e.g., for Bloch-periodic boundary conditions) are specified without the $2\pi$ factor, so that the spatial dependence is $\exp(2\pi ikx)$. For example, if you specify a `frequency=0.3` in a source, then the time-dependence of the source is $\exp(-2\pi i0.3t)$, where time $t$ is also in Meep units. Similarly, if you specify `k_point = meep.Vector3(0.4,0,0)` in the interface, then the phase factor between adjacent unit cells with period $L$ in the $x$ direction is $\exp(2\pi i0.4L)$.
meep-1.16.1/doc/docs/FAQ.md-455-
##############################################
meep-1.16.1/doc/docs/FAQ.md-465-
meep-1.16.1/doc/docs/FAQ.md:466:To output the data to an HDF5 file, you can use the [`in_volume`](Python_User_Interface.md#modifying-hdf5-output) or `in_point` routines as part of your [run function](../Python_User_Interface/#run-functions). For example, to restrict the output to a line, you could use: `meep.in_volume(meep.Volume(center=meep.Vector3(0,0,0), size=meep.Vector3(10,0,0)), meep.output_dpwr)` which outputs $\varepsilon|E|^2$ along a line of length 10 in the x direction centered at (0,0,0). You can even wrap this statement in `to_appended("line.h5", ...)` to output the intensity along the line as a function of time to a 2d HDF5 dataset. This would enable you to plot intensity vs. time and space as a 2d color image.
meep-1.16.1/doc/docs/FAQ.md-467-
##############################################
meep-1.16.1/doc/docs/FAQ.md-481-
meep-1.16.1/doc/docs/FAQ.md:482:To model e.g., fiber waveguides with 2d claddings, diffractive binary gratings with arbitrary incident planewaves in 3d, etc. in Cartesian coordinates, you would create a 2d cell in the $xy$ plane and specify a `k_point` with *non-zero* component in $z$. The resulting 3d simulation involves all electromagnetic fields (rather than a 2d simulation which involves a subset of the fields determined by the polarization of the current source). Performance can be improved by specifying `special_kz=True` in the `Simulation` constructor; this results in a 2d simulation with real rather than complex fields (as long as the $x$ and $y$ components of `k_point` are zero).
meep-1.16.1/doc/docs/FAQ.md-483-
##############################################
meep-1.16.1/doc/docs/Guile_and_Scheme_Information.md-83-
meep-1.16.1/doc/docs/Guile_and_Scheme_Information.md:84:``for x in `seq a dx b`; do meep x=$x myfile.ctl; done``
##############################################
meep-1.16.1/doc/docs/Introduction.md-51-
meep-1.16.1/doc/docs/Introduction.md:52:For example, suppose we are describing some photonic structure at [infrared](https://en.wikipedia.org/wiki/Infrared) frequencies, where it is convenient to specify distances in [microns](https://en.wikipedia.org/wiki/Micrometre). Thus, we let $a$ = 1 μm. Then, if we want to specify a source corresponding to λ = 1.55 μm, we specify the frequency *f* as 1/1.55 = 0.6452. If we want to run our simulation for 100 periods, we then run it for 155 time units (= 100/*f*). At a grid resolution ($Δx$) of 10 pixels/μm and [Courant factor](https://en.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E2%80%93Lewy_condition) ($S$) of 0.5, one timestep is 0.05 time units or 166.67 μs ($cΔ t = SΔ x$).
meep-1.16.1/doc/docs/Introduction.md-53-
##############################################
meep-1.16.1/doc/docs/Introduction.md-62-
meep-1.16.1/doc/docs/Introduction.md:63:With ordinary [periodic boundaries](FAQ.md#how-does-k_point-define-the-phase-relation-between-adjacent-unit-cells) in a cell of size $L$, the field components satisfy $f(x+L) = f(x)$. **Bloch periodicity** is a generalization where $f(x+L) = e^{ik_x L} f(x)$ for some *Bloch wavevector* $\mathbf{k}$. This can be used to solve for the modes of waveguides, gratings, and so on, much like in [MPB](https://mpb.readthedocs.io). See Chapter 3 of [Photonic Crystals: Molding the Flow of Light (second edition)](http://ab-initio.mit.edu/book).
meep-1.16.1/doc/docs/Introduction.md-64-
##############################################
meep-1.16.1/doc/docs/Materials.md-33-
meep-1.16.1/doc/docs/Materials.md:34:where $\sigma_D$ is the electric conductivity, $\omega_n$ and $\gamma_n$ are user-specified constants. Actually, the numbers that one specifies are $f_n = \omega_n/2\pi$ and $\gamma_n/2\pi$. The $\sigma_n(\mathbf{x})$ is a user-specified function of position giving the strength of the $n$-th resonance. The $\sigma$ parameters can be anisotropic (real-symmetric) tensors, while the frequency-independent term $\varepsilon_\infty$ can be an arbitrary real-symmetric tensor as well. This corresponds to evolving $\mathbf{P}$ via the equations:
meep-1.16.1/doc/docs/Materials.md-35-
##############################################
meep-1.16.1/doc/docs/Materials.md-59-
meep-1.16.1/doc/docs/Materials.md:60:where $\lambda$ is the vacuum wavelength, each term containing two coefficients ($B_n$ and $C_n$) can be directly transferred to a Lorentzian polarization field using a simple substitution of variables: $\omega_n=1/\sqrt{C_n}$, $\gamma_n=0$, and $\sigma_n=B_n$. Several examples of importing Sellmeier coefficients from published fitting data including [germanium](https://github.com/NanoComp/meep/blob/master/python/materials.py#L884-L901) (Ge) and [gallium nitride](https://github.com/NanoComp/meep/blob/master/python/materials.py#L1162-L1188) (GaN) are provided in the [Materials Library](#materials-library).
meep-1.16.1/doc/docs/Materials.md-61-
##############################################
meep-1.16.1/doc/docs/Materials.md-96-
meep-1.16.1/doc/docs/Materials.md:97:**Note**: the "conductivity" in Meep is slightly different from the conductivity you might find in a textbook, because for computational convenience it appears as $\sigma_D \mathbf{D}$ in our Maxwell equations rather than the more-conventional $\sigma \mathbf{E}$; this just means that our definition is different from the usual electric conductivity by a factor of ε. Also, just as Meep uses the dimensionless relative permittivity for ε, it uses nondimensionalized units of 1/*a* (where *a* is your unit of distance) for the conductivities $\sigma_{D,B}$. If you have the electric conductivity $\sigma$ in SI units and want to convert to $\sigma_D$ in Meep units, you can simply use the formula: $\sigma_D = (a/c) \sigma / \varepsilon_r \varepsilon_0$ where *a* is your unit of distance in meters, *c* is the vacuum speed of light in m/s, $\varepsilon_0$ is the SI vacuum permittivity, and $\varepsilon_r$ is the real relative permittivity.
meep-1.16.1/doc/docs/Materials.md-98-
##############################################
meep-1.16.1/doc/docs/Materials.md-133-
meep-1.16.1/doc/docs/Materials.md:134:where $\Delta N(\mathbf{x},t) = N_{\textrm{upper}} - N_{\textrm{lower}}$ is the inversion of the two atomic energy levels which comprise the $n$th lasing transition, $\omega_n$ is the central frequency of the atomic transition, $\gamma_n$ is the full width half-maximum of the width of the transition, and $\bar{\sigma}_n$ (a tensor) is the coupling strength between the electric field and the nonlinear polarization of the $n$th transition. Note that this polarization equation is only modeling the nonlinear, saturable portion of the polarization. The atomic level population densities, $N_i(\mathbf{x},t)$, each satisfy a rate equation of the form:
meep-1.16.1/doc/docs/Materials.md-135-
##############################################
meep-1.16.1/doc/docs/Mode_Decomposition.md-65-
meep-1.16.1/doc/docs/Mode_Decomposition.md:66:+ `parity` is the parity of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry in the source region. If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `ODD_Z+EVEN_Y`. This is especially useful in 2d simulations to restrict yourself to a desired polarization.
meep-1.16.1/doc/docs/Mode_Decomposition.md-67-
##############################################
meep-1.16.1/doc/docs/Mode_Decomposition.md-71-
meep-1.16.1/doc/docs/Mode_Decomposition.md:72:+ `coeffs` is a user-allocated array of type `std::complex<double>` (shortened hereafter to `cdouble`) of length `2*num_freqs*num_bands` where `num_freqs` is the number of frequencies stored in the `flux` object (equivalent to `flux->Nfreq`) and `num_bands` is the length of the `bands` input array. The expansion coefficients for the mode with frequency `nf` and band index `nb`  are stored sequentially as $\alpha^+$, $\alpha^-$ starting at slot `2*nb*num_freqs+nf` of this array
meep-1.16.1/doc/docs/Mode_Decomposition.md-73-
##############################################
meep-1.16.1/doc/docs/Mode_Decomposition.md-85-
meep-1.16.1/doc/docs/Mode_Decomposition.md:86:+ `kdom_list` is a user allocated array of `meep::vec` objects of length (`num_bands*num_freqs`). If non-null, this array is filled in with the wavevectors of the dominant planewave in the Fourier series expansion for each band from 1 to `num_bands*num_freqs`. `kdom_list[nb*num_freqs + nf]` is the dominant planewave of the mode with frequency `nf` and band index `nb` which defaults to `NULL`.  This is especially useful for interpreting the modes computed in a uniform medium, because those modes are exactly planewaves proportional to $\exp(2\pi i \vec{k}_{dom}\cdot \vec{x})$ where $\vec{k}_{dom}$ (`kdom`) is the wavevector.
meep-1.16.1/doc/docs/Mode_Decomposition.md-87-
##############################################
meep-1.16.1/doc/docs/Mode_Decomposition.md-200-
meep-1.16.1/doc/docs/Mode_Decomposition.md:201:where the (indefinite) inner product between two vectors of the transverse field components, e.g. $\psi=(E_y,E_z,H_y,H_z)$ and $\psi'=(E_y',E_z',H_y',H_z')$ for propagation in the $x$ direction, involves an integration over transverse coordinates:
meep-1.16.1/doc/docs/Mode_Decomposition.md-202-
##############################################
meep-1.16.1/doc/docs/Mode_Decomposition.md-210-
meep-1.16.1/doc/docs/Mode_Decomposition.md:211:where $S$ is a cross-section transverse to the direction of propagation and $\hat{\mathbf{n}}$ is the unit normal vector to $S$ (i.e. $\hat{\mathbf{x}}$ in the case considered above).  The normalization constant $C_{m}$ is a matter of convention, but for MPB-computed modes (which normalizes proportional to unit energy) it is effectively the group velocity of the mode, $v_m$, times the area $A_S$ of the cross-sectional surface $S$: $$C_m = 2 v_m A_S$$   However, we can divide the MPB modes by $\sqrt{\int_S \Re[\mathbf{E}^* \times \mathbf{H}]\cdot \hat{\mathbf{n}}}$ to renormalize them to $C_m = 2$, which is equivalent to normalizing the MPB modes to unit power.
meep-1.16.1/doc/docs/Mode_Decomposition.md-212-
##############################################
meep-1.16.1/doc/docs/Perfectly_Matched_Layer.md-27-
meep-1.16.1/doc/docs/Perfectly_Matched_Layer.md:28:For sources extending into the PML, such as planewaves which must span the entire width of the cell with Bloch-periodic boundary conditions (see e.g. [Tutorial/Basics/Mie Scattering of a Lossless Dielectric Sphere](Python_Tutorials/Basics.md#mie-scattering-of-a-lossless-dielectric-sphere)), the `is_integrated` parameter of the `Source` object must be set to `True` in order to generate planar wavefronts. This is demonstrated in the following example for an $E_z$-polarized planewave propagating in the $x$ direction in a 2d cell surrounded by PML. A side-by-side comparison of the $E_z$ field profile indicates that the wavefronts are not planar for `is_integrated=False` (the default).
meep-1.16.1/doc/docs/Perfectly_Matched_Layer.md-29-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-51-
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md:52:The waveguide is specified by a `Block` (parallelepiped) of size $\infty \times 1 \times \infty$, with $ε=12$, centered at (0,0) which is the center of the cell. By default, any place where there are no objects there is air ($ε=1$), although this can be changed by setting the `default_material` variable. The resulting structure is shown below.
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-53-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-63-
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md:64:We gave the source a frequency of 0.15, and specified a [`ContinuousSource`](../Python_User_Interface.md#continuoussource) which is just a fixed-frequency sinusoid $\exp(-i \omega t)$ that by default is turned on at $t=0$. Recall that, in [Meep units](../Introduction.md#units-in-meep), frequency is specified in units of 2πc, which is equivalent to the inverse of the vacuum wavelength. Thus, 0.15 corresponds to a vacuum wavelength of about 1/0.15=6.67 μm, or a wavelength of about 2 μm in the $\varepsilon=12$ material &mdash; thus, our waveguide is half a wavelength wide, which should hopefully make it single mode. In fact, the cutoff for single-mode behavior in this waveguide is analytically solvable, and corresponds to a frequency of $1/2\sqrt{11}$ or roughly 0.15076. Note also that to specify a $J_z$, we specify a component `Ez` (e.g., if we wanted a magnetic current, we would specify `Hx`, `Hy`, or `Hz`). The current is located at (-7,0), which is 1 μm to the right of the left edge of the cell &mdash; we always want to leave a little space between sources and the cell boundaries, to keep the boundary conditions from interfering with them.
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-65-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-153-
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md:154:There are a couple of items to note. First, a point source does not couple very efficiently to the waveguide mode, so we'll expand this into a line source, centered at (-7,-3.5), with the same width as the waveguide by adding a `size` property to the source. This is shown in green in the figure above. An [eigenmode source](../Python_User_Interface.md#eigenmodesource) can also be used which is described in [Tutorial/Optical Forces](Optical_Forces.md). Second, instead of turning the source on suddenly at $t=0$ which excites many other frequencies because of the discontinuity, we will ramp it on slowly. Meep uses a hyperbolic tangent (tanh) turn-on function over a time proportional to the `width` of 20 time units which is a little over three periods. Finally, just for variety, we'll specify the vacuum wavelength instead of the frequency; again, we'll use a wavelength such that the waveguide is half a wavelength wide.
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-155-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-351-
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md:352:The `stop_when_fields_decayed` routine takes four arguments: `dT`, `component`, `pt`, and `decay_by`. What it does is, after the sources have turned off, it keeps running for an additional `dT` time units every time the given $|component|^2$ at the given point has not decayed by at least `decay_by` from its peak value for all times within the previous `dT`. In this case, `dT=50`, the component is $E_z$, the point is at the center of the flux plane at the end of the waveguide, and `decay_by=0.001`. So, it keeps running for an additional 50 time units until the square amplitude has decayed by 1/1000 from its peak. This should be sufficient to ensure that the Fourier transforms have converged.
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-353-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-429-
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md:430:We turn to a similar but slightly different example for which there exists an analytic solution via the [Fresnel equations](https://en.wikipedia.org/wiki/Fresnel_equations): computing the broadband reflectance spectrum of a planar air-dielectric interface for an incident planewave over a range of angles. Similar to the previous example, we will need to run two simulations: (1) an empty cell with air/vacuum ($n=1$) everywhere to obtain the incident flux, and (2) with the dielectric ($n=3.5$) interface to obtain the reflected flux. For each angle of the incident planewave, a separate simulation is necessary.
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-431-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-535-
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md:536:Two-dimensional plots of the angular reflectance spectrum based on the simulated data and the analytic [Fresnel equations](https://en.wikipedia.org/wiki/Fresnel_equations) are generated using the Python script below. The plots are shown in the accompanying figure with four insets. The top left inset shows the simulated and analytic reflectance spectra at a wavelength of 0.6 μm. The top right inset shows the simulated reflectance spectrum as a function of the source wavelength $\lambda$ and Bloch-periodic wavevector $k_x$: $R(\lambda, k_x)$. The lower left inset is a transformation of $R(\lambda, k_x)$ into $R(\lambda, \theta)$. Note how the range of angles depends on the wavelength. For a particular angle, the reflectance is a constant for all wavelengths due to the dispersionless dielectric. The lower right inset is the analytic reflectance spectrum computed using the Fresnel equations. There is agreement between the simulated and analytic results. The [Brewster's angle](https://en.wikipedia.org/wiki/Brewster%27s_angle), where the transmittance is 1 and the reflectance is 0, is $\tan^{-1}(3.5/1)=74.1^{\circ}$. This is also verified by the simulated results.
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-537-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-883-
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md:884:The script is similar to the previous Mie scattering example with the main difference being the replacement of the `add_flux` with `add_near2far` objects. Instead of a linearly-polarized planewave, the source is circularly-polarized so that $\sigma_{diff}$ is invariant with the rotation angle $\phi$ around the axis of the incident direction (i.e., $x$). This way, the far fields need only be sampled with the polar angle $\theta$. A circularly-polarized planewave can be generated by overlapping two linearly-polarized planewaves ($E_y$ and $E_z$) which are 90° out of phase via specifying `amplitude=1j` for one of the two sources. Note, however, that there is no need to use complex fields (by specifying `force_complex_fields=True` in the `Simulation` object) which would double the floating-point memory consumption since only the real part of the source amplitude is used by default. The circularly-polarized source breaks the mirror symmetry which increases the size of the simulation. The size of the near-field monitor box surrounding the sphere is doubled so that it lies *entirely within* the homogeneous air region (a requirement of the `near2far` feature). After the near fields have been obtained for $\lambda = 1$ μm, the far fields are computed for 100 points along a semi-circle with radius 10,000X that of the dielectric sphere. (Note: any such large radius would give the same $\sigma_{scat}$ to within discretization error.) Finally, the scattered cross section is computed by numerically integrating the expression from above using the radial Poynting flux values.
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-885-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-900-
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md:901:The `dft_flux` routines (`add_flux`) described in the previous examples compute the *total* power in a given region (`FluxRegion`). It is also possible to compute the *local* (i.e., position-dependent) absorbed power density in a dispersive (lossy) material. This quantity is useful for obtaining a spatial map of the photon absorption. The absorbed power density is defined as $$\mathrm{Re}\, \left[ {\mathbf{E}^* \cdot \frac{d\mathbf{P}}{dt}} \right]$$ where $\mathbf{P}$ is the total polarization field. In the Fourier (frequency) domain with time-harmonic fields, this expression is $$\mathrm{Re}\, \left[ {\mathbf{E}^* \cdot (-i \omega \mathbf{P})} \right] = \omega\, \mathrm{Im}\, \left[ {\mathbf{E}^* \cdot \mathbf{P}} \right]$$ where $\mathbf{E}^* \cdot \mathbf{P}$ denotes the dot product of the complex conjugate of $\mathbf{E}$ with $\mathbf{P}$. However, since $\mathbf{D}=\mathbf{E}+\mathbf{P}$, this is equivalent to $$ \omega\, \mathrm{Im}\, \left[ {\mathbf{E}^* \cdot (\mathbf{D}-\mathbf{E})} \right] = \omega\, \mathrm{Im}\, \left[ {\mathbf{E}^* \cdot \mathbf{D}} \right]$$ since $\mathbf{E}^* \cdot \mathbf{E} = |\mathbf{E}|^2$ is purely real. Calculating this quantity involves two steps: (1) compute the Fourier-transformed $\mathbf{E}$ and $\mathbf{D}$ fields in a region via the `dft_fields` feature and (2) in post processing, compute $\omega\, \mathrm{Im}\, \left[ {\mathbf{E}^* \cdot \mathbf{D}} \right]$. This approach only works when the complex permittivity is specified using the [Drude-Lorentzian susceptibility](../Python_User_Interface.md#susceptibility). [Conductivity](../Materials.md#conductivity-and-complex) is not supported.
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-902-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-999-
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md:1000:There is one important item to note: in order to eliminate discretization artifacts when computing the $\mathbf{E}^* \cdot \mathbf{D}$ dot-product, the `add_dft_fields` definition includes `yee_grid=True` which ensures that the $E_z$ and $D_z$ fields are computed on the Yee grid rather than interpolated to the centered grid. As a corollary, we cannot use [`get_array_metadata`](../Python_User_Interface.md#array-metadata) to obtain the coordinates of the `dft_fields` region or its interpolation weights because this involves the centered grid.
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-1001-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-1070-
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md:1071:The signal processing is performed by the `Harminv` routine, which takes four arguments: the field component E<sub>z</sub> and position ($r$+0.1,0) to analyze, and a frequency range given by a center frequency and bandwidth (same as the source pulse). Note that we wrap `Harminv` in `after_sources(...)`, since we only want to analyze the frequencies in the source-free system (the presence of a source will distort the analysis). At the end of the run, `Harminv` prints a series of lines (beginning with `harminv0:`) listing the frequencies it found:
meep-1.16.1/doc/docs/Python_Tutorials/Basics.md-1072-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Custom_Source.md-19-
meep-1.16.1/doc/docs/Python_Tutorials/Custom_Source.md:20:One can take two different approaches to computing the radiated flux based on the type of emitter: (1) random or (2) deterministic. In Method 1 (brute-force Monte Carlo), each emitter is a white-noise dipole: every timestep for every dipole is an independent random number. A single run involves all $N$ dipoles which are modeled using a `CustomSource`. The stochastic results for the radiated flux are averaged over multiple trials/iterations via [Monte Carlo sampling](https://en.wikipedia.org/wiki/Monte_Carlo_method). Method 2 exploits the property of [linear time-invariance](https://en.wikipedia.org/wiki/Linear_time-invariant_system) of the materials/geometry and involves a sequence of $N$ separate runs each with a single deterministic dipole (i.e., pulse time profile, `GaussianSource`) at different positions in the emitting layer. Because dipoles at different positions are uncorrelated, the radiated flux from the ensemble is simply the average of all the individual iterations. The two approaches converge towards identical results, but Method 1 is more computationally expensive than Method 2 due to the much larger number of trials/iterations ($\gg  N$) required to attain low noise variance.   (Even more sophisticated deterministic methods exist to reduce the number of separate simulations, especially at high resolutions; for example, replacing the point-dipole sources with a [rapidly converging set of smooth basis functions](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.81.012119) as demonstrated below, or fancier methods that exploit [trace-estimation methods](http://doi.org/10.1103/PhysRevB.92.134202) and/or transform volumetric sources to [surface sources](http://doi.org/10.1103/PhysRevB.88.054305).)
meep-1.16.1/doc/docs/Python_Tutorials/Custom_Source.md-21-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Custom_Source.md-188-
meep-1.16.1/doc/docs/Python_Tutorials/Custom_Source.md:189:where $c_m = 1$ if $m=0$ and $c_m=2$ otherwise, $L$ is the length of the line source.
meep-1.16.1/doc/docs/Python_Tutorials/Custom_Source.md-190-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Custom_Source.md-304-
meep-1.16.1/doc/docs/Python_Tutorials/Custom_Source.md:305:There are three items to note in this script. (1) The line source spans the entire length of the cell in the $x$ direction (i.e., $L$ is `sx`). (2) The number of point dipoles in Method 2 is `sx*resolution`, one per pixel. (3) The source amplitude function in Method 3 is specified by the `amp_func` property of the [`Source`](../Python_User_Interface.md#source) object. In the case of a Fourier cosine series as conventionally written, $\cos (m\pi x)/L$ is defined over the interval $x=[0,L]$ such that $x=0$ corresponds to the *edge* of the source, not the center. Since the source region in this example is defined in $[-L/2,+L/2]$, the amplitude function must shift its $x$ coordinate argument by $+L/2$ or `0.5*sx`.
meep-1.16.1/doc/docs/Python_Tutorials/Custom_Source.md-306-
meep-1.16.1/doc/docs/Python_Tutorials/Custom_Source.md:307:Method 3 requires a convergence check in which $M$ (`nsrc` in the script) is repeatedly doubled until the change in the results are within a desired tolerance of e.g., < 1%. For this example, $M=15$ was found to be sufficient. Note that because a line source with a cosine amplitude function in *homogeneous* media is analogous to generating a planewave at a discrete angle, at each frequency $\omega$ there exists a cutoff $M$ beyond which there are *no* propagating planewaves. The cutoff $M$ can be computed analytically using the grating equation: $\sqrt{\omega^2n^2 - \left(k_x+\frac{M\pi}{L}\right)^2} = 0$, where $n$ is the refractive index of the source medium and $k_x$ is the Bloch-periodic wavevector in the $x$ direction. In this example, $\omega=2\pi$ (pulse center frequency), $L=1.5$, $k_x=0$, and $n=3.45$ for which the largest propagating $M$ is 10. For $M > 10$ the cosine source produces evanescent *waves in the material*, but these waves scatter into other Fourier components (including propagating waves) once they hit the grating. Thus, the source still produces propagating waves, but the amplitude of the propagating waves (and hence the contribution to the power) decreases exponentially for $M > 10$ as the coupling between the source and the grating decreases. This effect is demonstrated in the figure below which is a semilog plot of the $L_2$ norm of the error in the normalized flux of the cosine source relative to the "correct" result computed using 75 point dipoles (Method 2) as a function of the number of terms in the cosine source. The error decreases exponentially for $M > 10$  until $M=12$, at which point it becomes limited by discretization error (both the point-dipole and cosine-source methods have discretization errors at finite resolution, but are discretized slightly differently); as resolution is increased, this minimum difference will go to zero. Note that this analysis is only applicable to periodic structures where the line source extends the entire width of the cell with periodic boundary conditions. A finite length source in a non-periodic cell has no such cutoff and thus will typically require a large number of cosine terms for convergence.
meep-1.16.1/doc/docs/Python_Tutorials/Custom_Source.md-308-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Custom_Source.md-370-
meep-1.16.1/doc/docs/Python_Tutorials/Custom_Source.md:371:where $c_m = c_n = 1$ if $m=n=0$ and $c_m = c_n = 2$ otherwise, $L_x$ and $L_y$ are the lengths of the planar source in the $x$ and $y$ directions. This requires two nested loops to sum over $m$ and $n$ separately. For example, if $M=N=10$, there are a total of 100 simulations. A 3d emission volume would require the product of 3 cosine series leading to e.g. 1000 simulations if there are 10 different sources in each dimension.
meep-1.16.1/doc/docs/Python_Tutorials/Custom_Source.md-372-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Cylindrical_Coordinates.md-40-
meep-1.16.1/doc/docs/Python_Tutorials/Cylindrical_Coordinates.md:41:The key thing is to set the `dimensions` parameter to `CYLINDRICAL`. This means that all vectors represent ($r$,$\phi$,$z$) coordinates instead of ($x$,$y$,$z$). The computational cell in the $r$ direction is of size `sr = r + w + pad + dpml`, and runs from `0` to `sr` (by default) rather than from `-sr/2` to `sr/2` as it would for any other dimension. Note that the $z$ size is 0 because it is in 2d. The $\phi$ size is also 0, corresponding to the continuous rotational symmetry. A finite $\phi$ size might correspond to discrete rotational symmetry, but this is not currently supported.
meep-1.16.1/doc/docs/Python_Tutorials/Cylindrical_Coordinates.md-42-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Cylindrical_Coordinates.md-88-
meep-1.16.1/doc/docs/Python_Tutorials/Cylindrical_Coordinates.md:89:At the very end, one period of the fields is output to create an animation. A single field output would be a 1d dataset along the $r$ direction, so to make things more interesting `to_appended` is used to append these datasets to a single HDF5 file to obtain an $r \times t$ 2d dataset. Also `in_volume` is used to specify a larger output volume than just the computational cell: in particular, the output is from `-sr` to `sr` in the $r$ direction, where the $-r$ field values are automatically inferred from the reflection symmetry.
meep-1.16.1/doc/docs/Python_Tutorials/Cylindrical_Coordinates.md-90-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Cylindrical_Coordinates.md-132-
meep-1.16.1/doc/docs/Python_Tutorials/Cylindrical_Coordinates.md:133:The problem is twofold. First, there is some signal-processing error in determining $Q$ in the 2d case, as indicated by the "error" column of the `harminv` output which is only 4e-7 for the 2d simulation vs. 6e-11 for the cylindrical case. This error can be reduced by running with a narrower bandwidth source, which excites just one mode and gives a cleaner signal, or by analyzing over a longer time than 200. Doing the former, we find that the 2d value of $Q$ at a resolution of 20 should really be $Q$=343. Second, [PML](../Perfectly_Matched_Layer.md) absorbing layers are really designed to absorb planewaves incident on flat interfaces, but here we have a *cylindrical* PML layer. Because of this, there are larger numerical reflections from the PML in the cylindrical simulation, which we can rectify by pushing the PML out to a larger radius (i.e. using a larger value of `pad`) and/or increasing the PML thickness (increasing `dpml`) so that it turns on more adiabatically. In the cylindrical simulation for `resolution = 20`, if the PML thickness is increased to `dpml = 16`, the $Q$ is 343, which is in much better agreement with the 2d calculation and if the PML thickness is increased to `dpml = 32` the $Q$ is the same 343, so it seems to be converged.
meep-1.16.1/doc/docs/Python_Tutorials/Cylindrical_Coordinates.md-134-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Cylindrical_Coordinates.md-304-
meep-1.16.1/doc/docs/Python_Tutorials/Cylindrical_Coordinates.md:305:There are three things to note. First, there is a built-in function `electric_energy_in_box` which calculates the integral of $\vec{E}\cdot\vec{D}/2 = \varepsilon|E|^2/2$. This is exactly the integral in the denominator, divided by 2. In cylindrical coordinates $(r,\phi,z)$, the integrand is [multiplied](https://en.wikipedia.org/wiki/Cylindrical_coordinate_system#Line_and_volume_elements) by the circumference $2\pi r$, or equivalently the integral is over an annular volume. Second, for the case involving the $H_z$ source, both parallel ($E_{\parallel}=E_{\phi}$) and perpendicular ($\varepsilon E_{\perp}=D_r$) fields are present which must be included in the numerator as separate terms. Field values anywhere in the grid obtained with `get_field_point` are [automatically interpolated](../Introduction.md#the-illusion-of-continuity); i.e., no additional post-processing is necessary. Third, when comparing the perturbation-theory result to the finite-difference approximation, there are *two* convergence parameters: the resolution and $\Delta r$. In principle, to demonstrate agreement with perturbation theory, the limit of the resolution should be taken to infinity and *then* the limit of $\Delta r$ to 0. In practice, this can be obtained by doubling the resolution at a given $\Delta r$ until it is sufficiently converged, then halving $\Delta r$ and repeating.
meep-1.16.1/doc/docs/Python_Tutorials/Cylindrical_Coordinates.md-306-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Cylindrical_Coordinates.md-569-
meep-1.16.1/doc/docs/Python_Tutorials/Cylindrical_Coordinates.md:570:Note that the volume specified in `get_farfields` via `center` and `size` is in cylindrical coordinates. These points must therefore lie in the $\phi = 0$ ($rz = xz$) plane. The fields $E$ and $H$ returned by `get_farfields` can be thought of as either cylindrical ($r$,$\phi$,$z$) or Cartesian ($x$,$y$,$z$) coordinates since these are the same in the $\phi = 0$ plane (i.e., $E_r=E_x$ and $E_\phi=E_y$). Also, `get_farfields` tends to gradually *slow down* as the far-field point gets closer to the near-field monitor. This performance degradation is unavoidable and is due to the larger number of $\phi$ integration points required for accurate convergence of the integral involving the Green's function which diverges as the evaluation point approaches the source point.
meep-1.16.1/doc/docs/Python_Tutorials/Cylindrical_Coordinates.md-571-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Eigenmode_Source.md-198-
meep-1.16.1/doc/docs/Python_Tutorials/Eigenmode_Source.md:199:The eigenmode source can also be used to launch modes in an oblique/rotated waveguide. The results are shown in the two figures below for the single- and multi-mode case. There is one subtlety: for mode **A** in the multi-mode case, the `bnum` parameter is set to 3 rather than 2. This is because a non-zero rotation angle breaks the symmetry in the $y$-direction which therefore precludes the use of `EVEN_Y` in `eig_parity`. Without any parity specified for the $y$-direction, the second band corresponds to *odd* modes. This is why we must select the third band which contains even modes.
meep-1.16.1/doc/docs/Python_Tutorials/Eigenmode_Source.md-200-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Eigenmode_Source.md-212-
meep-1.16.1/doc/docs/Python_Tutorials/Eigenmode_Source.md:213:We can demonstrate that the total power in a waveguide with *arbitrary* orientation — computed using two equivalent methods via `get_fluxes` and [mode decomposition](../Mode_Decomposition.md) — can be computed by a single flux plane oriented along the $y$ direction: thanks to [Poynting's theorem](https://en.wikipedia.org/wiki/Poynting%27s_theorem), the flux through any plane crossing a lossless waveguide is the same, regardless of whether the plane is oriented perpendicular to the waveguide. Furthermore, the eigenmode source is normalized in such a way as to produce the same power regardless of the waveguide orientation — in consequence, the flux values for mode **A** of the single-mode case for rotation angles of 0°, 20°, and 40° are 1111.280794, 1109.565028, and 1108.759159, within 0.2% (discretization error) of one another. Note that the Poynting flux could have been normalized to unity by setting the `EigenModeSource`/`Source` object parameter `amplitude=1/src.fourier_transform(fsrc)` where `fsrc=0.15` and `src=mp.GaussianSource(fsrc,fwidth=0.2*fsrc)`.
meep-1.16.1/doc/docs/Python_Tutorials/Eigenmode_Source.md-214-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Eigenmode_Source.md-229-
meep-1.16.1/doc/docs/Python_Tutorials/Eigenmode_Source.md:230:The eigenmode source can also be used to launch [planewaves](https://en.wikipedia.org/wiki/Plane_wave) in homogeneous media. The dispersion relation for a planewave is $\omega=|\vec{k}|/n$ where $\omega$ is the angular frequency of the planewave and $\vec{k}$ its wavevector; $n$ is the refractive index of the homogeneous medium ($c=1$ in Meep units). This example demonstrates launching planewaves in a uniform medium with $n=1.5$ at three rotation angles: 0°, 20°, and 40°. Bloch-periodic boundaries via the `k_point` are used and specified by the wavevector $\vec{k}$. PML boundaries are used only along the $x$-direction.
meep-1.16.1/doc/docs/Python_Tutorials/Eigenmode_Source.md-231-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Eigenmode_Source.md-282-
meep-1.16.1/doc/docs/Python_Tutorials/Eigenmode_Source.md:283:Note that the line source spans the *entire* length of the cell. (Planewave sources extending into the PML region must include `is_integrated=True`.) This example involves a continuous-wave (CW) time profile. For a pulse profile, the oblique planewave is incident at a given angle for only a *single* frequency component of the source; see [Tutorial/Basics/Angular Reflectance Spectrum of a Planar Interface](../Python_Tutorials/Basics.md#angular-reflectance-spectrum-of-a-planar-interface). This is a fundamental feature of FDTD simulations and not of Meep per se. To simulate an incident planewave at multiple angles for a given frequency $\omega$, you will need to do separate simulations involving different values of $\vec{k}$ (`k_point`) since each set of ($\vec{k}$,ω) specifying the Bloch-periodic boundaries and the frequency of the source will produce a different angle of the planewave. For more details, refer to Section 4.5 ("Efficient Frequency-Angle Coverage") in [Chapter 4](https://arxiv.org/abs/1301.5366) ("Electromagnetic Wave Source Conditions") of [Advances in FDTD Computational Electrodynamics: Photonics and Nanotechnology](https://www.amazon.com/Advances-FDTD-Computational-Electrodynamics-Nanotechnology/dp/1608071707).
meep-1.16.1/doc/docs/Python_Tutorials/Eigenmode_Source.md-284-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/GDSII_Import.md-145-
meep-1.16.1/doc/docs/Python_Tutorials/GDSII_Import.md:146:For a given waveguide separation distance (`d`), the simulation computes the transmittance of Ports 2, 3, and 4. The transmittance is the square of the [S-parameter](https://en.wikipedia.org/wiki/Scattering_parameters) which is equivalent to the [mode coefficient](Mode_Decomposition.md). There is an additional mode monitor at Port 1 to compute the input power from the adjacent eigenmode source; this is used for normalization when computing the transmittance. The eight layers of the GDSII file are each converted to a `Simulation` object: the upper and lower branches of the coupler are defined as a collection of [`Prism`](../Python_User_Interface.md#prism)s, the rectilinear regions of the source and flux monitor as a [`Volume`](../Python_User_Interface.md#volume) and [`FluxRegion`](../Python_User_Interface.md#fluxregion). The size of the cell in the $y$ direction is dependent on `d`. The default dimensionality is 2d. (Note that for a 2d cell the `Prism` objects returned by `get_GDSII_prisms` must have a finite height. The finite height of `Volume` objects returned by `GDSII_vol` are ignored in 2d.) An optional input parameter (`three_d`) converts the geometry to 3d by extruding the coupler geometry in the *z* direction and adding an oxide layer beneath similar to a [silicon on insulator](https://en.wikipedia.org/wiki/Silicon_on_insulator) (SOI) substrate. A schematic of the coupler design in 3d generated using MayaVi is shown below.
meep-1.16.1/doc/docs/Python_Tutorials/GDSII_Import.md-147-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/GDSII_Import.md-333-
meep-1.16.1/doc/docs/Python_Tutorials/GDSII_Import.md:334:Note the absence of `symmetries` even though, in principle, the ring geometry and the two line sources satisfy two mirror symmetry planes through the $x$ (even) and $y$ (odd) axes. This omission is due to the fact that the ring geometry created using gdspy and imported from the GDSII file is actually a [`Prism`](../Python_User_Interface.md#prism) consisting of a discrete number of vertices (rather than two overlapping `Cylinder`s as in [Tutorial/Basics/Modes of a Ring Resonator](../Python_Tutorials/Basics.md#modes-of-a-ring-resonator)). Discretization artifacts of the ring geometry slightly break its mirror symmetry. (Attempting to use `symmetries` in this case yields unpredictable results.)
meep-1.16.1/doc/docs/Python_Tutorials/GDSII_Import.md-335-
meep-1.16.1/doc/docs/Python_Tutorials/GDSII_Import.md:336:For this ring geometry, `Harminv` finds a mode with wavelength `1.5490604` μm and $Q$ of `124691.308`. The $H_z$ field profile is shown below. As expected, due to the large $Q$ the mode is tightly confined to the ring and exhibits little radiative loss.
meep-1.16.1/doc/docs/Python_Tutorials/GDSII_Import.md-337-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Local_Density_of_States.md-14-
meep-1.16.1/doc/docs/Python_Tutorials/Local_Density_of_States.md:15:where $Q^{(n)}=\omega^{(n)}/2\gamma^{(n)}$ is the dimensionless [quality factor](https://en.wikipedia.org/wiki/Q_factor) and $V^{(n)}$ is the modal volume. This represents another way to compute the LDOS. In this tutorial, we will verify this expression by comparing it to the earlier one.
meep-1.16.1/doc/docs/Python_Tutorials/Local_Density_of_States.md-16-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Local_Density_of_States.md-18-
meep-1.16.1/doc/docs/Python_Tutorials/Local_Density_of_States.md:19:We will validate both this prediction and the LDOS calculations above by computing the LDOS at the center of the cavity, the point of peak $|\vec{E}|$, in two ways. First, we compute the LDOS directly from the power radiated by a dipole, Fourier-transforming the result of a pulse using the `dft_ldos` command. Second, we compute the cavity mode and its lifetime $Q$ using `Harminv` and then compute the LDOS by the Purcell formula shown above. The latter technique is much more efficient for high Q (small $w$), since one must run the simulation for a very long time to directly accumulate the Fourier transform of a slowly-decaying mode. The two calculations, we will demonstrate, agree to within discretization error, verifying the LDOS analysis above, and $Q/V$ is asymptotically linear on a semilog scale versus $1/w$ as predicted.
meep-1.16.1/doc/docs/Python_Tutorials/Local_Density_of_States.md-20-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Material_Dispersion.md-161-
meep-1.16.1/doc/docs/Python_Tutorials/Material_Dispersion.md:162:The `run_k_points` function returns a *list of lists* of frequencies &mdash; one list of complex frequencies for each *k* point &mdash; which we store in the `all_freqs` variable. Finally, we want to loop over this list and print out the corresponding ε via the ratio (ck/ω)$^2$ as described above. To do this, we will use Python's `zip` function which combines multiple lists into one:
meep-1.16.1/doc/docs/Python_Tutorials/Material_Dispersion.md-163-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md-17-
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md:18:The structure, which can be viewed as a [two-port network](https://en.wikipedia.org/wiki/Two-port_network), consists of a single-mode waveguide of width 1 μm (`w1`) at a wavelength of 6.67 μm and coupled to a second waveguide of width 2 μm (`w2`) via a linearly-sloped taper of variable length `Lt`. The material is silicon with $\varepsilon=12$. The taper geometry is defined using a single [`Prism`](../Python_User_Interface.md#prism) object with eight vertices. PML absorbing boundaries surround the entire cell. An eigenmode current source with $E_z$ polarization is used to launch the fundamental mode. The dispersion relation (or "band diagram") of the single-mode waveguide is shown in [Tutorial/Eigenmode Source](Eigenmode_Source.md). There is an eigenmode-expansion monitor placed at the midpoint of the first waveguide. This is a line monitor which extends beyond the waveguide in order to span the entire mode profile including its evanescent tails. The Fourier-transformed fields along this line monitor are used to compute the basis coefficients of the harmonic modes. These are computed separately via the eigenmode solver [MPB](https://mpb.readthedocs.io/en/latest/). This is described in [Mode Decomposition](../Mode_Decomposition.md) where it is also shown that the squared magnitude of the mode coefficient is equivalent to the power (Poynting flux) in the given eigenmode. The ratio of the complex mode coefficients can be used to compute the [S parameters](https://en.wikipedia.org/wiki/Scattering_parameters). In this example, we are computing $|S_{11}|^2$ which is the reflectance (shown in the line prefixed by "refl:,"). Another line monitor could have been placed in the second waveguide to compute the transmittance or $|S_{21}|^2$ into the various guided modes (since the second waveguide is multi mode). The scattered power into the radiative modes can then be computed as $1-|S_{11}|^2-|S_{21}|^2$. As usual, a normalization run is required involving a straight waveguide to compute the power in the source.
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md-19-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md-249-
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md:250:Note the use of the keyword parameter argument `eig_parity=mp.ODD_Z+mp.EVEN_Y` in the call to `get_eigenmode_coefficients`. This is important for specifying **non-degenerate** modes in MPB since the `k_point` is (0,0,0). `ODD_Z` is for modes with $E_z$ polarization. `EVEN_Y` is necessary since each diffraction order which is based on a given $k_x$ consists of *two* modes: one going in the $+y$ direction and the other in the $-y$ direction. `EVEN_Y` forces MPB to compute only the $+k_y + -k_y$ (cosine) mode. As a result, the total transmittance must be halved in this case to obtain the transmittance for the individual $+k_y$ or $-k_y$ mode. For `ODD_Y`, MPB will compute the $+k_y - -k_y$ (sine) mode but this will have zero power because the source is even. If the $y$ parity is left out, MPB will return a random superposition of the cosine and sine modes. Alternatively, in this example an input planewave with $H_z$ instead of $E_z$ polarization can be used which requires `eig_parity=mp.EVEN_Z+mp.ODD_Y` as well as an odd mirror symmetry plane in $y$. Finally, note the use of `add_flux` instead of `add_mode_monitor` when using symmetries.
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md-251-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md-278-
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md:279:The diffraction orders/modes are a finite set of propagating planewaves. The wavevector $k_x$ of these modes can be computed analytically: for a frequency of $\omega$ (in $c=1$ units), these propagating modes are the **real** solutions of $\sqrt{(\omega^2 n^2 - (k_y+2\pi m/\Lambda)^2)}$ where $m$ is the diffraction order (an integer), $\Lambda$ is the periodicity of the grating, and $n$ is the refractive index of the propagating medium. In this example, $n=1$, $k_y=0$, and $\Lambda=10$ μm. Thus, at a wavelength of 0.5 μm there are a total of 20 diffraction orders of which we only computed the first 10. The wavevector $k_x$ is used to compute the angle of the diffraction order as $\cos^{-1}(k_x/(\omega n))$. Evanescent modes, those with an imaginary $k_x$, exist for $|m|>20$ but these modes carry no power. Note that currently Meep does not compute the number of propagating modes for you. If the mode number passed to `get_eigenmode_coefficients` is larger than the number of propagating modes at a given frequency/wavelength, MPB's Newton solver will fail to converge and will return zero for the mode coefficient. It is therefore a good idea to know beforehand the number of propagating modes.
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md-280-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md-284-
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md:285:In the limit where the grating periodicity is much larger than the wavelength and the size of the diffracting element (i.e., more than 10 times), as it is in this example, the [diffraction efficiency](https://en.wikipedia.org/wiki/Diffraction_efficiency) can be computed analytically using scalar theory. This is described in the OpenCourseWare [Optics course](https://ocw.mit.edu/courses/mechanical-engineering/2-71-optics-spring-2009/) in the Lecture 16 (Gratings: Amplitude and Phase, Sinusoidal and Binary) [notes](https://ocw.mit.edu/courses/mechanical-engineering/2-71-optics-spring-2009/video-lectures/lecture-16-gratings-amplitude-and-phase-sinusoidal-and-binary/MIT2_71S09_lec16.pdf) and [video](https://www.youtube.com/watch?v=JmWguqCZRxk). For a review of scalar diffraction theory, see Chapter 3 ("Analysis of Two-Dimensional Signals and Systems") of [Introduction to Fourier Optics (fourth edition)](https://www.amazon.com/Introduction-Fourier-Optics-Joseph-Goodman-ebook/dp/B076TBP48F) by J.W. Goodman. From the scalar theory, the diffraction efficiency of the binary grating is $4/(m\pi)^2$ when the phase difference between the propagating distance in the glass relative to the same distance in air is $\pi$. The phase difference/contrast is $(2\pi/\lambda)(n-1)s$ where $\lambda$ is the wavelength, $n$ is the refractive index of the grating, and $s$ is the propagation distance in the grating (`gh` in the script). A special feature of the binary grating is that the diffraction efficiency is 0 for all *even* orders. This is verified by the diffraction spectrum shown above at $\lambda=0.5$ μm. Note the wavelength dependence of the transmittance and, in particular, the slightly *non-zero* diffraction efficiency for the even orders at wavelengths other than 0.5 μm. Since the diffraction efficiency of the ninth order has already fallen to a negligible value (~0.005), computing the spectra of higher-order modes is unnecessary.
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md-286-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md-493-
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md:494:Rather than specify the diffracted planewave in homogeneous media using a band number (which is a property of the eigensolver), we can specify it directly using a `DiffractedPlanewave`. This is the only approach in 3d for specifying *non-degenerate* modes and is particularly useful when the incident planewave is oblique (since in this case the band number does not directly relate to the diffraction order, as demonstrated previously). As diffracted planewaves are generally not mirror symmetric, `DiffractedPlanewave` cannot take advantage of `symmetries` that bisect the monitor plane (which means that it can only be used with `add_mode_monitor` rather than `add_flux`). A `DiffractedPlanewave` object can be passed as the `bands` argument of `get_eigenmode_coefficients` (or the `band_num` argument of `get_eigenmode`) and its constructor has four arguments: (1) a list/tuple of integers for the diffraction order, (2) a `Vector3` for the axis which together with the planewave's wavevector defines the "plane of incidence", and complex amplitudes for the (3) $\mathcal{S}$ and (4) $\mathcal{P}$ polarizations (i.e., electric field perpendicular or parallel to the plane of incidence, respectively). `DiffractedPlanewave` only computes *non-evanescent* propagating modes (i.e., the component of the wavevector in the non-periodic direction is real valued). For evanescent modes, a warning will be displayed and `get_eigenmode_coefficients` will return an empty object.
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md-495-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md-554-
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md:555:There are four items to note regarding the use of `DiffractedPlanewave`: (1) the diffraction order `(0,order,0)` contains non-zero elements for only the $d-1$ periodic directions of the $d$ dimensional cell (which is just the $y$ direction in this example), (2) specifying properties of the eigensolver including `eig_parity`, `eig_resolution`, `eig_tolerance`, and `kpoint_func` as part of the call to `get_eigenmode_coefficients` is not necessary (and is ignored), (3) in 2d, the `axis` is chosen as `Vector3(0,1,0)` (the direction parallel to the source) although *any* vector in the $xy$ plane that is not parallel to the mode's wavevector is also valid, and (4) since the source has $H_z$ polarization (not shown), the $\mathcal{S}$ polarization amplitude is 0 and the $\mathcal{P}$ polarization is 1.
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md-556-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md-749-
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md:750:The main part of the script is the function `pol_grating` which computes the mode coefficients for a grating with thickness `d`, twisted-nematic rotation angle `ph`, and periodicity `gp`. The anisotropic permittivity of the grating is specified using the [material function](../Python_User_Interface.md#medium) `lc_mat` which involves a position-dependent rotation of the diagonal $\varepsilon$ tensor about the $x$-axis. For $\phi = 0^{\circ}$, the nematic director is oriented along the $z$-axis: $E_z$ has a larger permittivity than $E_y$ where the birefringence ($\Delta n$) is 0.159. The grating has a periodicity of $\Lambda = 6.5$ μm in the $y$ direction.
meep-1.16.1/doc/docs/Python_Tutorials/Mode_Decomposition.md-751-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md-92-
meep-1.16.1/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md:93:For the second of two cases, we use the `get_farfield` routine to compute the far fields by looping over a set of 100 equally-spaced points along the circumference of a circle with radius of 1 mm. The six far field components ($E_x$, $E_y$, $E_z$, $H_x$, $H_y$, $H_z$) are stored as separate arrays of complex numbers. From the far fields at each point $\mathbf{r}$, we compute the outgoing or radial flux: $\sqrt{P_x^2+P_y^2}$, where $P_x$ and $P_y$ are the components of the Poynting vector $\mathbf{P}(\mathbf{r})=(P_x,P_y,P_z)=\mathrm{Re}\, \mathbf{E}(\mathbf{r})^*\times\mathbf{H}(\mathbf{r})$. Note that $P_z$ is always 0 since this is a 2d simulation. The total flux is computed and the three flux values are displayed.
meep-1.16.1/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md-94-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md-359-
meep-1.16.1/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md:360:Modeling a finite grating requires specifying the `nperiods` parameter of `add_near2far` which sums `2*nperiods+1` Bloch-periodic copies of the near fields. However, because of the way in which the edges of the structure are handled, this approach is only an approximation for a finite periodic surface. We will verify that the error from this approximation is $\mathcal{O}$(1/`nperiods`) by comparing its result with that of a true finite periodic structure involving multiple periods in a supercell arrangement terminated with a flat surface extending into PML. (There are infinitely many ways to terminate a finite periodic structure, of course, and different choices will have slightly different errors compared to the periodic approximation.)
meep-1.16.1/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md-361-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md-535-
meep-1.16.1/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md:536:We verify that the error in `add_near2far` &mdash; defined as the $L_2$-norm of the difference of the two far-field datasets from the unit- and super-cell calculations normalized by `nperiods` &mdash; is $\mathcal{O}$(1/`nperiods`) by comparing results for three values of `nperiods`: 5, 10, and 20. The error values, which are displayed in the output in the line prefixed by `error:`, are: `0.0001195599054639075`, `5.981324591508146e-05`, and `2.989829913961854e-05`. The pairwise ratios of these errors is nearly 2 as expected (i.e., doubling `nperiods` results in halving the error).
meep-1.16.1/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md-537-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md-539-
meep-1.16.1/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md:540:Finally, we can validate the results for the diffraction spectra of a finite grating via a different approach than computing the far fields: as the (spatial) Fourier transform of the scattered fields. This involves two simulations &mdash; one with the grating and the other with just a flat surface &mdash; and subtracting the Fourier-transformed fields at a given frequency $\omega$ from the two runs to obtain the scattered fields $s(y)$. The Fourier transform of the scattered fields is then computed in post processing: $a(k_y) = \int s(y)\exp(ik_y y)dy$, where $|a(k_y)|^2$ is the amplitude of the corresponding Fourier component. For a grating with periodicity $\Lambda$, we should expect to see peaks in the diffraction spectra at $k_y=2\pi m/\Lambda$ for $m=0, \pm 1, \pm 2, ...$ The total number of diffraction orders is determined by the wavelength as described in [Tutorial/Mode Decomposition/Transmittance Spectra for Planewave at Normal Incidence](Mode_Decomposition.md#transmittance-spectra-for-planewave-at-normal-incidence).
meep-1.16.1/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md-541-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md-690-
meep-1.16.1/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md:691:In 3d, the procedure is very similar, but a little more effort is required to disentangle the two polarizations relative to the plane of incidence [the $(z,\mathbf{k})$ plane for each Fourier component $\mathbf{k}$]. For propagation in the $z$ direction, you would Fourier transform both $E_x$ and $E_y$ of the scattered field as a function of $\mathbf{k}=(k_x, k_y)$. For each $\mathbf{k}$, you decompose the corresponding $\mathbf{E}=(E_x, E_y)$ into the amplitude parallel to $\mathbf{k}$ [which gives the $\mathcal{P}$ polarization amplitude if you multiply by $\sec(\theta)$, where $\sin(\theta)=|\mathbf{k}|/(n\omega/c)$, $n$ is the refractive index of the ambient medium, and $\omega$ is the angular frequency; $\theta$ is the outgoing angle, where $\theta=0$ is normal] and perpendicular to $\mathbf{k}$ [which equals the $\mathcal{S}$ polarization amplitude].  Then square these amplitudes to get something proportional to power as above.  (Note that this analysis is the same even if the incident wave is at an oblique angle, although the **k** locations of the diffraction peaks will change.) Simulating large finite gratings is usually unnecessary since the accuracy improvements are negligible. For example, a 3d simulation of a finite grating with e.g. 100 periods by 100 periods which is computationally expensive would only provide a tiny correction of ~1% (on par with fabrication errors) compared to the infinite structure involving a single unit cell. A finite grating with a small number of periods (e.g., 5 or 10) exhibits weak diffractive effects and is therefore not considered a diffractive grating.
meep-1.16.1/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md-692-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md-726-
meep-1.16.1/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md:727:We are creating a "near" bounding surface, consisting of three separate regions surrounding the cavity, that captures *all* outgoing waves in the top-half of the cell. Note that the $x$-normal surface on the left has a `weight` of -1 corresponding to the direction of the *outward normal* vector relative to the $x$ direction so that the far-field spectra is correctly computed from the outgoing fields, similar to the flux and force features. The parameter `d1` is the distance between the edge of the waveguide and the bounding surface, as shown in the schematic above, and we will demonstrate that changing this parameter does not change the far-field spectra which we compute at a single frequency corresponding to the cavity mode.
meep-1.16.1/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md-728-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Optical_Forces.md-14-
meep-1.16.1/doc/docs/Python_Tutorials/Optical_Forces.md:15:where $\omega$ is the mode frequency of the coupled waveguide system, $s$ is the separation distance between the parallel waveguides, $k$ is the conserved wave vector, and $U$ is the total energy of the electromagnetic fields. By convention, negative and positive values correspond to attractive and repulsive forces, respectively. For more details, see [Optics Letters, Vol. 30, pp. 3042-4, 2005](https://www.osapublishing.org/ol/abstract.cfm?uri=ol-30-22-3042). This expression has been shown to be mathematically equivalent to the Maxwell stress tensor in [Optics Express, Vol. 17, pp. 18116-35, 2009](http://www.opticsinfobase.org/oe/abstract.cfm?URI=oe-17-20-18116). We will verify this result in this tutorial. In this particular example, only the fundamental mode with odd mirror-symmetry in $y$ shows the bidirectional force.
meep-1.16.1/doc/docs/Python_Tutorials/Optical_Forces.md-16-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Optical_Forces.md-22-
meep-1.16.1/doc/docs/Python_Tutorials/Optical_Forces.md:23:The main component of the Meep script is the function `parallel_waveguide` which computes the force $F$ and transmitted power $P$ given the waveguide separation distance `s` and relative phase of the waveguide modes `xodd=True/False`. The eigenmode frequency $\omega$ is computed first using `get_eigenmode` in order to specify the frequency of the `add_force` and `add_flux` monitors. (Note that when `match_frequency=False`, `get_eigenmode` ignores the input `frequency` parameter.) An [`EigenModeSource`](../Python_User_Interface.md#eigenmodesource) with `eig_match_freq=False` is then used to launch the guided mode using a pulse (the `frequency` but not the `fwidth` parameter of `GaussianSource` is ignored). Alternatively, a constant-amplitude point/area source can be used to launch the mode but this is less efficient as demonstrated in [Tutorial/Eigenmode Source/Index-Guided Modes in a Ridge Waveguide](Eigenmode_Source.md#index-guided-modes-in-a-ridge-waveguide). The waveguide has width/height of $a=1$ μm and a fixed propagation wavevector of $\pi/a$.
meep-1.16.1/doc/docs/Python_Tutorials/Optical_Forces.md-24-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Optical_Forces.md-103-
meep-1.16.1/doc/docs/Python_Tutorials/Optical_Forces.md:104:There are four important items to note: (1) a single flux surface is used to compute the Poynting flux in $z$ which spans the entire non-PML region of the cell. This is because in the limit of small waveguide separation distance, two separate flux surfaces for each waveguide would overlap and result in overcounting. The total power through a single flux surface need, by symmetry, only be halved in order to determine the value for a single waveguide. (2) Instead of defining a closed, four-sided "box" surrounding the waveguides, the Maxwell stress tensor is computed using just two line monitors oriented in $y$ (to obtain the force in the perpendicular $x$ direction) with `weight` values of `+1`/`-1` to correctly sum the total force. The force monitors are placed in the vacuum region adjacent to the waveguide rather than on its surface so that the fields are [second-order accurate](../Subpixel_Smoothing.md). By symmetry, the force in the $y$ direction is zero and need not be computed. (3) Since the `parity`/`eig_parity` parameter of `get_eigenmode`/`EigenModeSource` can only be specified using the $y$ and/or $z$ directions (but *not* $x$, the waveguide separation axis), the `band`/`eig_band` parameter must be set to `1`/`2` to distinguish modes with even/odd $x$-mirror symmetry.  (4) A 2d `cell_size` in $xy$ combined with a `k_point` containing a non-zero $z$ component results in a [2d simulation (which is the default)](../2d_Cell_Special_kz.md).
meep-1.16.1/doc/docs/Python_Tutorials/Optical_Forces.md-105-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Optical_Forces.md-136-
meep-1.16.1/doc/docs/Python_Tutorials/Optical_Forces.md:137:The MPB simulation is in [examples/parallel-wvgs-mpb.py](https://github.com/NanoComp/meep/blob/master/python/examples/parallel-wvgs-mpb.py). There are important differences related to the coordinate dimensions between the MPB and Meep scripts. In the MPB script, the 2d cell is defined using the $yz$ plane, the waveguide propagation axis is $x$, and the waveguide separation axis is $y$. As a consequence, the `num_bands` parameter is always `1` since the $y$ parity of the mode can be defined explicitly (i.e., `run_yodd_zodd` vs. `run_yeven_zodd`). This is different from the Meep script since Meep requires that a 2d cell be defined in the $xy$ plane. MPB has no such requirement.
meep-1.16.1/doc/docs/Python_Tutorials/Optical_Forces.md-138-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-88-
meep-1.16.1/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:89:The source will now be the usual Gaussian pulse centered at `fcen`, located at one edge of the cell just outside the PML, at `x = - 0.5 * sx + dpml`. Ideally, we would excite exactly the fundamental mode of the waveguide, but it is good enough to just excite it with a line source. Moreover, since we are interested in the $P$ polarization (electric field in the plane), we will excite it with a $J_y$ current source (transverse to the propagation direction), which is specified as `Ey`:
meep-1.16.1/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-90-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-277-
meep-1.16.1/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:278:The results, shown above, are exactly what we expected: at first, an exponential increase of $Q$ with `N`, and then a saturation at $Q_r \approx 8750$. However, when we look at the Harminv output for larger `N`, something strange happens &mdash; it starts to find *more modes*! For example, at `N=16`, the output is:
meep-1.16.1/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-279-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-306-
meep-1.16.1/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:307:Let us briefly review the problem. In a periodic system of this sort, the eigen-solutions can be expressed in the form of *Bloch modes*: a periodic *Bloch envelope* multiplied by a planewave $\exp[i(\mathbf{k}\cdot\mathbf{x}-ω t)]$, where **k** is the *Bloch wavevector*. We wish to find the *bands* $ω(\mathbf{k})$. In this case, there is only *one* direction of periodicity, so we only have one wavevector component $k_x$. Moreover, the solutions are periodic functions of this wavevector: for a unit-period structure, $k_x$ and $k_x+2\pi$ are redundant. Also, $k_x$ and $-k_x$ are redundant by time-reversal symmetry, so we only need to look for solutions in the *irreducible Brillouin zone* from $k_x=0$ to $k_x=\pi$.
meep-1.16.1/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-308-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-374-
meep-1.16.1/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:375:Here, we have used Meep's built-in `interpolate` function to interpolate a set of 19 $\mathbf{k}$ points between $\mathbf{k} = 0$ and $\mathbf{k} = 0.5 \cdot 2π \hat{\mathbf{x}}$, to cover the irreducible Brillouin zone. This function automatically runs Harminv, using the frequency range and location taken from the Gaussian source in the `sources` list. It also calls `output_epsilon`. The output is not only the usual `harminv:` lines, but it also outputs a series of lines like:
meep-1.16.1/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-376-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md-6-
meep-1.16.1/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md:7:Since this is a 1d calculation, we could implement it via a 2d cell of `Vector3(S,0,0)`, specifying periodic boundary conditions in the $y$ direction. However, this is slightly inefficient since the $y$ periodic boundaries are implemented internally via extra "ghost pixels" in the $y$ direction. Instead, Meep has special support for 1d simulations in the $z$ direction. To use this, we must explicitly set `dimensions` to `1`, and in that case we can *only* use $E_x$ (and $D_x$) and $H_y$ field components. This involves no loss of generality because of the symmetry of the problem.
meep-1.16.1/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md-8-
##############################################
meep-1.16.1/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md-98-
meep-1.16.1/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md:99:We could print these with more `display_fluxes` lines, but it is nice to print these on a single line along with χ$^{(3)}$ and the amplitude, so that we can eventually put them all into one table in our plotting program. To do this, we'll use the lower-level function `get_fluxes(trans1)`, which returns a list of the flux values, and take the first element of the list since there is only one:
meep-1.16.1/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md-100-
##############################################
meep-1.16.1/doc/docs/Python_User_Interface.md-1300-
meep-1.16.1/doc/docs/Python_User_Interface.md:1301:The flux object should be created using `add_mode_monitor`.  (You could also use `add_flux`, but with `add_flux` you need to be more careful about symmetries that bisect the flux plane: the `add_flux` object should only be used with `get_eigenmode_coefficients` for modes of the same symmetry, e.g. constrained via `eig_parity`.  On the other hand, the performance of `add_flux` planes benefits more from symmetry.) `eig_vol` is the volume passed to [MPB](https://mpb.readthedocs.io) for the eigenmode calculation (based on interpolating the discretized materials from the Yee grid); in most cases this will simply be the volume over which the frequency-domain fields are tabulated, which is the default (i.e. `flux.where`). `eig_parity` should be one of [`mp.NO_PARITY` (default), `mp.EVEN_Z`, `mp.ODD_Z`, `mp.EVEN_Y`, `mp.ODD_Y`]. It is the parity (= polarization in 2d) of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry *in the source region*, just as for `EigenModeSource` above. If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `EVEN_Z+ODD_Y`. Default is `NO_PARITY`, in which case MPB computes all of the bands which will still be even or odd if the structure has mirror symmetry, of course. This is especially useful in 2d simulations to restrict yourself to a desired polarization. `eig_resolution` is the spatial resolution to use in MPB for the eigenmode calculations. This defaults to twice the Meep `resolution` in which case the structure is linearly interpolated from the Meep pixels. `eig_tolerance` is the tolerance to use in the MPB eigensolver. MPB terminates when the eigenvalues stop changing to less than this fractional tolerance. Defaults to `1e-12`.  (Note that this is the tolerance for the frequency eigenvalue ω; the tolerance for the mode profile is effectively the square root of this.) For examples, see [Tutorial/Mode Decomposition](Python_Tutorials/Mode_Decomposition.md).
meep-1.16.1/doc/docs/Python_User_Interface.md-1302-
##############################################
meep-1.16.1/doc/docs/Python_User_Interface.md-1418-
meep-1.16.1/doc/docs/Python_User_Interface.md:1419:+ **`axis` [ `Vector3` ]** — The plane of incidence for each planewave (used to define the $\mathcal{S}$ and $\mathcal{P}$ polarizations below) is defined to be the plane that contains the `axis` vector and the planewave's wavevector. If `None`, `axis` defaults to the first direction that lies in the plane of the monitor or source (e.g., $y$ direction for a $yz$ plane in 3d, either $x$ or $y$ in 2d).
meep-1.16.1/doc/docs/Python_User_Interface.md-1420-
##############################################
meep-1.16.1/doc/docs/Python_User_Interface.md-1658-
meep-1.16.1/doc/docs/Python_User_Interface.md:1659:Most commonly, you will want to **normalize** the force spectrum in some way, just as for flux spectra. Most simply, you could divide two different force spectra to compute the ratio of forces on two objects. Often, you will divide a force spectrum by a flux spectrum, to divide the force $F$ by the incident power $P$ on an object, in order to compute the useful dimensionless ratio $Fc$/$P$ where $c=1$ in Meep units. For example, it is a simple exercise to show that the force $F$ on a perfectly reflecting mirror with normal-incident power $P$ satisfies $Fc$/$P=2$, and for a perfectly absorbing (black) surface $Fc$/$P=1$.
meep-1.16.1/doc/docs/Python_User_Interface.md-1660-
##############################################
meep-1.16.1/doc/docs/Python_User_Interface.md-2844-dielectric-function `.h5` file which must have been previously output by
meep-1.16.1/doc/docs/Python_User_Interface.md:2845:`output_epsilon`. To make this easier, a built-in shell variable `$EPS` is provided
meep-1.16.1/doc/docs/Python_User_Interface.md-2846-which refers to the last-output dielectric-function `.h5` file. So, for example
meep-1.16.1/doc/docs/Python_User_Interface.md:2847:`output_png(mp.Ez,"-C $EPS")` will output the $E_z$ field and overlay the dielectric
meep-1.16.1/doc/docs/Python_User_Interface.md-2848-contours.
##############################################
meep-1.16.1/doc/docs/Python_User_Interface.md-5481-
meep-1.16.1/doc/docs/Python_User_Interface.md:5482:**`Rotate2`** — A 180° (twofold) rotational symmetry (a.k.a. $C_2$). `direction` is
meep-1.16.1/doc/docs/Python_User_Interface.md-5483-the axis of the rotation.
meep-1.16.1/doc/docs/Python_User_Interface.md-5484-
meep-1.16.1/doc/docs/Python_User_Interface.md:5485:**`Rotate4`** — A 90° (fourfold) rotational symmetry (a.k.a. $C_4$). `direction` is
meep-1.16.1/doc/docs/Python_User_Interface.md-5486-the axis of the rotation.
##############################################
meep-1.16.1/doc/docs/Python_User_Interface.md-6044-
meep-1.16.1/doc/docs/Python_User_Interface.md:6045:This is a subclass of `Source` and has **all of the properties** of `Source` above. However, the `component` parameter of the `Source` object is ignored. The [Gaussian beam](https://en.wikipedia.org/wiki/Gaussian_beam) is a transverse electromagnetic mode for which the source region must be a *line* (in 2d) or *plane* (in 3d). For a beam polarized in the $x$ direction with propagation along $+z$, the electric field is defined by $\mathbf{E}(r,z)=E_0\hat{x}\frac{w_0}{w(z)}\exp\left(\frac{-r^2}{w(z)^2}\right)\exp\left(-i\left(kz + k\frac{r^2}{2R(z)}\right)\right)$ where $r$ is the radial distance from the center axis of the beam, $z$ is the axial distance from the beam's focus (or "waist"), $k=2\pi n/\lambda$ is the wavenumber (for a free-space wavelength $\lambda$ and refractive index $n$ of the homogeneous, lossless medium in which the beam propagates), $E_0$ is the electric field amplitude at the origin, $w(z)$ is the radius at which the field amplitude decays by $1/e$ of its axial values, $w_0$ is the beam waist radius, and $R(z)$ is the radius of curvature of the beam's wavefront at $z$. The only independent parameters that need to be specified are $w_0$, $E_0$, $k$, and the location of the beam focus (i.e., the origin: $r=z=0$).
meep-1.16.1/doc/docs/Python_User_Interface.md-6046-
##############################################
meep-1.16.1/doc/docs/Python_User_Interface.md-6238-  where $G(t)$ is the current (not the dipole moment). In this formula, $\Delta f$
meep-1.16.1/doc/docs/Python_User_Interface.md:6239:  is the `fwidth` of the source, $\omega_0$ is $2\pi$ times its `frequency,` and
meep-1.16.1/doc/docs/Python_User_Interface.md-6240-  $t_0$ is the peak time discussed above. Note that this does not include any
##############################################
meep-1.16.1/doc/docs/Python_User_Interface.md-7656-dielectric-function `.h5` file which must have been previously output by
meep-1.16.1/doc/docs/Python_User_Interface.md:7657:`output_epsilon`. To make this easier, a built-in shell variable `$EPS` is provided
meep-1.16.1/doc/docs/Python_User_Interface.md-7658-which refers to the last-output dielectric-function `.h5` file. So, for example
meep-1.16.1/doc/docs/Python_User_Interface.md:7659:`output_png(mp.Ez,"-C $EPS")` will output the $E_z$ field and overlay the dielectric
meep-1.16.1/doc/docs/Python_User_Interface.md-7660-contours.
##############################################
meep-1.16.1/doc/docs/Python_User_Interface.md.in-176-
meep-1.16.1/doc/docs/Python_User_Interface.md.in:177:The flux object should be created using `add_mode_monitor`.  (You could also use `add_flux`, but with `add_flux` you need to be more careful about symmetries that bisect the flux plane: the `add_flux` object should only be used with `get_eigenmode_coefficients` for modes of the same symmetry, e.g. constrained via `eig_parity`.  On the other hand, the performance of `add_flux` planes benefits more from symmetry.) `eig_vol` is the volume passed to [MPB](https://mpb.readthedocs.io) for the eigenmode calculation (based on interpolating the discretized materials from the Yee grid); in most cases this will simply be the volume over which the frequency-domain fields are tabulated, which is the default (i.e. `flux.where`). `eig_parity` should be one of [`mp.NO_PARITY` (default), `mp.EVEN_Z`, `mp.ODD_Z`, `mp.EVEN_Y`, `mp.ODD_Y`]. It is the parity (= polarization in 2d) of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry *in the source region*, just as for `EigenModeSource` above. If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `EVEN_Z+ODD_Y`. Default is `NO_PARITY`, in which case MPB computes all of the bands which will still be even or odd if the structure has mirror symmetry, of course. This is especially useful in 2d simulations to restrict yourself to a desired polarization. `eig_resolution` is the spatial resolution to use in MPB for the eigenmode calculations. This defaults to twice the Meep `resolution` in which case the structure is linearly interpolated from the Meep pixels. `eig_tolerance` is the tolerance to use in the MPB eigensolver. MPB terminates when the eigenvalues stop changing to less than this fractional tolerance. Defaults to `1e-12`.  (Note that this is the tolerance for the frequency eigenvalue ω; the tolerance for the mode profile is effectively the square root of this.) For examples, see [Tutorial/Mode Decomposition](Python_Tutorials/Mode_Decomposition.md).
meep-1.16.1/doc/docs/Python_User_Interface.md.in-178-
##############################################
meep-1.16.1/doc/docs/Python_User_Interface.md.in-243-
meep-1.16.1/doc/docs/Python_User_Interface.md.in:244:Most commonly, you will want to **normalize** the force spectrum in some way, just as for flux spectra. Most simply, you could divide two different force spectra to compute the ratio of forces on two objects. Often, you will divide a force spectrum by a flux spectrum, to divide the force $F$ by the incident power $P$ on an object, in order to compute the useful dimensionless ratio $Fc$/$P$ where $c=1$ in Meep units. For example, it is a simple exercise to show that the force $F$ on a perfectly reflecting mirror with normal-incident power $P$ satisfies $Fc$/$P=2$, and for a perfectly absorbing (black) surface $Fc$/$P=1$.
meep-1.16.1/doc/docs/Python_User_Interface.md.in-245-
##############################################
meep-1.16.1/doc/docs/Replacements.vim-22-:%s/\\)/$/g
meep-1.16.1/doc/docs/Replacements.vim:23::%s/^`\(.*\)`$/```\r\1\r```\r/g
meep-1.16.1/doc/docs/Replacements.vim-24-:%s/```\n\n```\n//g
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Basics.md-72-
meep-1.16.1/doc/docs/Scheme_Tutorials/Basics.md:73:We gave the source a frequency of 0.15, and specified a `continuous-src` which is just a fixed-frequency sinusoid $\exp(-i \omega t)$ that by default is turned on at $t$=0. Recall that, in [Meep units](../Introduction.md#units-in-meep), frequency is specified in units of 2πc, which is equivalent to the inverse of the vacuum wavelength. Thus, 0.15 corresponds to a vacuum wavelength of about 1/0.15=6.67 μm, or a wavelength of about 2 μm in the ε=12 material &mdash; thus, our waveguide is half a wavelength wide, which should hopefully make it single mode. In fact, the cutoff for single-mode behavior in this waveguide is analytically solvable, and corresponds to a frequency of 1/2√11 or roughly 0.15076. Note also that to specify a J<sub>z</sub>, we specify a component $Ez$ (e.g. if we wanted a magnetic current, we would specify `Hx`, `Hy`, or `Hz`). The current is located at (-7,0), which is 1 μm to the right of the left edge of the cell &mdash; we always want to leave a little space between sources and the cell boundaries, to keep the boundary conditions from interfering with them.
meep-1.16.1/doc/docs/Scheme_Tutorials/Basics.md-74-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Basics.md-170-
meep-1.16.1/doc/docs/Scheme_Tutorials/Basics.md:171:That is, the file contains a single dataset `ez` that is a 160$\times$160$\times$333 array, where the last dimension is time. This is rather a large file, 66MB; later, we'll see ways to reduce this size if we only want images. We have a number of choices of how to output the fields. To output a single time slice, we can use the same `h5topng` command as before, but with an additional `-t` option to specify the time index: e.g. `h5topng -t 332` will output the last time slice, similar to before. Instead, let's create an animation of the fields as a function of time. First, we have to create images for *all* of the time slices:
meep-1.16.1/doc/docs/Scheme_Tutorials/Basics.md-172-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Basics.md-827-
meep-1.16.1/doc/docs/Scheme_Tutorials/Basics.md:828:The script is similar to the previous Mie scattering example with the main difference being the replacement of the `add-flux` with `add-near2far` objects. Instead of a linearly-polarized planewave, the source is circularly-polarized so that $\sigma_{diff}$ is invariant with the rotation angle $\phi$ around the axis of the incident direction (i.e., $x$). This way, the far fields need only be sampled with the polar angle $\theta$. A circularly-polarized planewave can be generated by overlapping two linearly-polarized planewaves ($E_y$ and $E_z$) which are 90° out of phase via specifying an `amplitude` of `0+1i` for one of the two sources. Note, however, that there is no need to use complex fields (by specifying `(set! force-complex-fields true)`) which would double the floating-point memory consumption since only the real part of the source amplitude is used by default. The circularly-polarized source breaks the mirror symmetry which increases the size of the simulation. The size of the near-field monitor box surrounding the sphere is doubled so that it lies *entirely within* the homogeneous air region (a requirement of the `near2far` feature). After the near fields have been obtained for λ = 1 μm, the far fields are computed for 100 points along a semi-circle with radius 10,000X that of the dielectric sphere. (Note: any such large radius would give the same $\sigma_{scat}$ to within discretization error.) Finally, the scattered cross section is computed by numerically integrating the expression from above using the radial Poynting flux values.
meep-1.16.1/doc/docs/Scheme_Tutorials/Basics.md-829-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Basics.md-888-
meep-1.16.1/doc/docs/Scheme_Tutorials/Basics.md:889:The `dft-flux` routines (`add-flux`) described in the previous examples compute the *total* power in a given region (`flux-region`). It is also possible to compute the *local* (i.e., position-dependent) absorbed power density in a dispersive (lossy) material. This quantity is useful for obtaining a spatial map of the photon absorption. The absorbed power density is defined as $$\mathrm{Re}\, \left[ {\mathbf{E}^* \cdot \frac{d\mathbf{P}}{dt}} \right]$$ where $\mathbf{P}$ is the total polarization field. In the Fourier (frequency) domain with time-harmonic fields, this expression is $$\mathrm{Re}\, \left[ {\mathbf{E}^* \cdot (-i \omega \mathbf{P})} \right] = \omega\, \mathrm{Im}\, \left[ {\mathbf{E}^* \cdot \mathbf{P}} \right]$$ where $\mathbf{E}^* \cdot \mathbf{P}$ denotes the dot product of the complex conjugate of $\mathbf{E}$ with $\mathbf{P}$. However, since $\mathbf{D}=\mathbf{E}+\mathbf{P}$, this is equivalent to $$ \omega\, \mathrm{Im}\, \left[ {\mathbf{E}^* \cdot (\mathbf{D}-\mathbf{E})} \right] = \omega\, \mathrm{Im}\, \left[ {\mathbf{E}^* \cdot \mathbf{D}} \right]$$ since $\mathbf{E}^* \cdot \mathbf{E} = |\mathbf{E}|^2$ is purely real. Calculating this quantity involves two steps: (1) compute the Fourier-transformed $\mathbf{E}$ and $\mathbf{D}$ fields in a region via the `dft-fields` feature and (2) in post processing, compute $\omega\, \mathrm{Im}\, \left[ {\mathbf{E}^* \cdot \mathbf{D}} \right]$. This approach only works when the complex permittivity is specified using the [Drude-Lorentzian susceptibility](../Scheme_User_Interface.md#susceptibility). [Conductivity](../Materials.md#conductivity-and-complex) is not supported.
meep-1.16.1/doc/docs/Scheme_Tutorials/Basics.md-890-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Basics.md-941-
meep-1.16.1/doc/docs/Scheme_Tutorials/Basics.md:942:There is one important item to note: in order to eliminate discretization artifacts when computing the $\mathbf{E}^* \cdot \mathbf{D}$ dot-product, the `add-dft-fields` definition includes `#:yee-grid true` which ensures that the $E_z$ and $D_z$ fields are computed on the Yee grid rather than interpolated to the centered grid. The DFT fields are output to an HDF5 file (`dft-fields-cylinder.h5`) at the end of the simulation.
meep-1.16.1/doc/docs/Scheme_Tutorials/Basics.md-943-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Basics.md-1042-
meep-1.16.1/doc/docs/Scheme_Tutorials/Basics.md:1043:The signal processing is performed by the `harminv` function, which takes four arguments: the field component E<sub>z</sub> and position ($r$+0.1,0) to analyze, and a frequency range given by a center frequency and bandwidth (same as the source pulse). Note that we wrap `harminv` in `(after-sources ...)`, since we only want to analyze the frequencies in the source-free system (the presence of a source will distort the analysis). At the end of the run, `harminv` prints a series of lines (beginning with `harminv0:`, to make it easy to `grep` for) listing the frequencies it found:
meep-1.16.1/doc/docs/Scheme_Tutorials/Basics.md-1044-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Casimir_Forces.md-143-
meep-1.16.1/doc/docs/Scheme_Tutorials/Casimir_Forces.md:144:where $c_n = 1$ if $n=0$ and $c_n=2$ otherwise, $L$ is the side length (if each side has a different length, then the functions $f_n(x)$ will differ for each side). An illustration of these functions for the system under consideration, compared to point sources, is shown below:
meep-1.16.1/doc/docs/Scheme_Tutorials/Casimir_Forces.md-145-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Casimir_Forces.md-446-
meep-1.16.1/doc/docs/Scheme_Tutorials/Casimir_Forces.md:447:This new function $g(t)$ is computed in the function `make-casimir-g-kz`; use this value of $g(t)$ in `casimir-force-contrib`:
meep-1.16.1/doc/docs/Scheme_Tutorials/Casimir_Forces.md-448-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Casimir_Forces.md-479-
meep-1.16.1/doc/docs/Scheme_Tutorials/Casimir_Forces.md:480:In cylindrical coordinates, all source surfaces and objects have size `no-size` in the $phi$-direction. Also, the source index passed to `casimir-force-contrib` is given by:
meep-1.16.1/doc/docs/Scheme_Tutorials/Casimir_Forces.md-481-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Casimir_Forces.md-516-
meep-1.16.1/doc/docs/Scheme_Tutorials/Casimir_Forces.md:517:The arguments are similar to `casimir-force-contrib`, except that now we pass in the Bloch vector (which will be set inside of the function), and instead of a side index we simply pass in $S$, which is only one side of the source surface. As the program cannot detect the orientation of the surface if there is only one side, we have to explicitly multiply by the normal vector (given by `curr-side`). Otherwise, the computation proceeds as in the above cases, with the integration over $k_x$ and $k_y$ done outside of the program.
meep-1.16.1/doc/docs/Scheme_Tutorials/Casimir_Forces.md-518-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Custom_Source.md-19-
meep-1.16.1/doc/docs/Scheme_Tutorials/Custom_Source.md:20:One can take two different approaches to computing the radiated flux based on the type of emitter: (1) random or (2) deterministic. In Method 1 (brute-force Monte Carlo), each emitter is a white-noise dipole: every timestep for every dipole is an independent random number. A single run involves all $N$ dipoles which are modeled using a `custom-src`. The stochastic results for the radiated flux are averaged over multiple trials/iterations via [Monte Carlo sampling](https://en.wikipedia.org/wiki/Monte_Carlo_method). Method 2 exploits the property of [linear time-invariance](https://en.wikipedia.org/wiki/Linear_time-invariant_system) of the materials/geometry and involves a sequence of $N$ separate runs each with a single deterministic dipole (i.e., pulse time profile, `gaussian-src`) at different positions in the emitting layer. Because dipoles at different positions are uncorrelated, the radiated flux from the ensemble is simply the average of all the individual iterations. The two approaches converge towards identical results, but Method 1 is more computationally expensive than Method 2 due to the much larger number of trials/iterations ($\gg  N$) required to attain low noise variance.   (Even more sophisticated deterministic methods exist to reduce the number of separate simulations, especially at high resolutions; for example, replacing the point-dipole sources with a [rapidly converging set of smooth basis functions](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.81.012119), or fancier methods that exploit [trace-estimation methods](http://doi.org/10.1103/PhysRevB.92.134202) and/or transform volumetric sources to [surface sources](http://doi.org/10.1103/PhysRevB.88.054305).)
meep-1.16.1/doc/docs/Scheme_Tutorials/Custom_Source.md-21-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Cylindrical_Coordinates.md-31-
meep-1.16.1/doc/docs/Scheme_Tutorials/Cylindrical_Coordinates.md:32:The key thing is to set the `dimensions` parameter to `CYLINDRICAL`. This means that all vectors represent ($r$,$\phi$,$z$) coordinates instead of ($x$,$y$,$z$). The computational cell in the $r$ direction is of size `sr = r + w + pad + dpml`, and runs from `0` to `sr` (by default) rather than from `-sr/2` to `sr/2` as it would for any other dimension. Note that the $z$ size is `no-size` because it is in 2d. The $\phi$ size is also `no-size`, corresponding to the continuous rotational symmetry. A finite $\phi$ size might correspond to discrete rotational symmetry, but this is not currently supported.
meep-1.16.1/doc/docs/Scheme_Tutorials/Cylindrical_Coordinates.md-33-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Cylindrical_Coordinates.md-71-
meep-1.16.1/doc/docs/Scheme_Tutorials/Cylindrical_Coordinates.md:72:At the very end, one period of the fields is output to create an animation. A single field output would be a 1d dataset along the $r$ direction, so to make things more interesting `to-appended` is used to append these datasets to a single HDF5 file to obtain an $r \times t$ 2d dataset. Also `in-volume` is used to specify a larger output volume than just the computational cell: in particular, the output is from `-sr` to `sr` in the $r$ direction, where the $-r$ field values are automatically inferred from the reflection symmetry.
meep-1.16.1/doc/docs/Scheme_Tutorials/Cylindrical_Coordinates.md-73-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Cylindrical_Coordinates.md-104-
meep-1.16.1/doc/docs/Scheme_Tutorials/Cylindrical_Coordinates.md:105:The problem is twofold. First, there is some signal-processing error in determining $Q$ in the 2d case, as indicated by the "error" column of the `harminv` output which is only 4e-7 for the 2d simulation vs. 6e-11 for the cylindrical case. This error can be reduced by running with a narrower bandwidth source, which excites just one mode and gives a cleaner signal, or by analyzing over a longer time than 200. Doing the former, we find that the 2d value of $Q$ at a resolution of 20 should really be $Q$=343. Second, [PML](../Perfectly_Matched_Layer.md) absorbing layers are really designed to absorb planewaves incident on flat interfaces, but here we have a *cylindrical* PML layer. Because of this, there are larger numerical reflections from the PML in the cylindrical simulation, which we can rectify by pushing the PML out to a larger radius (i.e. using a larger value of `pad`) and/or increasing the PML thickness (increasing `dpml`) so that it turns on more adiabatically. In the cylindrical simulation for `resolution = 20`, if the PML thickness is increased to `dpml = 16`, the $Q$ is 343, which is in much better agreement with the 2d calculation and if the PML thickness is increased to `dpml = 32` the $Q$ is the same 343, so it seems to be converged.
meep-1.16.1/doc/docs/Scheme_Tutorials/Cylindrical_Coordinates.md-106-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Cylindrical_Coordinates.md-256-
meep-1.16.1/doc/docs/Scheme_Tutorials/Cylindrical_Coordinates.md:257:There are three things to note. First, there is a built-in function `electric-energy-in-box` which calculates the integral of $\vec{E}\cdot\vec{D}/2 = \varepsilon|E|^2/2$. This is exactly the integral in the denominator, divided by 2. In cylindrical coordinates $(r,\phi,z)$, the integrand is [multiplied](https://en.wikipedia.org/wiki/Cylindrical_coordinate_system#Line_and_volume_elements) by the circumference $2\pi r$, or equivalently the integral is over an annular volume. Second, for the case involving the $H_z$ source, both parallel ($E_{\parallel}=E_{\phi}$) and perpendicular ($\varepsilon E_{\perp}=D_r$) fields are present which must be included in the numerator as separate terms. Field values anywhere in the grid obtained with `get-field-point` are [automatically interpolated](../Introduction.md#the-illusion-of-continuity); i.e., no additional post-processing is necessary. Third, when comparing the perturbation-theory result to the finite-difference approximation, there are *two* convergence parameters: the resolution and $\Delta r$. In principle, to demonstrate agreement with perturbation theory, the limit of the resolution should be taken to infinity and *then* the limit of $\Delta r$ to 0. In practice, this can be obtained by doubling the resolution at a given $\Delta r$ until it is sufficiently converged, then halving $\Delta r$ and repeating.
meep-1.16.1/doc/docs/Scheme_Tutorials/Cylindrical_Coordinates.md-258-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Cylindrical_Coordinates.md-519-
meep-1.16.1/doc/docs/Scheme_Tutorials/Cylindrical_Coordinates.md:520:Note that the volume specified in `output-farfields` via `center` and `size` is in cylindrical coordinates. These points must therefore lie in the $\phi = 0$ ($rz = xz$) plane. The fields $E$ and $H$ returned by `output-farfields` can be thought of as either cylindrical ($r$,$\phi$,$z$) or Cartesian ($x$,$y$,$z$) coordinates since these are the same in the $\phi = 0$ plane (i.e., $E_r=E_x$ and $E_\phi=E_y$). Also, `output-farfields` tends to gradually *slow down* as the far-field point gets closer to the near-field monitor. This performance degradation is unavoidable and is due to the larger number of $\phi$ integration points required for accurate convergence of the integral involving the Green's function which diverges as the evaluation point approaches the source point.
meep-1.16.1/doc/docs/Scheme_Tutorials/Cylindrical_Coordinates.md-521-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Eigenmode_Source.md-204-
meep-1.16.1/doc/docs/Scheme_Tutorials/Eigenmode_Source.md:205:The eigenmode source can also be used to launch modes in an oblique/rotated waveguide. The results are shown in the two figures below for the single- and multi-mode case. There is one subtlety: for mode **A** in the multi-mode case, the `bnum` parameter is set to 3 rather than 2. This is because a non-zero rotation angle breaks the symmetry in the $y$-direction which therefore precludes the use of `EVEN-Y` in `eig-parity`. Without any parity specified for the $y$-direction, the second band corresponds to *odd* modes. This is why we must select the third band which contains even modes.
meep-1.16.1/doc/docs/Scheme_Tutorials/Eigenmode_Source.md-206-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Eigenmode_Source.md-235-
meep-1.16.1/doc/docs/Scheme_Tutorials/Eigenmode_Source.md:236:The eigenmode source can also be used to launch [planewaves](https://en.wikipedia.org/wiki/Plane_wave) in homogeneous media. The dispersion relation for a planewave is ω=|$\vec{k}$|/$n$ where ω is the angular frequency of the planewave and $\vec{k}$ its wavevector; $n$ is the refractive index of the homogeneous medium ($c=1$ in Meep units). This example demonstrates launching planewaves in a uniform medium with $n=1.5$ at three rotation angles: 0°, 20°, and 40°. Bloch-periodic boundaries via the `k-point` are used and specified by the wavevector $\vec{k}$. PML boundaries are used only along the $x$-direction.
meep-1.16.1/doc/docs/Scheme_Tutorials/Eigenmode_Source.md-237-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Eigenmode_Source.md-276-
meep-1.16.1/doc/docs/Scheme_Tutorials/Eigenmode_Source.md:277:Note that the line source spans the *entire* length of the cell. (Planewave sources extending into the PML region must include `(is-integrated true)`.) This example involves a continuous-wave (CW) time profile. For a pulse profile, the oblique planewave is incident at a given angle for only a *single* frequency component of the source; see [Tutorial/Basics/Angular Reflectance Spectrum of a Planar Interface](../Scheme_Tutorials/Basics.md#angular-reflectance-spectrum-of-a-planar-interface). This is a fundamental feature of FDTD simulations and not of Meep per se. To simulate an incident planewave at multiple angles for a given frequency ω, you will need to do separate simulations involving different values of $\vec{k}$ (`k-point`) since each set of ($\vec{k}$,ω) specifying the Bloch-periodic boundaries and the frequency of the source will produce a different angle of the planewave. For more details, refer to Section 4.5 ("Efficient Frequency-Angle Coverage") in [Chapter 4](https://arxiv.org/abs/1301.5366) ("Electromagnetic Wave Source Conditions") of [Advances in FDTD Computational Electrodynamics: Photonics and Nanotechnology](https://www.amazon.com/Advances-FDTD-Computational-Electrodynamics-Nanotechnology/dp/1608071707).
meep-1.16.1/doc/docs/Scheme_Tutorials/Eigenmode_Source.md-278-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Local_Density_of_States.md-14-
meep-1.16.1/doc/docs/Scheme_Tutorials/Local_Density_of_States.md:15:where $Q^{(n)}=\omega^{(n)}/2\gamma^{(n)}$ is the dimensionless [quality factor](https://en.wikipedia.org/wiki/Q_factor) and $V^{(n)}$ is the modal volume. This represents another way to compute the LDOS. In this tutorial, we will verify this expression by comparing it to the earlier one.
meep-1.16.1/doc/docs/Scheme_Tutorials/Local_Density_of_States.md-16-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Local_Density_of_States.md-18-
meep-1.16.1/doc/docs/Scheme_Tutorials/Local_Density_of_States.md:19:We will validate both this prediction and the LDOS calculations above by computing the LDOS at the center of the cavity, the point of peak $|\vec{E}|$, in two ways. First, we compute the LDOS directly from the power radiated by a dipole, Fourier-transforming the result of a pulse using the `dft-ldos` command. Second, we compute the cavity mode and its lifetime $Q$ using `harminv` and then compute the LDOS by the Purcell formula shown above. The latter technique is much more efficient for high Q (small $w$), since one must run the simulation for a very long time to directly accumulate the Fourier transform of a slowly-decaying mode. The two calculations, we will demonstrate, agree to within discretization error, verifying the LDOS analysis above, and $Q/V$ is asymptotically linear on a semilog scale versus $1/w$ as predicted.
meep-1.16.1/doc/docs/Scheme_Tutorials/Local_Density_of_States.md-20-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Material_Dispersion.md-150-
meep-1.16.1/doc/docs/Scheme_Tutorials/Material_Dispersion.md:151:The `run-k-points` function returns a *list of lists* of frequencies &mdash; one list of complex frequencies for each *k* point &mdash; which we store in the `all-freqs` variable. Finally, we want to loop over this list and print out the corresponding ε via the ratio (ck/ω)$^2$ as described above. To do this, we will use the Scheme `map` function, which applies a given function to every element of a list (or lists), and since we have a list of lists we'll actually nest two `map` functions:
meep-1.16.1/doc/docs/Scheme_Tutorials/Material_Dispersion.md-152-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Mode_Decomposition.md-262-
meep-1.16.1/doc/docs/Scheme_Tutorials/Mode_Decomposition.md:263:Note the use of the keyword parameter argument `#eig-parity (+ ODD-Z EVEN-Y)` in the call to `get-eigenmode-coefficients`. This is important for specifying **non-degenerate** modes in MPB since the `k-point` is (0,0,0). `ODD-Z` is for modes with $E_z$ polarization. `EVEN-Y` is necessary since each diffraction order which is based on a given k<sub>x</sub> consists of *two* modes: one going in the +y direction and the other in the -y direction. `EVEN-Y` forces MPB to compute only the +k<sub>y</sub> + -k<sub>y</sub> (cosine) mode. As a result, the total transmittance must be halved in this case to obtain the transmittance for the individual +k<sub>y</sub> or -k<sub>y</sub> mode. For `ODD-Y`, MPB will compute the +k<sub>y</sub> - -k<sub>y</sub> (sine) mode but this will have zero power because the source is even. If the $y$ parity is left out, MPB will return a random superposition of the cosine and sine modes. Alternatively, in this example an input planewave with H<sub>z</sub> instead of $E_z$ polarization can be used which requires `#eig_parity (+ EVEN-Z ODD-Y)` as well as an odd mirror symmetry plane in *y*. Finally, note the use of `add-flux` instead of `add-mode-monitor` when using symmetries.
meep-1.16.1/doc/docs/Scheme_Tutorials/Mode_Decomposition.md-264-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Near_to_Far_Field_Spectra.md-107-
meep-1.16.1/doc/docs/Scheme_Tutorials/Near_to_Far_Field_Spectra.md:108:From the far fields at each point $\mathbf{r}$, we compute using Matlab/Octave the outgoing or radial flux: $\sqrt{P_x^2+P_y^2}$, where P$_x$ and P$_y$ are the components of the Poynting vector $\mathbf{P}(\mathbf{r})=(P_x,P_y,P_z)=\mathrm{Re}\, \mathbf{E}(\mathbf{r})^*\times\mathbf{H}(\mathbf{r})$. Note that $P_z$ is always 0 since this is a 2d simulation. The total flux is then computed and displayed:
meep-1.16.1/doc/docs/Scheme_Tutorials/Near_to_Far_Field_Spectra.md-109-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Optical_Forces.md-14-
meep-1.16.1/doc/docs/Scheme_Tutorials/Optical_Forces.md:15:where $\omega$ is the mode frequency of the coupled waveguide system, $s$ is the separation distance between the parallel waveguides, $k$ is the conserved wave vector, and $U$ is the total energy of the electromagnetic fields. By convention, negative and positive values correspond to attractive and repulsive forces, respectively. For more details, see [Optics Letters, Vol. 30, pp. 3042-4, 2005](https://www.osapublishing.org/ol/abstract.cfm?uri=ol-30-22-3042). This expression has been shown to be mathematically equivalent to the Maxwell stress tensor in [Optics Express, Vol. 17, pp. 18116-35, 2009](http://www.opticsinfobase.org/oe/abstract.cfm?URI=oe-17-20-18116). We will verify this result in this tutorial. In this particular example, only the fundamental mode with odd mirror-symmetry in $y$ shows the bidirectional force.
meep-1.16.1/doc/docs/Scheme_Tutorials/Optical_Forces.md-16-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Optical_Forces.md-109-
meep-1.16.1/doc/docs/Scheme_Tutorials/Optical_Forces.md:110:There are four important items to note: (1) a single flux surface is used to compute the Poynting flux in $z$ which spans the entire non-PML region of the cell. This is because in the limit of small waveguide separation distance, two separate flux surfaces for each waveguide would overlap and result in overcounting. The total power through a single flux surface need, by symmetry, only be halved in order to determine the value for a single waveguide. (2) Instead of defining a closed, four-sided "box" surrounding the waveguides, the Maxwell stress tensor is computed using just two line monitors oriented in $y$ (to obtain the force in the perpendicular $x$ direction) with `weight` values of `+1`/`-1` to correctly sum the total force. The force monitors are placed in the vacuum region adjacent to the waveguide rather than on its surface so that the fields are [second-order accurate](../Subpixel_Smoothing.md). By symmetry, the force in the $y$ direction is zero and need not be computed. (3) Since the `eig-parity` parameter of `eigenmode-source` can only be specified using the $y$ and/or $z$ directions (but *not* $x$, the waveguide separation axis), the `eig_band` parameter must be set to `1`/`2` to distinguish modes with even/odd $x$-mirror symmetry.  (4) A 2d `cell-size` in $xy$ combined with a `k-point` containing a non-zero $z$ component results in a [2d simulation (which is the default)](../2d_Cell_Special_kz.md).
meep-1.16.1/doc/docs/Scheme_Tutorials/Optical_Forces.md-111-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Optical_Forces.md-121-
meep-1.16.1/doc/docs/Scheme_Tutorials/Optical_Forces.md:122:The MPB simulation is in [examples/parallel-wvgs-mpb.ctl](https://github.com/NanoComp/meep/blob/master/scheme/examples/parallel-wvgs-mpb.ctl). There are important differences related to the coordinate dimensions between the MPB and Meep scripts. In the MPB script, the 2d cell is defined using the $yz$ plane, the waveguide propagation axis is $x$, and the waveguide separation axis is $y$. As a consequence, the `num-bands` parameter is always `1` since the $y$ parity of the mode can be defined explicitly (i.e., `run-yodd-zodd` vs. `run-yeven-zodd`). This is different from the Meep script since Meep requires that a 2d cell be defined in the $xy$ plane. MPB has no such requirement.
meep-1.16.1/doc/docs/Scheme_Tutorials/Optical_Forces.md-123-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-83-
meep-1.16.1/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:84:The source will now be the usual Gaussian pulse centered at `fcen`, located at one edge of the cell just outside the PML, at `x = -0.5*sx + dpml`. Ideally, we would excite exactly the fundamental mode of the waveguide, but it is good enough to just excite it with a line source. Moreover, since we are interested in the $P$ polarization (electric field in the plane), we will excite it with a $J_y$ current source (transverse to the propagation direction), which is specified as `Ey`:
meep-1.16.1/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-85-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-260-
meep-1.16.1/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:261:The results, shown above, are exactly what we expected: at first, an exponential increase of $Q$ with `N`, and then a saturation at $Q_r \approx 8750$. However, when we look at the Harminv output for larger `N`, something strange happens &mdash; it starts to find *more modes*! For example, at `N=16`, the output is:
meep-1.16.1/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-262-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-289-
meep-1.16.1/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:290:Let us briefly review the problem. In a periodic system of this sort, the eigen-solutions can be expressed in the form of *Bloch modes*: a periodic *Bloch envelope* multiplied by a planewave $\exp[i(\mathbf{k}\cdot\mathbf{x}-ω t)]$, where **k** is the *Bloch wavevector*. We wish to find the *bands* $ω(\mathbf{k})$. In this case, there is only *one* direction of periodicity, so we only have one wavevector component $k_x$. Moreover, the solutions are periodic functions of this wavevector: for a unit-period structure, $k_x$ and $k_x+2\pi$ are redundant. Also, $k_x$ and $-k_x$ are redundant by time-reversal symmetry, so we only need to look for solutions in the *irreducible Brillouin zone* from $k_x=0$ to $k_x=\pi$.
meep-1.16.1/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-291-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-350-
meep-1.16.1/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:351:Here, we have used [libctl](https://libctl.readthedocs.io)'s built-in `interpolate` function to interpolate a set of 19 $\mathbf{k}$ points between $\mathbf{k} = 0$ and $\mathbf{k} = 0.5 \cdot 2π \hat{\mathbf{x}}$, to cover the irreducible Brillouin zone. `run-k-points` automatically runs `harminv`, using the frequency range and location taken from the Gaussian source in the `sources` list. It also calls `output-epsilon`. The output is not only the usual `harminv:` lines, but it also outputs a series of lines like:
meep-1.16.1/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-352-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md-6-
meep-1.16.1/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md:7:Since this is a 1d calculation, we could implement it via a 2d cell of `(size S no-size no-size)`, specifying periodic boundary conditions in the $y$ direction. However, this is slightly inefficient since the $y$ periodic boundaries are implemented internally via extra "ghost pixels" in the $y$ direction. Instead, Meep has special support for 1d simulations in the $z$ direction. To use this, we must explicitly set `dimensions` to `1`, and in that case we can *only* use $E_x$ (and $D_x$) and $H_y$ field components. This involves no loss of generality because of the symmetry of the problem.
meep-1.16.1/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md-8-
##############################################
meep-1.16.1/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md-85-
meep-1.16.1/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md:86:We could print these with more `display-fluxes` lines, but it is nice to print these on a single line along with χ$^{(3)}$ and the amplitude, so that we can eventually put them all into one table in our plotting program. To do this, we'll use the lower-level function `(get-fluxes trans1)`, which returns a list of the flux values, and take the first element of the list since there is only one:
meep-1.16.1/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md-87-
##############################################
meep-1.16.1/doc/docs/Scheme_User_Interface.md-49-meep-1.16.1/doc/docs/Scheme_User_Interface.md:50:Explicitly specifies the dimensionality of the simulation, if the value is less than 3. If the value is 3 (the default), then the dimensions are automatically reduced to 2 if possible when `geometry-lattice` size in the $z$ direction is `no-size`. If `dimensions` is the special value of `CYLINDRICAL`, then cylindrical coordinates are used and the $x$ and $z$ dimensions are interpreted as $r$ and $z$, respectively. If `dimensions` is 1, then the cell must be along the $z$ direction and only $E_x$ and $H_y$ field components are permitted. If `dimensions` is 2, then the cell must be in the $xy$ plane.
meep-1.16.1/doc/docs/Scheme_User_Interface.md-51-
##############################################
meep-1.16.1/doc/docs/Scheme_User_Interface.md-53-meep-1.16.1/doc/docs/Scheme_User_Interface.md:54:For `CYLINDRICAL` simulations, specifies that the angular $\phi$ dependence of the fields is of the form $e^{im\phi}$ (default is `m=0`). If the simulation cell includes the origin $r=0$, then `m` must be an integer.
meep-1.16.1/doc/docs/Scheme_User_Interface.md-55-
meep-1.16.1/doc/docs/Scheme_User_Interface.md-56-**`accurate-fields-near-cylorigin?` [`boolean`]**
meep-1.16.1/doc/docs/Scheme_User_Interface.md:57:—For `CYLINDRICAL` simulations with |*m*| &gt; 1, compute more accurate fields near the origin $r=0$ at the expense of requiring a smaller Courant factor. Empirically, when this option is set to `true`, a Courant factor of roughly $\min[0.5, 1 / (|m| + 0.5)]$ or smaller seems to be needed. Default is `false`, in which case the $D_r$, $D_z$, and $B_r$ fields within |*m*| pixels of the origin are forced to zero, which usually ensures stability with the default Courant factor of 0.5, at the expense of slowing convergence of the fields near $r=0$.
meep-1.16.1/doc/docs/Scheme_User_Interface.md-58-
##############################################
meep-1.16.1/doc/docs/Scheme_User_Interface.md-64-meep-1.16.1/doc/docs/Scheme_User_Interface.md:65:If `false` (the default), then the boundaries are perfect metallic (zero electric field). If a `vector3`, then the boundaries are Bloch-periodic: the fields at one side are $\exp(i\mathbf{k}\cdot\mathbf{R})$ times the fields at the other side, separated by the lattice vector $\mathbf{R}$. A non-zero `vector3` will produce complex fields. The `k-point` vector is specified in Cartesian coordinates in units of 2π/distance. Note: this is *different* from [MPB](https://mpb.readthedocs.io), equivalent to taking MPB's `k-points` through its function `reciprocal->cartesian`.
meep-1.16.1/doc/docs/Scheme_User_Interface.md-66-
##############################################
meep-1.16.1/doc/docs/Scheme_User_Interface.md-68-meep-1.16.1/doc/docs/Scheme_User_Interface.md:69:A 2d cell (i.e., `dimensions` is `2`) combined with a `k-point` that has a *non-zero* component in $z$ would normally result in a 3d simulation with complex fields. However, by default (`kz-2d` is `"complex"`), Meep will use a 2d computational cell in which $k_z$ is incorporated as an additional term in Maxwell's equations, which still results in complex fields but greatly improved performance. Setting `kz_2d` to `"3d"` will instead use a 3d cell that is one pixel thick (with Bloch-periodic boundary conditions), which is considerably more expensive. The third possibility, `kz_2d` is `"real/imag"`, saves an additional factor of two by storing some field components as purely real and some as purely imaginary in a "real" field, but this option requires some care to use. See [2d Cell with Out-of-Plane Wavevector](2d_Cell_Special_kz.md).
meep-1.16.1/doc/docs/Scheme_User_Interface.md-70-
##############################################
meep-1.16.1/doc/docs/Scheme_User_Interface.md-271-meep-1.16.1/doc/docs/Scheme_User_Interface.md:272:The scale factor σ. You can also specify an anisotropic σ tensor by using the property `sigma-diag` which takes three numbers or a `vector3` to give the σ$_n$ tensor diagonal, and `sigma-offdiag` which specifies the offdiagonal elements (defaults to 0). That is, `(sigma-diag a b c)` and `(sigma-offdiag u v w)` corresponds to a σ tensor
meep-1.16.1/doc/docs/Scheme_User_Interface.md-273-
##############################################
meep-1.16.1/doc/docs/Scheme_User_Interface.md-591-meep-1.16.1/doc/docs/Scheme_User_Interface.md:592:Specify the direction of the boundaries to put the PML layers next to. e.g. if `X`, then specifies PML on the $\pm x$ boundaries (depending on the value of `side`, below). Default is the special value `ALL`, which puts PML layers on the boundaries in all directions.
meep-1.16.1/doc/docs/Scheme_User_Interface.md-593-
##############################################
meep-1.16.1/doc/docs/Scheme_User_Interface.md-595-meep-1.16.1/doc/docs/Scheme_User_Interface.md:596:Specify which side, `Low` or `High` of the boundary or boundaries to put PML on. e.g. if side is `Low` and direction is `X`, then a PML layer is added to the $-x$ boundary. Default is the special value `ALL`, which puts PML layers on both sides.
meep-1.16.1/doc/docs/Scheme_User_Interface.md-597-
##############################################
meep-1.16.1/doc/docs/Scheme_User_Interface.md-607-meep-1.16.1/doc/docs/Scheme_User_Interface.md:608:By default, Meep turns on the PML conductivity quadratically within the PML layer &mdash; one doesn't want to turn it on suddenly, because that exacerbates reflections due to the discretization. More generally, with `pml-profile` one can specify an arbitrary PML "profile" function $f(u)$ that determines the shape of the PML absorption profile up to an overall constant factor. *u* goes from 0 to 1 at the start and end of the PML, and the default is $f(u) = u^2$. In some cases where a very thick PML is required, such as in a periodic medium (where there is technically no such thing as a true PML, only a pseudo-PML), it can be advantageous to turn on the PML absorption more smoothly. See [Optics Express, Vol. 16, pp. 11376-92, 2008](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). For example, one can use a cubic profile $f(u) = u^3$ by specifying `(pml-profile (lambda (u) (* u u u)))`.
meep-1.16.1/doc/docs/Scheme_User_Interface.md-609-
##############################################
meep-1.16.1/doc/docs/Scheme_User_Interface.md-623-
meep-1.16.1/doc/docs/Scheme_User_Interface.md:624:The `source` class is used to specify the current sources via the `sources` input variable. Note that all sources in Meep are separable in time and space, i.e. of the form $\mathbf{J}(\mathbf{x},t) = \mathbf{A}(\mathbf{x}) \cdot f(t)$ for some functions $\mathbf{A}$ and $f$. Non-separable sources can be simulated, however, by modifying the sources after each time step. When real fields are being used (which is the default in many cases; see the `force-complex-fields?` input variable), only the real part of the current source is used.
meep-1.16.1/doc/docs/Scheme_User_Interface.md-625-
##############################################
meep-1.16.1/doc/docs/Scheme_User_Interface.md-659-
meep-1.16.1/doc/docs/Scheme_User_Interface.md:660:This is a subclass of `source` and has **all of the properties** of `source` above. However, you normally do not specify a `component`. Instead of `component`, the current source components and amplitude profile are computed by calling MPB to compute the modes, $\mathbf{u}_{n,\mathbf{k}}(\mathbf{r}) e^{i \mathbf{k} \cdot \mathbf{r}}$, of the dielectric profile in the region given by the `size` and `center` of the source, with the modes computed as if the *source region were repeated periodically in all directions*. If an `amplitude` and/or `amp-func` are supplied, they are *multiplied* by this current profile. The desired eigenmode and other features are specified by the following properties:
meep-1.16.1/doc/docs/Scheme_User_Interface.md-661-
##############################################
meep-1.16.1/doc/docs/Scheme_User_Interface.md-667-meep-1.16.1/doc/docs/Scheme_User_Interface.md:668:By default (if `eig-match-freq?` is `true`), Meep tries to find a mode with the same frequency ω<sub>*n*</sub>(**k**) as the `src` property (above), by scanning **k** vectors in the given `direction` using MPB's `find-k` functionality. Alternatively, if `eig-kpoint` is supplied, it is used as an initial guess for **k**. By default, `direction` is the direction normal to the source region, assuming `size` is $d$–1 dimensional in a $d$-dimensional simulation (e.g. a plane in 3d). If `direction` is set to `NO-DIRECTION`, then `eig-kpoint` is not only the initial guess and the search direction of the **k** vectors, but is also taken to be the direction of the waveguide, allowing you to [launch modes in oblique ridge waveguides](Scheme_Tutorials/Eigenmode_Source.md#oblique-waveguides) (not perpendicular to the source plane). If `eig-match-freq?` is `false`, then the **k** vector of the desired mode is specified with `eig-kpoint` (in Meep units of 2π/(unit length)). Also, the eigenmode frequency computed by MPB overwrites the `frequency` parameter of the `src` property for a `gaussian-src` and `continuous-src` but not `custom-src` (the `width` or any other parameter of `src` is unchanged). By default, the **k** components in the plane of the source region are zero.  However, if the source region spans the *entire* cell in some directions, and the cell has Bloch-periodic boundary conditions via the `k-point` parameter, then the mode's **k** components in those directions will match `k-point` so that the mode satisfies the Meep boundary conditions, regardless of `eig-kpoint`. Note that once **k** is either found by MPB, or specified by `eig-kpoint`, the field profile used to create the current sources corresponds to the [Bloch mode](https://en.wikipedia.org/wiki/Bloch_wave), $\mathbf{u}_{n,\mathbf{k}}(\mathbf{r})$, multiplied by the appropriate exponential factor, $e^{i \mathbf{k} \cdot \mathbf{r}}$.
meep-1.16.1/doc/docs/Scheme_User_Interface.md-669-
##############################################
meep-1.16.1/doc/docs/Scheme_User_Interface.md-671-meep-1.16.1/doc/docs/Scheme_User_Interface.md:672:The parity (= polarization in 2d) of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry *in the source region*, with respect to the `center` of the source region.  (In particular, it does not matter if your simulation as a whole has that symmetry, only the cross section where you are introducing the source.) If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `EVEN-Z + ODD-Y`. Default is `NO-PARITY`, in which case MPB computes all of the bands which will still be even or odd if the structure has mirror symmetry, of course. This is especially useful in 2d simulations to restrict yourself to a desired polarization.
meep-1.16.1/doc/docs/Scheme_User_Interface.md-673-
##############################################
meep-1.16.1/doc/docs/Scheme_User_Interface.md-739-meep-1.16.1/doc/docs/Scheme_User_Interface.md:740:How many `width`s the current decays for before it is cut off and set to zero &mdash; this applies for both turn-on and turn-off of the pulse. Default is 5.0. A larger value of `cutoff` will reduce the amount of high-frequency components that are introduced by the start/stop of the source, but will of course lead to longer simulation times. The peak of the Gaussian is reached at the time $t_0$=`start-time + cutoff*width`.
meep-1.16.1/doc/docs/Scheme_User_Interface.md-741-
##############################################
meep-1.16.1/doc/docs/Scheme_User_Interface.md-876-meep-1.16.1/doc/docs/Scheme_User_Interface.md:877:Given a `direction` constant, and a `meep::volume*`, returns the flux (the integral of $\Re [\mathbf{E}^* \times \mathbf{H}]$) in that volume. Most commonly, you specify a volume that is a plane or a line, and a direction perpendicular to it, e.g. `(flux-in-box X (volume (center 0) (size 0 1 1)))`.
meep-1.16.1/doc/docs/Scheme_User_Interface.md-878-
##############################################
meep-1.16.1/doc/docs/Scheme_User_Interface.md-1015-```
meep-1.16.1/doc/docs/Scheme_User_Interface.md:1016:The flux object must be created using `add-mode-monitor`.  (You could also use `add-flux`, but with `add_flux` you need to be more careful about symmetries that bisect the flux plane: the `add-flux` object should only be used with `get-eigenmode-coefficients` for modes of the same symmetry, e.g. constrained via `eig_parity`.  On the other hand, the performance of `add-flux` planes benefits more from symmetry.) `eig-vol` is the volume passed to [MPB](https://mpb.readthedocs.io) for the eigenmode calculation (based on interpolating the discretized materials from the Yee grid); in most cases this will simply be the volume over which the frequency-domain fields are tabulated, which is the default (i.e. `(meep-dft-flux-where-get flux)`). `eig-parity` should be one of [`NO-PARITY` (default), `EVEN-Z`, `ODD-Z`, `EVEN-Y`, `ODD-Y`]. It is the parity (= polarization in 2d) of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry *in the source region*, just as for `eigenmode-source` above. If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `(+ EVEN-Z ODD-Y)`. Default is `NO-PARITY`, in which case MPB computes all of the bands which will still be even or odd if the structure has mirror symmetry, of course. This is especially useful in 2d simulations to restrict yourself to a desired polarization. `eig-resolution` is the spatial resolution to use in MPB for the eigenmode calculations. This defaults to twice the Meep `resolution` in which case the structure is linearly interpolated from the Meep pixels. `eig-tolerance` is the tolerance to use in the MPB eigensolver. MPB terminates when the eigenvalues stop changing to less than this fractional tolerance. Defaults to `1e-12`.  (Note that this is the tolerance for the frequency eigenvalue ω; the tolerance for the mode profile is effectively the square root of this.)
meep-1.16.1/doc/docs/Scheme_User_Interface.md-1017-
##############################################
meep-1.16.1/doc/docs/Scheme_User_Interface.md-1103-
meep-1.16.1/doc/docs/Scheme_User_Interface.md:1104:Most commonly, you will want to **normalize** the force spectrum in some way, just as for flux spectra. Most simply, you could divide two different force spectra to compute the ratio of forces on two objects. Often, you will divide a force spectrum by a flux spectrum, to divide the force $F$ by the incident power $P$ on an object, in order to compute the useful dimensionless ratio $Fc$/$P$ where $c=1$ in Meep units. For example, it is a simple exercise to show that the force $F$ on a perfectly reflecting mirror with normal-incident power $P$ satisfies $Fc$/$P=2$, and for a perfectly absorbing (black) surface $Fc$/$P=1$.
meep-1.16.1/doc/docs/Scheme_User_Interface.md-1105-
##############################################
meep-1.16.1/doc/docs/Scheme_User_Interface.md-1378-
meep-1.16.1/doc/docs/Scheme_User_Interface.md:1379:It is often useful to use the `h5topng` `-C` or `-A` options to overlay the dielectric function when outputting fields. To do this, you need to know the name of the dielectric-function `.h5` file which must have been previously output by `output-epsilon`. To make this easier, a built-in shell variable `$EPS` is provided which refers to the last-output dielectric-function `.h5` file. So, for example `(output-png Ez "-C $EPS")` will output the $E_z$ field and overlay the dielectric contours.
meep-1.16.1/doc/docs/Scheme_User_Interface.md-1380-
##############################################
meep-1.16.1/doc/docs/Scheme_User_Interface.md-1402-meep-1.16.1/doc/docs/Scheme_User_Interface.md:1403:Returns a step function that collects data from the field component `c` (e.g. $E_x$, etc.) at the given point `pt` (a `vector3`). Then, at the end of the run, it uses Harminv to look for modes in the given frequency range (center `fcen` and width `df`), printing the results to standard output (prefixed by `harminv:`) as comma-delimited text, and also storing them to the variable `harminv-results`. The optional argument `maxbands` is the maximum number of modes to search for. Defaults to 100.
meep-1.16.1/doc/docs/Scheme_User_Interface.md-1404-
##############################################
meep-1.16.1/doc/docs/Subpixel_Smoothing.md-25-
meep-1.16.1/doc/docs/Subpixel_Smoothing.md:26:where $\textbf{P}$ is the projection matrix $P_{ij}=n_{i}n_{j}$ onto the normal $\vec{n}$. The $\langle\cdots\rangle$ denotes an average over the voxel $sΔx\times sΔy\times sΔz$ surrounding the grid point in question where $s$ is a smoothing diameter in grid units equal to 1/`resolution`. If the initial materials are anisotropic (via `epsilon_diag` and `epsilon_offdiag`), a more complicated formula is used. They key point is that, even if the structure consists entirely of isotropic materials, the discretized structure will use anisotropic materials. For interface pixels, Meep computes the effective permittivity tensor automatically at the start of the simulation prior to time stepping via analytic expressions for the filling fraction and local normal vector. For details involving derivation of the effective permittivity tensor and its implementation in Meep/FDTD, see [Optics Letters, Vol. 36, pp. 2972-4, 2006](https://www.osapublishing.org/ol/abstract.cfm?uri=ol-31-20-2972) and [Optics Letters, Vol. 35, pp. 2778-80, 2009](https://www.osapublishing.org/abstract.cfm?uri=ol-34-18-2778).
meep-1.16.1/doc/docs/Subpixel_Smoothing.md-27-
##############################################
meep-1.16.1/doc/docs/Units_and_Nonlinearity.md-23-
meep-1.16.1/doc/docs/Units_and_Nonlinearity.md:24:where $n_0$ is the linear refractive index $n_0=\sqrt{\varepsilon}$. See, for example, Section 4.1 of [Nonlinear Optics (third edition)](https://www.amazon.com/Nonlinear-Optics-Third-Robert-Boyd/dp/0123694701) by R. W. Boyd.
meep-1.16.1/doc/docs/Units_and_Nonlinearity.md-25-
##############################################
meep-1.16.1/m4/ax_compiler_vendor.m4-20-  for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do 
meep-1.16.1/m4/ax_compiler_vendor.m4:21:    vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
meep-1.16.1/m4/ax_compiler_vendor.m4-22-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
##############################################
meep-1.16.1/m4/ax_compiler_vendor.m4-25-#endif
meep-1.16.1/m4/ax_compiler_vendor.m4:26:])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
meep-1.16.1/m4/ax_compiler_vendor.m4-27-  done
##############################################
meep-1.16.1/m4/ax_gcc_archflag.m4-114-     AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/])
meep-1.16.1/m4/ax_gcc_archflag.m4:115:     cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null`
meep-1.16.1/m4/ax_gcc_archflag.m4:116:     cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters`
meep-1.16.1/m4/ax_gcc_archflag.m4-117-     case $cputype in
##############################################
meep-1.16.1/m4/ax_gcc_archflag.m4-138-     cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null`
meep-1.16.1/m4/ax_gcc_archflag.m4:139:     cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'`
meep-1.16.1/m4/ax_gcc_archflag.m4-140-     case $cputype in
##############################################
meep-1.16.1/m4/pkg.m4-27-            AC_MSG_CHECKING($1_CFLAGS)
meep-1.16.1/m4/pkg.m4:28:            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
meep-1.16.1/m4/pkg.m4-29-            AC_MSG_RESULT($$1_CFLAGS)
##############################################
meep-1.16.1/m4/pkg.m4-31-            AC_MSG_CHECKING($1_LIBS)
meep-1.16.1/m4/pkg.m4:32:            $1_LIBS=`$PKG_CONFIG --libs "$2"`
meep-1.16.1/m4/pkg.m4-33-            AC_MSG_RESULT($$1_LIBS)
##############################################
meep-1.16.1/m4/pkg.m4-38-            ## do set a variable so people can do so.
meep-1.16.1/m4/pkg.m4:39:            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
meep-1.16.1/m4/pkg.m4-40-            ifelse([$4], ,echo $$1_PKG_ERRORS,)
##############################################
meep-1.16.1/python/examples/absorbed_power_density.ipynb-8-    "\n",
meep-1.16.1/python/examples/absorbed_power_density.ipynb:9:    "The `dft_flux` routines (`add_flux`) described in the previous examples compute the *total* power in a given region (`FluxRegion`). It is also possible to compute the *local* (i.e., position-dependent) absorbed power density in a dispersive (lossy) material. This quantity is useful for obtaining a spatial map of the photon absorption. The absorbed power density is defined as $$\\mathrm{Re}\\, \\left[ {\\mathbf{E}^* \\cdot \\frac{d\\mathbf{P}}{dt}} \\right]$$ where $\\mathbf{P}$ is the total polarization field. In the Fourier (frequency) domain with time-harmonic fields, this expression is $$\\mathrm{Re}\\, \\left[ {\\mathbf{E}^* \\cdot (-i \\omega \\mathbf{P})} \\right] = \\omega\\, \\mathrm{Im}\\, \\left[ {\\mathbf{E}^* \\cdot \\mathbf{P}} \\right]$$ where $\\mathbf{E}^* \\cdot \\mathbf{P}$ denotes the dot product of the complex conjugate of $\\mathbf{E}$ with $\\mathbf{P}$. However, since $\\mathbf{D}=\\mathbf{E}+\\mathbf{P}$, this is equivalent to $$ \\omega\\, \\mathrm{Im}\\, \\left[ {\\mathbf{E}^* \\cdot (\\mathbf{D}-\\mathbf{E})} \\right] = \\omega\\, \\mathrm{Im}\\, \\left[ {\\mathbf{E}^* \\cdot \\mathbf{D}} \\right]$$ since $\\mathbf{E}^* \\cdot \\mathbf{E} = |\\mathbf{E}|^2$ is purely real. Calculating this quantity involves two steps: (1) compute the Fourier-transformed $\\mathbf{E}$ and $\\mathbf{D}$ fields in a region via the `dft_fields` feature and (2) in post processing, compute $\\omega\\, \\mathrm{Im}\\, \\left[ {\\mathbf{E}^* \\cdot \\mathbf{D}} \\right]$.\n",
meep-1.16.1/python/examples/absorbed_power_density.ipynb-10-    "\n",
##############################################
meep-1.16.1/python/examples/absorbed_power_density.ipynb-249-   "source": [
meep-1.16.1/python/examples/absorbed_power_density.ipynb:250:    "There is one important item to note: in order to eliminate discretization artifacts when computing the $\\mathbf{E}^* \\cdot \\mathbf{D}$ dot-product, the `add_dft_fields` definition includes `yee_grid=True` which ensures that the $E_z$ and $D_z$ fields are computed on the Yee grid rather than interpolated to the centered grid. As a corollary, we cannot use [`get_array_metadata`](https://meep.readthedocs.io/en/latest/Python_User_Interface/#array-metadata) to obtain the coordinates of the `dft_fields` region or its interpolation weights because this involves the centered grid.\n",
meep-1.16.1/python/examples/absorbed_power_density.ipynb-251-    "\n",
##############################################
meep-1.16.1/python/examples/antenna-radiation.ipynb-201-   "source": [
meep-1.16.1/python/examples/antenna-radiation.ipynb:202:    "For the second of two cases, we use the `get_farfield` routine to compute the far fields by looping over a set of 100 equally-spaced points along the circumference of a circle with radius of 1 mm. The six far field components ($E_x$, $E_y$, $E_z$, $H_x$, $H_y$, $H_z$) are stored as separate arrays of complex numbers. From the far fields at each point $r$, we compute the outgoing or radial flux: $P^2_x+P^2_y$, where $P_x$ and $P_y$ are the components of the Poynting vector $P(r)=(P_x,P_y,P_z)=\\Re(E(r) \\times H(r))$. Note that $P_z$ is always 0 since this is a 2d simulation. The total flux is computed and the three flux values are displayed."
meep-1.16.1/python/examples/antenna-radiation.ipynb-203-   ]
##############################################
meep-1.16.1/python/examples/binary_grating.ipynb-294-   "source": [
meep-1.16.1/python/examples/binary_grating.ipynb:295:    "Note the use of the keyword parameter argument `eig_parity=mp.ODD_Z+mp.EVEN_Y` in the call to `get_eigenmode_coefficients`. This is important for specifying **non-degenerate** modes in MPB since the `k_point` is (0,0,0). `ODD_Z` is for modes with E<sub>z</sub> polarization. `EVEN_Y` is necessary since each diffraction order which is based on a given k<sub>x</sub> consists of *two* modes: one going in the +y direction and the other in the -y direction. `EVEN_Y` forces MPB to compute only the +k<sub>y</sub> + -k<sub>y</sub> (cosine) mode. As a result, the total transmittance must be halved in this case to obtain the transmittance for the individual +k<sub>y</sub> or -k<sub>y</sub> mode. For `ODD_Y`, MPB will compute the +k<sub>y</sub> - -k<sub>y</sub> (sine) mode but this will have zero power because the source is even. If the $y$ parity is left out, MPB will return a random superposition of the cosine and sine modes. Alternatively, in this example an input planewave with H<sub>z</sub> instead of E<sub>z</sub> polarization can be used which requires `eig_parity=mp.EVEN_Z+mp.ODD_Y` as well as an odd mirror symmetry plane in *y*. Finally, note the use of `add_flux` instead of `add_mode_monitor` when using symmetries.\n",
meep-1.16.1/python/examples/binary_grating.ipynb-296-    "\n",
##############################################
meep-1.16.1/python/examples/binary_grating.ipynb-343-    "\n",
meep-1.16.1/python/examples/binary_grating.ipynb:344:    "The diffraction orders/modes are a finite set of propagating planewaves. The wavevector $k_x$ of these modes can be computed analytically: for a frequency of $ω$ (in $c$=1 units), these propagating modes are the **real** solutions of sqrt(ω²n²-($k_y$+2π$m$/$Λ$)²) where $m$ is the diffraction order (an integer), $Λ$ is the periodicity of the grating, and $n$ is the refractive index of the propagating medium. In this example, $n$=1, $k_y$=0, and $Λ$=10 μm. Thus, at a wavelength of 0.5 μm there are a total of 20 diffraction orders of which we only computed the first 10. The wavevector $k_x$ is used to compute the angle of the diffraction order as cos<sup>-1</sup>($k_x$/($ωn$)). Evanescent modes, those with an imaginary k<sub>x</sub>, exist for |$m$|>20 but these modes carry no power. Note that currently Meep does not compute the number of propagating modes for you. If the mode number passed to `get_eigenmode_coefficients` is larger than the number of propagating modes at a given frequency/wavelength, MPB's Newton solver will fail to converge and will return zero for the mode\\ coefficient. It is therefore a good idea to know beforehand the number of propagating modes.\n",
meep-1.16.1/python/examples/binary_grating.ipynb-345-    "\n",
##############################################
meep-1.16.1/python/examples/coupler.ipynb-1026-   "source": [
meep-1.16.1/python/examples/coupler.ipynb:1027:    "For a given waveguide separation distance (`d`), the simulation computes the transmittance of Ports 2, 3, and 4. The transmittance is the square of the [S-parameter](https://en.wikipedia.org/wiki/Scattering_parameters) which is equivalent to the [mode coefficient](https://meep.readthedocs.io/en/latest/Mode_Decomposition). There is an additional mode monitor at Port 1 to compute the input power from the adjacent eigenmode source; this is used for normalization when computing the transmittance. The eight layers of the GDSII file are each converted to a `Simulation` object: the upper and lower branches of the coupler are defined as a collection of [`Prism`](https://meep.readthedocs.io/en/latest/Python_User_Interface/#prism)s, the rectilinear regions of the source and flux monitor as a [`Volume`](https://meep.readthedocs.io/en/latest/Python_User_Interface/#volume) and [`FluxRegion`](https://meep.readthedocs.io/en/latest/Python_User_Interface/#fluxregion). The size of the cell in the $y$ direction is dependent on `d`. The default dimensionality is 2d. (Note that for a 2d cell the `Prism` objects returned by `get_GDSII_prisms` must have a finite height. The finite height of `Volume` objects returned by `GDSII_vol` are ignored in 2d.) An optional input parameter (`three_d`) converts the geometry to 3d by extruding the coupler geometry in the *z* direction and adding an oxide layer beneath similar to a [silicon on insulator](https://en.wikipedia.org/wiki/Silicon_on_insulator) (SOI) substrate. A schematic of the coupler design in 3d generated using MayaVi is shown below.\n",
meep-1.16.1/python/examples/coupler.ipynb-1028-    "\n",
##############################################
meep-1.16.1/python/examples/differential_cross_section.ipynb-415-   "source": [
meep-1.16.1/python/examples/differential_cross_section.ipynb:416:    "The script is similar to the previous Mie scattering example with the main difference being the replacement of the `add_flux` with `add_near2far` objects. Instead of a linearly-polarized planewave, the source is circularly-polarized so that $\\sigma_{diff}$ is invariant with the rotation angle $\\phi$ around the axis of the incident direction (i.e., $x$). This way, the far fields need only be sampled with the polar angle $\\theta$. A circularly-polarized planewave can be generated by overlapping two linearly-polarized planewaves ($E_y$ and $E_z$) which are 90° out of phase via specifying `amplitude=1j` for one of the two sources. Note, however, that there is no need to use complex fields (by specifying `force_complex_fields=True` in the `Simulation` object) which would double the floating-point memory consumption since only the real part of the source amplitude is used by default. The circularly-polarized source breaks the mirror symmetry which increases the size of the simulation. The size of the near-field monitor box surrounding the sphere is doubled so that it lies *entirely within* the homogeneous air region (a requirement of the `near2far` feature). After the near fields have been obtained for λ = 1 μm the far fields are computed for 100 points along a semi-circle with radius 10,000X that of the dielectric sphere. (Note: any such large radius would give the same $\\sigma_{scat}$ to within discretization error). Finally, the scattered cross section is computed by numerically integrating the expression from above using the radial Poynting flux values.\n",
meep-1.16.1/python/examples/differential_cross_section.ipynb-417-    "\n",
##############################################
meep-1.16.1/python/examples/holey-wvg-bands.ipynb-10-    "\n",
meep-1.16.1/python/examples/holey-wvg-bands.ipynb:11:    "Let us briefly review the problem. In a periodic system of this sort, the eigen-solutions can be expressed in the form of Bloch modes: a periodic Bloch envelope multiplied by a planewave $exp[i(k⋅x−\\omega t)]$, where $k$ is the Bloch wavevector. We wish to find the bands $\\omega(k)$. In this case, there is only one direction of periodicity, so we only have one wavevector component $k_x$. Moreover, the solutions are periodic functions of this wavevector: for a unit-period structure, $k_x$ and $k_x+2\\pi$ are redundant. Also, $k_x$ and $−k_x$ are redundant by time-reversal symmetry, so we only need to look for solutions in the irreducible Brillouin zone from $k_x=0$ to $k_x=\\pi$.\n",
meep-1.16.1/python/examples/holey-wvg-bands.ipynb-12-    "\n",
##############################################
meep-1.16.1/python/examples/metal-cavity-ldos.ipynb-18-    "\n",
meep-1.16.1/python/examples/metal-cavity-ldos.ipynb:19:    "where $Q^{(n)}=\\omega^{(n)}/2\\gamma^{(n)}$ is the dimensionless [quality factor](https://en.wikipedia.org/wiki/Q_factor) and $V^{(n)}$ is the modal volume. This represents another way to compute the LDOS. In this tutorial, we will verify this expression by comparing it to the earlier one.\n",
meep-1.16.1/python/examples/metal-cavity-ldos.ipynb-20-    "\n",
##############################################
meep-1.16.1/python/examples/metal-cavity-ldos.ipynb-22-    "\n",
meep-1.16.1/python/examples/metal-cavity-ldos.ipynb:23:    "We will validate both this prediction and the LDOS calculations above by computing the LDOS at the center of the cavity, the point of peak $|\\vec{E}|$, in two ways. First, we compute the LDOS directly from the power radiated by a dipole, Fourier-transforming the result of a pulse using the `dft_ldos` command. Second, we compute the cavity mode and its lifetime $Q$ using `Harminv` and then compute the LDOS by the Purcell formula shown above. The latter technique is much more efficient for high Q (small $w$), since one must run the simulation for a very long time to directly accumulate the Fourier transform of a slowly-decaying mode. The two calculations, we will demonstrate, agree to within discretization error, verifying the LDOS analysis above, and $Q/V$ is asymptotically linear on a semilog scale versus $1/w$ as predicted."
meep-1.16.1/python/examples/metal-cavity-ldos.ipynb-24-   ]
##############################################
meep-1.16.1/python/examples/oblique-planewave.ipynb-229-   "source": [
meep-1.16.1/python/examples/oblique-planewave.ipynb:230:    "Note that this example involves a `ContinuousSource` for the time profile. For a pulsed source, the oblique planewave is incident at a given angle for only a *single* frequency component of the source. This is a fundamental feature of FDTD simulations and not of Meep per se. Thus, to simulate an incident planewave at multiple angles for a given frequency ω, you will need to do separate simulations involving different values of $\\vec{k}$ (`k_point`) since each set of ($\\vec{k}$,ω) specifying the Bloch-periodic boundaries and the frequency of the source will produce a different angle of the planewave. For more details, refer to Section 4.5 (\"Efficient Frequency-Angle Coverage\") in [Chapter 4](https://arxiv.org/abs/1301.5366) (\"Electromagnetic Wave Source Conditions\") of [Advances in FDTD Computational Electrodynamics: Photonics and Nanotechnology](https://www.amazon.com/Advances-FDTD-Computational-Electrodynamics-Nanotechnology/dp/1608071707)."
meep-1.16.1/python/examples/oblique-planewave.ipynb-231-   ]
##############################################
meep-1.16.1/python/examples/parallel-wvgs-force.ipynb-16-    "\n",
meep-1.16.1/python/examples/parallel-wvgs-force.ipynb:17:    "where $\\omega$ is the mode frequency of the coupled waveguide system, $s$ is the separation distance between the parallel waveguides, $k$ is the conserved wave vector, and $U$ is the total energy of the electromagnetic fields. By convention, negative and positive values correspond to attractive and repulsive forces, respectively. For more details, see [Optics Letters, Vol. 30, pp. 3042-4, 2005](https://www.osapublishing.org/ol/abstract.cfm?uri=ol-30-22-3042). This expression has been shown to be mathematically equivalent to the Maxwell stress tensor in [Optics Express, Vol. 17, pp. 18116-35, 2009](http://www.opticsinfobase.org/oe/abstract.cfm?URI=oe-17-20-18116). We will verify this result in this tutorial. In this particular example, only the fundamental mode with odd mirror-symmetry in $y$ shows the bidirectional force.\n",
meep-1.16.1/python/examples/parallel-wvgs-force.ipynb-18-    "\n",
##############################################
meep-1.16.1/python/examples/parallel-wvgs-force.ipynb-22-    "\n",
meep-1.16.1/python/examples/parallel-wvgs-force.ipynb:23:    "The main component of the Meep script is the function `parallel_waveguide` which computes the force $F$ and transmitted power $P$ given the waveguide separation distance `s` and relative phase of the waveguide modes `xodd=True/False`. The eigenmode frequency $\\omega$ is computed first using `get_eigenmode` in order to specify the frequency of the `add_force` and `add_flux` monitors. (Note that when `match_frequency=False`, `get_eigenmode` ignores the input `frequency` parameter.) An [`EigenModeSource`](https://meep.readthedocs.io/en/latest/Python_User_Interface/#eigenmodesource) with `eig_match_freq=False` is then used to launch the guided mode using a pulse (the `frequency` but not the `fwidth` parameter of `GaussianSource` is ignored). Alternatively, a constant-amplitude point/area source can be used to launch the mode but this is less efficient as demonstrated in [Tutorial/Eigenmode Source/Index-Guided Modes in a Ridge Waveguide](https://meep.readthedocs.io/en/latest/Python_Tutorials/Eigenmode_Source/#index-guided-modes-in-a-ridge-waveguide). The waveguide has width/height of $a=1$ μm and a fixed propagation wavevector of $\\pi/a$."
meep-1.16.1/python/examples/parallel-wvgs-force.ipynb-24-   ]
##############################################
meep-1.16.1/python/examples/parallel-wvgs-force.ipynb-113-   "source": [
meep-1.16.1/python/examples/parallel-wvgs-force.ipynb:114:    "There are four important items to note: (1) a single flux surface is used to compute the Poynting flux in $z$ which spans the entire non-PML region of the cell. This is because in the limit of small waveguide separation distance, two separate flux surfaces for each waveguide would overlap and result in overcounting. The total power through a single flux surface need, by symmetry, only be halved in order to determine the value for a single waveguide. (2) Instead of defining a closed, four-sided \"box\" surrounding the waveguides, the Maxwell stress tensor is computed using just two line monitors oriented in $y$ (to obtain the force in the perpendicular $x$ direction) with `weight` values of `+1`/`-1` to correctly sum the total force. The force monitors are placed in the vacuum region adjacent to the waveguide rather than on its surface so that the fields are [second-order accurate](https://meep.readthedocs.io/en/latest/Subpixel_Smoothing/). By symmetry, the force in the $y$ direction is zero and need not be computed. (3) Since the `parity`/`eig_parity` parameter of `get_eigenmode`/`EigenModeSource` can only be specified using the $y$ and/or $z$ directions (but *not* $x$, the waveguide separation axis), the `band`/`eig_band` parameter must be set to `1`/`2` to distinguish modes with even/odd $x$-mirror symmetry.  (4) A 2d `cell_size` in $xy$ combined with a `k_point` containing a non-zero $z$ component results in a [2d simulation (which is the default)](https://meep.readthedocs.io/en/latest/2d_Cell_Special_kz/).\n",
meep-1.16.1/python/examples/parallel-wvgs-force.ipynb-115-    "\n",
##############################################
meep-1.16.1/python/examples/parallel-wvgs-force.ipynb-2369-    "\n",
meep-1.16.1/python/examples/parallel-wvgs-force.ipynb:2370:    "The MPB simulation is in [examples/parallel-wvgs-mpb.py](https://github.com/NanoComp/meep/blob/master/python/examples/parallel-wvgs-mpb.py). There are important differences related to the coordinate dimensions between the MPB and Meep scripts. In the MPB script, the 2d cell is defined using the $yz$ plane, the waveguide propagation axis is $x$,and the waveguide separation axis is $y$. As a consequence, the `num_bands` parameter is always `1` since the $y$ parity of the mode can be defined explicitly (i.e., `run_yodd_zodd` vs. `run_yeven_zodd`). This is different from the Meep script since Meep requires that a 2d cell be defined in the $xy$ plane. MPB has no such requirement."
meep-1.16.1/python/examples/parallel-wvgs-force.ipynb-2371-   ]
##############################################
meep-1.16.1/python/examples/perturbation_theory.ipynb-293-   "source": [
meep-1.16.1/python/examples/perturbation_theory.ipynb:294:    "There are three things to note. First, there is a built-in function `electric_energy_in_box` which calculates the integral of $\\vec{E}\\cdot\\vec{D}/2 = \\varepsilon|E|^2/2$. This is exactly the integral in the denominator, divided by 2. In cylindrical coordinates $(r,\\phi,z)$, the integrand is [multiplied](https://en.wikipedia.org/wiki/Cylindrical_coordinate_system#Line_and_volume_elements) by the circumference $2\\pi r$, or equivalently the integral is over an annular volume. Second, for the case involving the $H_z$ source, both parallel ($E_{\\parallel}=E_{\\phi}$) and perpendicular ($\\varepsilon E_{\\perp}=D_r$) fields are present which must be included in the numerator as separate terms. Field values anywhere in the grid obtained with `get_field_point` are [automatically interpolated](https://meep.readthedocs.io/en/latest/Introduction/#the-illusion-of-continuity); i.e., no additional post-processing is necessary. Third, when comparing the perturbation-theory result to the finite-difference approximation, there are *two* convergence parameters: the resolution and $\\Delta r$. In principle, to demonstrate agreement with perturbation theory, the limit of the resolution should be taken to infinity and *then* the limit of $\\Delta r$ to 0. In practice, this can be obtained by doubling the resolution at a given $\\Delta r$ until it is sufficiently converged, then halving $\\Delta r$ and repeating.\n",
meep-1.16.1/python/examples/perturbation_theory.ipynb-295-    "\n",
##############################################
meep-1.16.1/python/examples/ring.ipynb-67-   "source": [
meep-1.16.1/python/examples/ring.ipynb:68:    "Later objects in the `geometry` object take precedence over or rather lie \"on top of\" earlier objects, so the second `air` ($\\epsilon$=1) cylinder cuts a circular hole out of the larger cylinder, leaving a ring of width `w`.\n",
meep-1.16.1/python/examples/ring.ipynb-69-    "\n",
##############################################
meep-1.16.1/python/examples/stochastic_emitter.ipynb-14-    "\n",
meep-1.16.1/python/examples/stochastic_emitter.ipynb:15:    "One can take two different approaches to computing the radiated flux based on the type of emitter: (1) random or (2) deterministic. In Method 1 (brute-force Monte-Carlo), each emitter is a white-noise dipole: every timestep for every dipole is an independent random number. A single run involves all $N$ dipoles which are modeled using a `CustomSource`. The stochastic results for the radiated flux are averaged over multiple trials/iterations via [Monte-Carlo sampling](https://en.wikipedia.org/wiki/Monte_Carlo_method). Method 2 exploits the property of [linear time-invariance](https://en.wikipedia.org/wiki/Linear_time-invariant_system) of the materials/geometry and involves a sequence of $N$ separate runs each with a single deterministic dipole (i.e., pulse time profile, `GaussianSource`) at different positions in the emitting layer. Because dipoles at different positions are uncorrelated, the radiated flux from the ensemble is simply the average of all the individual iterations. The two approaches converge towards identical results, but Method 1 is more computationally expensive than Method 2 due to the much larger number of trials/iterations ($\\gg  N$) required to attain low noise variance.  (Even more sophisticated deterministic methods exist to reduce the number of separate simulations, especially at high resolutions; for example, replacing the point-dipole sources with a [rapidly converging set of smooth basis functions](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.81.012119), or fancier methods that exploit [trace-estimation methods](http://doi.org/10.1103/PhysRevB.92.134202) and/or transform volumetric sources to [surface sources](http://doi.org/10.1103/PhysRevB.88.054305).)\n",
meep-1.16.1/python/examples/stochastic_emitter.ipynb-16-    "\n",
##############################################
meep-1.16.1/python/examples/zone_plate.ipynb-119-   "source": [
meep-1.16.1/python/examples/zone_plate.ipynb:120:    "Note that the volume specified in `get_farfields` via `center` and `size` is in cylindrical coordinates. These points must therefore lie in the $\\phi = 0$ ($rz = xz$) plane. The fields $E$ and $H$ returned by `get_farfields` can be thought of as either cylindrical ($r$,$\\phi$,$z$) or Cartesian ($x$,$y$,$z$) coordinates since these are the same in the $\\phi = 0$ plane (i.e., $E_r=E_x$ and $E_\\phi=E_y$). Also, `get_farfields` tends to gradually *slow down* as the far-field point gets closer to the near-field monitor. This performance degradation is unavoidable and is due to the larger number of $\\phi$ integration points required for accurate convergence of the integral involving the Green's function which diverges as the evaluation point approaches the source point.\n",
meep-1.16.1/python/examples/zone_plate.ipynb-121-    "\n",
##############################################
meep-1.16.1/python/simulation.py-141-
meep-1.16.1/python/simulation.py:142:        + **`axis` [ `Vector3` ]** — The plane of incidence for each planewave (used to define the $\\mathcal{S}$ and $\\mathcal{P}$ polarizations below) is defined to be the plane that contains the `axis` vector and the planewave's wavevector. If `None`, `axis` defaults to the first direction that lies in the plane of the monitor or source (e.g., $y$ direction for a $yz$ plane in 3d, either $x$ or $y$ in 2d).
meep-1.16.1/python/simulation.py-143-
##############################################
meep-1.16.1/python/simulation.py-303-
meep-1.16.1/python/simulation.py:304:    **`Rotate2`** — A 180° (twofold) rotational symmetry (a.k.a. $C_2$). `direction` is
meep-1.16.1/python/simulation.py-305-    the axis of the rotation.
meep-1.16.1/python/simulation.py-306-
meep-1.16.1/python/simulation.py:307:    **`Rotate4`** — A 90° (fourfold) rotational symmetry (a.k.a. $C_4$). `direction` is
meep-1.16.1/python/simulation.py-308-    the axis of the rotation.
##############################################
meep-1.16.1/python/simulation.py-4410-    dielectric-function `.h5` file which must have been previously output by
meep-1.16.1/python/simulation.py:4411:    `output_epsilon`. To make this easier, a built-in shell variable `$EPS` is provided
meep-1.16.1/python/simulation.py-4412-    which refers to the last-output dielectric-function `.h5` file. So, for example
meep-1.16.1/python/simulation.py:4413:    `output_png(mp.Ez,"-C $EPS")` will output the $E_z$ field and overlay the dielectric
meep-1.16.1/python/simulation.py-4414-    contours.
##############################################
meep-1.16.1/python/source.py-234-          where $G(t)$ is the current (not the dipole moment). In this formula, $\\Delta f$
meep-1.16.1/python/source.py:235:          is the `fwidth` of the source, $\\omega_0$ is $2\\pi$ times its `frequency,` and
meep-1.16.1/python/source.py-236-          $t_0$ is the peak time discussed above. Note that this does not include any
##############################################
meep-1.16.1/python/source.py-534-    """
meep-1.16.1/python/source.py:535:    This is a subclass of `Source` and has **all of the properties** of `Source` above. However, the `component` parameter of the `Source` object is ignored. The [Gaussian beam](https://en.wikipedia.org/wiki/Gaussian_beam) is a transverse electromagnetic mode for which the source region must be a *line* (in 2d) or *plane* (in 3d). For a beam polarized in the $x$ direction with propagation along $+z$, the electric field is defined by $\\mathbf{E}(r,z)=E_0\\hat{x}\\frac{w_0}{w(z)}\\exp\\left(\\frac{-r^2}{w(z)^2}\\right)\\exp\\left(-i\\left(kz + k\\frac{r^2}{2R(z)}\\right)\\right)$ where $r$ is the radial distance from the center axis of the beam, $z$ is the axial distance from the beam's focus (or "waist"), $k=2\\pi n/\\lambda$ is the wavenumber (for a free-space wavelength $\\lambda$ and refractive index $n$ of the homogeneous, lossless medium in which the beam propagates), $E_0$ is the electric field amplitude at the origin, $w(z)$ is the radius at which the field amplitude decays by $1/e$ of its axial values, $w_0$ is the beam waist radius, and $R(z)$ is the radius of curvature of the beam's wavefront at $z$. The only independent parameters that need to be specified are $w_0$, $E_0$, $k$, and the location of the beam focus (i.e., the origin: $r=z=0$).
meep-1.16.1/python/source.py-536-
##############################################
meep-1.16.1/debian/missing-sources/highlight.js-322-        r: 0
meep-1.16.1/debian/missing-sources/highlight.js:323:    }, e.ASM = {
meep-1.16.1/debian/missing-sources/highlight.js-324-        cN: "string",
##############################################
meep-1.16.1/debian/missing-sources/highlight.js-387-        i = {
meep-1.16.1/debian/missing-sources/highlight.js:388:            keyword: "int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required",
meep-1.16.1/debian/missing-sources/highlight.js-389-            literal: "false true FALSE TRUE nil YES NO NULL",
##############################################
meep-1.16.1/debian/missing-sources/highlight.js-666-    var r = {
meep-1.16.1/debian/missing-sources/highlight.js:667:            keyword: "abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",
meep-1.16.1/debian/missing-sources/highlight.js-668-            built_in: "bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",
##############################################
meep-1.16.1/debian/missing-sources/highlight.js-1991-hljs.registerLanguage("delphi", function (e) {
meep-1.16.1/debian/missing-sources/highlight.js:1992:    var r = "exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure",
meep-1.16.1/debian/missing-sources/highlight.js-1993-        t = [e.CLCM, e.C(/\{/, /\}/, {
##############################################
meep-1.16.1/debian/missing-sources/highlight.js-3655-        k: {
meep-1.16.1/debian/missing-sources/highlight.js:3656:            keyword: "addr and as asm bind block break|0 case|0 cast const|0 continue|0 converter discard distinct|10 div do elif else|0 end|0 enum|0 except export finally for from generic if|0 import|0 in include|0 interface is isnot|10 iterator|10 let|0 macro method|10 mixin mod nil not notin|10 object|0 of or out proc|10 ptr raise ref|10 return shl shr static template|10 try|0 tuple type|0 using|0 var|0 when while|0 with without xor yield",
meep-1.16.1/debian/missing-sources/highlight.js-3657-            literal: "shared guarded stdin stdout stderr result|10 true false"
##############################################
meep-1.16.1/debian/missing-sources/highlight.js-4507-    var i = {
meep-1.16.1/debian/missing-sources/highlight.js:4508:        keyword: "false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary intmax_t uintmax_t int8_t uint8_t int16_t uint16_t int32_t uint32_t  int64_t uint64_t int_least8_t uint_least8_t int_least16_t uint_least16_t int_least32_t uint_least32_t int_least64_t uint_least64_t int_fast8_t uint_fast8_t int_fast16_t uint_fast16_t int_fast32_t uint_fast32_t int_fast64_t uint_fast64_t intptr_t uintptr_t atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong atomic_wchar_t atomic_char16_t atomic_char32_t atomic_intmax_t atomic_uintmax_t atomic_intptr_t atomic_uintptr_t atomic_size_t atomic_ptrdiff_t atomic_int_least8_t atomic_int_least16_t atomic_int_least32_t atomic_int_least64_t atomic_uint_least8_t atomic_uint_least16_t atomic_uint_least32_t atomic_uint_least64_t atomic_int_fast8_t atomic_int_fast16_t atomic_int_fast32_t atomic_int_fast64_t atomic_uint_fast8_t atomic_uint_fast16_t atomic_uint_fast32_t atomic_uint_fast64_t",
meep-1.16.1/debian/missing-sources/highlight.js-4509-        built_in: "std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf"
##############################################
meep-1.16.1/debian/missing-sources/jquery-2.1.1.js-1731-                    else if (cb.test(e)) {
meep-1.16.1/debian/missing-sources/jquery-2.1.1.js:1732:                f = f || k.appendChild(b.createElement("div")), g = (bb.exec(e) || ["", ""])[1].toLowerCase(), h = ib[g] || ib._default, f.innerHTML = h[1] + e.replace(ab, "<$1></$2>") + h[2], j = h[0];
meep-1.16.1/debian/missing-sources/jquery-2.1.1.js-1733-                while (j--) f = f.lastChild;
##############################################
meep-mpi-default-1.12.0/configure.ac-282-else
meep-mpi-default-1.12.0/configure.ac:283:  GUILE_LIBS=`$GUILE_CONFIG link`
meep-mpi-default-1.12.0/configure.ac:284:  GUILE_CPPFLAGS=`$GUILE_CONFIG compile`
meep-mpi-default-1.12.0/configure.ac-285-  CPPFLAGS="$CPPFLAGS $GUILE_CPPFLAGS"
##############################################
meep-mpi-default-1.12.0/configure.ac-533-      AC_MSG_CHECKING([for Python include directory])
meep-mpi-default-1.12.0/configure.ac:534:      pinc=`echo "import distutils.sysconfig; print (distutils.sysconfig.get_python_inc())" | $PYTHON - 2>/dev/null`
meep-mpi-default-1.12.0/configure.ac-535-      AC_MSG_RESULT([${pinc:-unknown}])
##############################################
meep-mpi-default-1.12.0/configure.ac-543-        AC_MSG_CHECKING([for Numpy include directory])
meep-mpi-default-1.12.0/configure.ac:544:        pinc=`echo "import numpy; print (numpy.get_include())" | $PYTHON - 2>/dev/null`
meep-mpi-default-1.12.0/configure.ac-545-        AC_MSG_RESULT([${pinc:-unknown}])
##############################################
meep-mpi-default-1.12.0/doc/docs/Build_From_Source.md-19-
meep-mpi-default-1.12.0/doc/docs/Build_From_Source.md:20:Most of the software below, including Meep, installs under `/usr/local` by default. That is, libraries go in `/usr/local/lib`, programs in `/usr/local/bin`, etc. If you don't have `root` privileges on your machine, you may need to install somewhere else, e.g. under `$HOME/install` (the `install/` subdirectory of your home directory). Most of the programs below use a GNU-style `configure` script, which means that all you would do to install there would be:
meep-mpi-default-1.12.0/doc/docs/Build_From_Source.md-21-
##############################################
meep-mpi-default-1.12.0/doc/docs/Build_From_Source.md-25-
meep-mpi-default-1.12.0/doc/docs/Build_From_Source.md:26:when configuring the program. The directories `$HOME/install/lib` etc. are created automatically as needed.
meep-mpi-default-1.12.0/doc/docs/Build_From_Source.md-27-
##############################################
meep-mpi-default-1.12.0/doc/docs/Build_From_Source.md-29-
meep-mpi-default-1.12.0/doc/docs/Build_From_Source.md:30:There are two further complications. First, if you install dependencies in a non-standard location like `$HOME/install/lib`, you will need to tell the compilers where to find the libraries and header files that you installed. You do this by passing two variables to `./configure`:
meep-mpi-default-1.12.0/doc/docs/Build_From_Source.md-31-
##############################################
meep-mpi-default-1.12.0/doc/docs/Build_From_Source.md-48-
meep-mpi-default-1.12.0/doc/docs/Build_From_Source.md:49:There are several ways to do this.  Suppose that you installed libraries into the directory `$HOME/install/lib`.   The most robust option is probably to include this path in the linker flags:
meep-mpi-default-1.12.0/doc/docs/Build_From_Source.md-50-
##############################################
meep-mpi-default-1.12.0/doc/docs/Build_From_Source.md-56-
meep-mpi-default-1.12.0/doc/docs/Build_From_Source.md:57:On many systems, you can also specify directories to the runtime linker via the `LD_LIBRARY_PATH` environment variable. In particular, by `export LD_LIBRARY_PATH="$HOME/install/lib:$LD_LIBRARY_PATH"`; you can add this to your `.profile` file (depending on your shell) to make it run every time you run your shell. On MacOS, a security feature called [System Integrity Protection](https://en.wikipedia.org/wiki/System_Integrity_Protection) causes the value of `LD_LIBRARY_PATH` to be ignored, so using environment variables won't work there.
meep-mpi-default-1.12.0/doc/docs/Build_From_Source.md-58-
##############################################
meep-mpi-default-1.12.0/doc/docs/Exploiting_Symmetry.md-45-
meep-mpi-default-1.12.0/doc/docs/Exploiting_Symmetry.md:46:In a cylindrical simulation, fields can be written in the form of a function of ($r$,$z$) multiplied by a function $\exp(im\phi)$ for the $\phi$ dependence, where $m$ is a user-specified parameter (related to the angular momentum of the field). If the cell includes the $r$=0 origin, then $m$ must be an integer to be single-valued at the origin. Otherwise, $m$ can be arbitrary (this is useful e.g. for bend simulations).
meep-mpi-default-1.12.0/doc/docs/Exploiting_Symmetry.md-47-
##############################################
meep-mpi-default-1.12.0/doc/docs/FAQ.md-483-
meep-mpi-default-1.12.0/doc/docs/FAQ.md:484:To model e.g., fiber waveguides with 2d claddings, diffractive binary gratings with arbitrary incident planewaves in 3d, etc. in Cartesian coordinates, you would create a 2d cell in the $xy$ plane and specify a `k_point` with *non-zero* component in $z$. The resulting 3d simulation involves all electromagnetic fields (rather than a 2d simulation which involves a subset of the fields determined by the polarization of the current source). Performance can be improved by specifying `special_kz=True` in the `Simulation` constructor; this results in a 2d simulation with real rather than complex fields (as long as the $x$ and $y$ components of `k_point` are zero).
meep-mpi-default-1.12.0/doc/docs/FAQ.md-485-
##############################################
meep-mpi-default-1.12.0/doc/docs/Guile_and_Scheme_Information.md-83-
meep-mpi-default-1.12.0/doc/docs/Guile_and_Scheme_Information.md:84:``for x in `seq a dx b`; do meep x=$x myfile.ctl; done``
##############################################
meep-mpi-default-1.12.0/doc/docs/Introduction.md-51-
meep-mpi-default-1.12.0/doc/docs/Introduction.md:52:For example, suppose we are describing some photonic structure at [infrared](https://en.wikipedia.org/wiki/Infrared) frequencies, where it is convenient to specify distances in [microns](https://en.wikipedia.org/wiki/Micrometre). Thus, we let $a$ = 1 μm. Then, if we want to specify a source corresponding to λ = 1.55 μm, we specify the frequency *f* as 1/1.55 = 0.6452. If we want to run our simulation for 100 periods, we then run it for 155 time units (= 100/*f*). At a grid resolution ($Δx$) of 10 pixels/μm and [Courant factor](https://en.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E2%80%93Lewy_condition) ($S$) of 0.5, one timestep is 0.05 time units or 166.67 μs ($cΔ t = SΔ x$).
meep-mpi-default-1.12.0/doc/docs/Introduction.md-53-
##############################################
meep-mpi-default-1.12.0/doc/docs/Introduction.md-62-
meep-mpi-default-1.12.0/doc/docs/Introduction.md:63:With ordinary [periodic boundaries](FAQ.md#how-does-k_point-define-the-phase-relation-between-adjacent-unit-cells) in a cell of size $L$, the field components satisfy $f(x+L) = f(x)$. **Bloch periodicity** is a generalization where $f(x+L) = e^{ik_x L} f(x)$ for some *Bloch wavevector* $\mathbf{k}$. This can be used to solve for the modes of waveguides, gratings, and so on, much like in [MPB](https://mpb.readthedocs.io). See Chapter 3 of [Photonic Crystals: Molding the Flow of Light (second edition)](http://ab-initio.mit.edu/book).
meep-mpi-default-1.12.0/doc/docs/Introduction.md-64-
##############################################
meep-mpi-default-1.12.0/doc/docs/Materials.md-33-
meep-mpi-default-1.12.0/doc/docs/Materials.md:34:where σ$_D$ is the electric conductivity, ω$_n$ and γ$_n$ are user-specified constants. Actually, the numbers that one specifies are f$_n$ = ω$_n$/2π and γ$_n$/2π. The  σ$_n(\mathbf{x})$ is a user-specified function of position giving the strength of the *n*-th resonance. The σ parameters can be anisotropic (real-symmetric) tensors, while the frequency-independent term ε$_\infty$ can be an arbitrary real-symmetric tensor as well. This corresponds to evolving **P** via the equations:
meep-mpi-default-1.12.0/doc/docs/Materials.md-35-
##############################################
meep-mpi-default-1.12.0/doc/docs/Materials.md-59-
meep-mpi-default-1.12.0/doc/docs/Materials.md:60:where λ is the vacuum wavelength, each term containing two coefficients (B<sub>n</sub> and C<sub>n</sub>) can be directly transferred to a Lorentzian polarization field using a simple substitution of variables: ω<sub>n</sub>=1/$\sqrt{C_n}$, γ<sub>n</sub>=0, and σ<sub>n</sub>=B<sub>n</sub>. Several examples of importing Sellmeier coefficients from published fitting data including [germanium](https://github.com/NanoComp/meep/blob/master/python/materials.py#L870-L886) (Ge) and [gallium nitride](https://github.com/NanoComp/meep/blob/master/python/materials.py#L1148-L1173) (GaN) are provided in the [Materials Library](#materials-library).
meep-mpi-default-1.12.0/doc/docs/Materials.md-61-
##############################################
meep-mpi-default-1.12.0/doc/docs/Materials.md-96-
meep-mpi-default-1.12.0/doc/docs/Materials.md:97:**Note**: the "conductivity" in Meep is slightly different from the conductivity you might find in a textbook, because for computational convenience it appears as $\sigma_D \mathbf{D}$ in our Maxwell equations rather than the more-conventional $\sigma \mathbf{E}$; this just means that our definition is different from the usual electric conductivity by a factor of ε. Also, just as Meep uses the dimensionless relative permittivity for ε, it uses nondimensionalized units of 1/*a* (where *a* is your unit of distance) for the conductivities $\sigma_{D,B}$. If you have the electric conductivity $\sigma$ in SI units and want to convert to $\sigma_D$ in Meep units, you can simply use the formula: $\sigma_D = (a/c) \sigma / \varepsilon_r \varepsilon_0$ where *a* is your unit of distance in meters, *c* is the vacuum speed of light in m/s, $\varepsilon_0$ is the SI vacuum permittivity, and $\varepsilon_r$ is the real relative permittivity.
meep-mpi-default-1.12.0/doc/docs/Materials.md-98-
##############################################
meep-mpi-default-1.12.0/doc/docs/Materials.md-133-
meep-mpi-default-1.12.0/doc/docs/Materials.md:134:where $\Delta N(\mathbf{x},t) = N_{\textrm{upper}} - N_{\textrm{lower}}$ is the inversion of the two atomic energy levels which comprise the $n$th lasing transition, $\omega_n$ is the central frequency of the atomic transition, $\Gamma_n$ is the full width half-maximum of the width of the transition, and $\boldsymbol{\sigma}_n$ is the strength and orientation of the $n$th transition which couples the electric field and the atomic medium. Note that this polarization equation is only modeling the nonlinear, saturable portion of the polarization. The atomic level population densities, $N_i(\mathbf{x},t)$, each satisfy a rate equation of the form:
meep-mpi-default-1.12.0/doc/docs/Materials.md-135-
##############################################
meep-mpi-default-1.12.0/doc/docs/Mode_Decomposition.md-66-
meep-mpi-default-1.12.0/doc/docs/Mode_Decomposition.md:67:+ `parity` is the parity of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry in the source region. If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `ODD_Z+EVEN_Y`. This is especially useful in 2d simulations to restrict yourself to a desired polarization
meep-mpi-default-1.12.0/doc/docs/Mode_Decomposition.md-68-
##############################################
meep-mpi-default-1.12.0/doc/docs/Mode_Decomposition.md-72-
meep-mpi-default-1.12.0/doc/docs/Mode_Decomposition.md:73:+ `coeffs` is a user-allocated array of type `std::complex<double>` (shortened hereafter to `cdouble`) of length `2*num_freqs*num_bands` where `num_freqs` is the number of frequencies stored in the `flux` object (equivalent to `flux->Nfreq`) and `num_bands` is the length of the `bands` input array. The expansion coefficients for the mode with frequency `nf` and band index `nb`  are stored sequentially as α$^+$, α$^-$ starting at slot `2*nb*num_freqs+nf` of this array
meep-mpi-default-1.12.0/doc/docs/Mode_Decomposition.md-74-
##############################################
meep-mpi-default-1.12.0/doc/docs/Mode_Decomposition.md-86-
meep-mpi-default-1.12.0/doc/docs/Mode_Decomposition.md:87:+ `kdom_list` is a user allocated array of `meep::vec` objects of length (`num_bands` * `num_freqs`). If non-null, this array is filled in with the wavevectors of the dominant planewave in the Fourier series expansion for each band from 1 to (`num_bands` * `num_freqs`). `kdom_list[nb*num_freqs + nf]` is the dominant planewave of the mode with frequency `nf` and band index `nb`. (Defaults to `NULL`.)  This is especially useful for interpreting the modes computed in a uniform medium, because those modes are exactly planewaves proportional to $exp(2\pi i \mathrm{kdom}\cdot \vec{x})$ where `kdom` is the wavevector.
meep-mpi-default-1.12.0/doc/docs/Mode_Decomposition.md-88-
##############################################
meep-mpi-default-1.12.0/doc/docs/Mode_Decomposition.md-203-
meep-mpi-default-1.12.0/doc/docs/Mode_Decomposition.md:204:where $S$ is any surface transverse to the direction of propagation and $\hat{\mathbf{n}}$ is the unit normal vector to $S$ (i.e. $\hat{\mathbf{z}}$ in the case considered above). The normalization constant $C_{m}$ is a matter of convention, but in MPB it is taken to be the group velocity of the mode, $v_m$, times the area $A_S$ of the cross-sectional surface $S$: $$C_m = v_m A_S$$.
meep-mpi-default-1.12.0/doc/docs/Mode_Decomposition.md-205-
##############################################
meep-mpi-default-1.12.0/doc/docs/Perfectly_Matched_Layer.md-27-
meep-mpi-default-1.12.0/doc/docs/Perfectly_Matched_Layer.md:28:For sources extending into the PML, such as planewaves which must span the entire width of the cell with Bloch-periodic boundary conditions (see e.g. [Tutorials/Basics/Mie Scattering of a Lossless Dielectric Sphere](Python_Tutorials/Basics.md#mie-scattering-of-a-lossless-dielectric-sphere)), the `is_integrated` parameter of the `Source` object must be set to `True` in order to generate planar wavefronts. This is demonstrated in the following example for an $E_z$-polarized planewave propagating in the $x$ direction in a 2d cell surrounded by PML. A side-by-side comparison of the $E_z$ field profile indicates that the wavefronts are not planar for `is_integrated=False` (the default).
meep-mpi-default-1.12.0/doc/docs/Perfectly_Matched_Layer.md-29-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Basics.md-51-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Basics.md:52:The waveguide is specified by a `Block` (parallelepiped) of size $\infty \times 1 \times \infty$, with $ε=12$, centered at (0,0) which is the center of the cell. By default, any place where there are no objects there is air ($ε=1$), although this can be changed by setting the `default_material` variable. The resulting structure is shown below.
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Basics.md-53-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Basics.md-63-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Basics.md:64:We gave the source a frequency of 0.15, and specified a [`ContinuousSource`](../Python_User_Interface.md#continuoussource) which is just a fixed-frequency sinusoid $\exp(-i \omega t)$ that by default is turned on at $t=0$. Recall that, in [Meep units](../Introduction.md#units-in-meep), frequency is specified in units of 2πc, which is equivalent to the inverse of the vacuum wavelength. Thus, 0.15 corresponds to a vacuum wavelength of about 1/0.15=6.67 μm, or a wavelength of about 2 μm in the ε=12 material &mdash; thus, our waveguide is half a wavelength wide, which should hopefully make it single mode. In fact, the cutoff for single-mode behavior in this waveguide is analytically solvable, and corresponds to a frequency of 1/2√11 or roughly 0.15076. Note also that to specify a J<sub>z</sub>, we specify a component `Ez` (e.g., if we wanted a magnetic current, we would specify `Hx`, `Hy`, or `Hz`). The current is located at (-7,0), which is 1 μm to the right of the left edge of the cell &mdash; we always want to leave a little space between sources and the cell boundaries, to keep the boundary conditions from interfering with them.
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Basics.md-65-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Basics.md-806-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Basics.md:807:The signal processing is performed by the `Harminv` routine, which takes four arguments: the field component E<sub>z</sub> and position ($r$+0.1,0) to analyze, and a frequency range given by a center frequency and bandwidth (same as the source pulse). Note that we wrap `Harminv` in `after_sources(...)`, since we only want to analyze the frequencies in the source-free system (the presence of a source will distort the analysis). At the end of the run, `Harminv` prints a series of lines (beginning with `harminv0:`) listing the frequencies it found:
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Basics.md-808-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Eigenmode_Source.md-164-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Eigenmode_Source.md:165:Note that this example involves a `ContinuousSource` for the time profile. For a pulsed source, the oblique planewave is incident at a given angle for only a *single* frequency component of the source. This is a fundamental feature of FDTD simulations and not of Meep per se. Thus, to simulate an incident planewave at multiple angles for a given frequency ω, you will need to do separate simulations involving different values of $\vec{k}$ (`k_point`) since each set of ($\vec{k}$,ω) specifying the Bloch-periodic boundaries and the frequency of the source will produce a different angle of the planewave. For more details, refer to Section 4.5 ("Efficient Frequency-Angle Coverage") in [Chapter 4](https://arxiv.org/abs/1301.5366) ("Electromagnetic Wave Source Conditions") of [Advances in FDTD Computational Electrodynamics: Photonics and Nanotechnology](https://www.amazon.com/Advances-FDTD-Computational-Electrodynamics-Nanotechnology/dp/1608071707).
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Eigenmode_Source.md-166-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/GDSII_Import.md-152-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/GDSII_Import.md:153:For a given waveguide separation distance (`d`), the simulation computes the transmittance of Ports 2, 3, and 4. The transmittance is the square of the [S-parameter](https://en.wikipedia.org/wiki/Scattering_parameters) which is equivalent to the [mode coefficient](Mode_Decomposition.md). There is an additional mode monitor at Port 1 to compute the input power from the adjacent eigenmode source; this is used for normalization when computing the transmittance. The eight layers of the GDSII file are each converted to a `Simulation` object: the upper and lower branches of the coupler are defined as a collection of [`Prism`](../Python_User_Interface.md#prism)s, the rectilinear regions of the source and flux monitor as a [`Volume`](../Python_User_Interface.md#volume) and [`FluxRegion`](../Python_User_Interface.md#fluxregion). The size of the cell in the $y$ direction is dependent on `d`. The default dimensionality is 2d. An optional input parameter (`three_d`) converts the geometry to 3d by extruding the coupler geometry in the *z* direction and adding an oxide layer beneath similar to a [silicon on insulator](https://en.wikipedia.org/wiki/Silicon_on_insulator) (SOI) substrate. A schematic of the coupler design in 3d generated using MayaVi is shown below.
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/GDSII_Import.md-154-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Local_Density_of_States.md-14-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Local_Density_of_States.md:15:where $Q^{(n)}=\omega^{(n)}/2\gamma^{(n)}$ is the dimensionless [quality factor](https://en.wikipedia.org/wiki/Q_factor) and $V^{(n)}$ is the modal volume. This represents another way to compute the LDOS. In this tutorial, we will verify this expression by comparing it to the earlier one.
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Local_Density_of_States.md-16-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Local_Density_of_States.md-18-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Local_Density_of_States.md:19:We will validate both this prediction and the LDOS calculations above by computing the LDOS at the center of the cavity, the point of peak $|\vec{E}|$, in two ways. First, we compute the LDOS directly from the power radiated by a dipole, Fourier-transforming the result of a pulse using the `dft_ldos` command. Second, we compute the cavity mode and its lifetime $Q$ using `Harminv` and then compute the LDOS by the Purcell formula shown above. The latter technique is much more efficient for high Q (small $w$), since one must run the simulation for a very long time to directly accumulate the Fourier transform of a slowly-decaying mode. The two calculations, we will demonstrate, agree to within discretization error, verifying the LDOS analysis above, and $Q/V$ is asymptotically linear on a semilog scale versus $1/w$ as predicted.
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Local_Density_of_States.md-20-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Material_Dispersion.md-161-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Material_Dispersion.md:162:The `run_k_points` function returns a *list of lists* of frequencies &mdash; one list of complex frequencies for each *k* point &mdash; which we store in the `all_freqs` variable. Finally, we want to loop over this list and print out the corresponding ε via the ratio (ck/ω)$^2$ as described above. To do this, we will use Python's `zip` function which combines multiple lists into one:
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Material_Dispersion.md-163-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Mode_Decomposition.md-249-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Mode_Decomposition.md:250:Note the use of the keyword parameter argument `eig_parity=mp.ODD_Z+mp.EVEN_Y` in the call to `get_eigenmode_coefficients`. This is important for specifying **non-degenerate** modes in MPB since the `k_point` is (0,0,0). `ODD_Z` is for modes with $E_z$ polarization. `EVEN_Y` is necessary since each diffraction order which is based on a given k<sub>x</sub> consists of *two* modes: one going in the +y direction and the other in the -y direction. `EVEN_Y` forces MPB to compute only the +k<sub>y</sub> + -k<sub>y</sub> (cosine) mode. As a result, the total transmittance must be halved in this case to obtain the transmittance for the individual +k<sub>y</sub> or -k<sub>y</sub> mode. For `ODD_Y`, MPB will compute the +k<sub>y</sub> - -k<sub>y</sub> (sine) mode but this will have zero power because the source is even. If the $y$ parity is left out, MPB will return a random superposition of the cosine and sine modes. Alternatively, in this example an input planewave with H<sub>z</sub> instead of $E_z$ polarization can be used which requires `eig_parity=mp.EVEN_Z+mp.ODD_Y` as well as an odd mirror symmetry plane in *y*. Finally, note the use of `add_flux` instead of `add_mode_monitor` when using symmetries.
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Mode_Decomposition.md-251-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md-92-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md:93:For the second of two cases, we use the `get_farfield` routine to compute the far fields by looping over a set of 100 equally-spaced points along the circumference of a circle with radius of 1 mm. The six far field components ($E_x$, $E_y$, $E_z$, $H_x$, $H_y$, $H_z$) are stored as separate arrays of complex numbers. From the far fields at each point $\mathbf{r}$, we compute the outgoing or radial flux: $\sqrt{P_x^2+P_y^2}$, where $P_x$ and $P_y$ are the components of the Poynting vector $\mathbf{P}(\mathbf{r})=(P_x,P_y,P_z)=\mathrm{Re}\, \mathbf{E}(\mathbf{r})^*\times\mathbf{H}(\mathbf{r})$. Note that $P_z$ is always 0 since this is a 2d simulation. The total flux is computed and the three flux values are displayed.
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md-94-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Optical_Forces.md-117-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Optical_Forces.md:118:There are two important items to note in `parallel_waveguide`: (1) a single flux surface is used to compute the Poynting flux in $z$ which spans an area slightly larger than both waveguides rather than two separate flux surfaces (one for each waveguide). This is because in the limit of small separation, two flux surfaces overlap whereas the total power through a single flux surface need, by symmetry, only be halved in order to determine the value for just one of the two waveguides. (2) Instead of defining a closed, four-sided "box" surrounding the waveguides, the MST is computed along just two $y$-oriented lines (to obtain the force in the $x$ direction) with different `weight` values to correctly sum the total force. By symmetry, the force in the $y$ direction is zero and need not be computed. Choosing a suitable runtime requires some care. A large runtime is necessary to obtain the steady-state response but this will also lead to large values for the discrete Fourier-transformed fields used to compute both the flux and the MST. Large floating-point numbers may contain [roundoff errors](https://en.wikipedia.org/wiki/Round-off_error).
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Optical_Forces.md-119-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-88-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:89:The source will now be the usual Gaussian pulse centered at `fcen`, located at one edge of the cell just outside the PML, at `x = - 0.5 * sx + dpml`. Ideally, we would excite exactly the fundamental mode of the waveguide, but it is good enough to just excite it with a line source. Moreover, since we are interested in the $P$ polarization (electric field in the plane), we will excite it with a $J_y$ current source (transverse to the propagation direction), which is specified as `Ey`:
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-90-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-277-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:278:The results, shown above, are exactly what we expected: at first, an exponential increase of $Q$ with `N`, and then a saturation at $Q_r \approx 8750$. However, when we look at the Harminv output for larger `N`, something strange happens &mdash; it starts to find *more modes*! For example, at `N=16`, the output is:
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-279-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-306-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:307:Let us briefly review the problem. In a periodic system of this sort, the eigen-solutions can be expressed in the form of *Bloch modes*: a periodic *Bloch envelope* multiplied by a planewave $\exp[i(\mathbf{k}\cdot\mathbf{x}-ω t)]$, where **k** is the *Bloch wavevector*. We wish to find the *bands* $ω(\mathbf{k})$. In this case, there is only *one* direction of periodicity, so we only have one wavevector component $k_x$. Moreover, the solutions are periodic functions of this wavevector: for a unit-period structure, $k_x$ and $k_x+2\pi$ are redundant. Also, $k_x$ and $-k_x$ are redundant by time-reversal symmetry, so we only need to look for solutions in the *irreducible Brillouin zone* from $k_x=0$ to $k_x=\pi$.
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-308-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-374-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:375:Here, we have used Meep's built-in `interpolate` function to interpolate a set of 19 $\mathbf{k}$ points between $\mathbf{k} = 0$ and $\mathbf{k} = 0.5 \cdot 2π \hat{\mathbf{x}}$, to cover the irreducible Brillouin zone. This function automatically runs Harminv, using the frequency range and location taken from the Gaussian source in the `sources` list. It also calls `output_epsilon`. The output is not only the usual `harminv:` lines, but it also outputs a series of lines like:
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-376-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-38-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md:39:The key thing is to set the `dimensions` parameter to `CYLINDRICAL`. This means that all vectors will represent ($r$,φ,$z$) coordinates instead of ($x$,$y$,$z$). The computational cell in the $r$ direction is of size `sr = r + w + pad + dpml`, and runs from `0` to `sr` (by default) rather than from `-sr/2` to `sr/2` as it would for any other dimension. Note that our $z$ size is 0 because it is in 2d. The φ size is also 0, corresponding to the continuous rotational symmetry. A finite φ size might correspond to discrete rotational symmetry, but this is not currently supported.
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-40-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-86-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md:87:At the very end, we'll also output one period of the fields to make movies, etcetera. A single field output would be a 1d dataset along the $r$ direction, so to make things more interesting we'll use `to_appended` to append these datasets to a single HDF5 file to get an $r \times t$ 2d dataset. We'll also use `in_volume` to specify a larger output volume than just the computational cell: in particular, we'll output from `-sr` to `sr` in the $r$ direction, where Meep will automatically infer the $-r$ field values from the reflection symmetry.
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-88-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-133-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md:134:The problem is twofold. First, there is some signal-processing error in determining $Q$ in the 2d case, as indicated by the "error" column of the `harminv` output which is only 4e-7 for the 2d simulation vs. 6e-11 for the cylindrical case. We can bring this error down by running with a narrower bandwidth source, which excites just one mode and gives a cleaner signal, or by analyzing over a longer time than 200. Doing the former, we find that the 2d value of $Q$ at a resolution of 20 should really be $Q$=343. Second, [PML](../Perfectly_Matched_Layer.md) absorbing layers are really designed to absorb planewaves incident on flat interfaces, but here we have a *cylindrical* PML layer. Because of this, there are larger numerical reflections from the PML in the cylindrical simulation, which we can rectify by pushing the PML out to a larger radius (i.e. using a larger value of `pad`) and/or increasing the PML thickness (increasing `dpml`) so that it turns on more adiabatically. In the cylindrical simulation for `resolution = 20`, if we increase to `dpml = 16`, we get $Q$=343, which is in much better agreement with the 2d calculation and if we increase to `dpml = 32` we get the same $Q$=343, so it seems to be converged.
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-135-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md-6-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md:7:Since this is a 1d calculation, we could implement it via a 2d cell of `Vector3(S,0,0)`, specifying periodic boundary conditions in the $y$ direction. However, this is slightly inefficient since the $y$ periodic boundaries are implemented internally via extra "ghost pixels" in the $y$ direction. Instead, Meep has special support for 1d simulations in the $z$ direction. To use this, we must explicitly set `dimensions` to `1`, and in that case we can *only* use $E_x$ (and $D_x$) and $H_y$ field components. This involves no loss of generality because of the symmetry of the problem.
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md-8-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md-98-
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md:99:We could print these with more `display_fluxes` lines, but it is nice to print these on a single line along with χ$^{(3)}$ and the amplitude, so that we can eventually put them all into one table in our plotting program. To do this, we'll use the lower-level function `get_fluxes(trans1)`, which returns a list of the flux values, and take the first element of the list since there is only one:
meep-mpi-default-1.12.0/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md-100-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-97-meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:98:Explicitly specifies the dimensionality of the simulation, if the value is less than 3. If the value is 3 (the default), then the dimensions are automatically reduced to 2 if possible when `cell_size` in the $z$ direction is `0`. If `dimensions` is the special value of `CYLINDRICAL`, then cylindrical coordinates are used and the $x$ and $z$ dimensions are interpreted as $r$ and $z$, respectively. If `dimensions` is 1, then the cell must be along the $z$ direction and only $E_x$ and $H_y$ field components are permitted. If `dimensions` is 2, then the cell must be in the $xy$ plane.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-99-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-101-meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:102:For `CYLINDRICAL` simulations, specifies that the angular $\phi$ dependence of the fields is of the form $e^{im\phi}$ (default is `m=0`). If the simulation cell includes the origin $r=0$, then `m` must be an integer.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-103-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-105-meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:106:For `CYLINDRICAL` simulations with |*m*| &gt; 1, compute more accurate fields near the origin $r=0$ at the expense of requiring a smaller Courant factor. Empirically, when this option is set to `True`, a Courant factor of roughly $\min[0.5, 1 / (|m| + 0.5)]$ or smaller seems to be needed. Default is `False`, in which case the $D_r$, $D_z$, and $B_r$ fields within |*m*| pixels of the origin are forced to zero, which usually ensures stability with the default Courant factor of 0.5, at the expense of slowing convergence of the fields near $r=0$.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-107-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-113-meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:114:If `False` (the default), then the boundaries are perfect metallic (zero electric field). If a `Vector3`, then the boundaries are Bloch-periodic: the fields at one side are $\exp(i\mathbf{k}\cdot\mathbf{R})$ times the fields at the other side, separated by the lattice vector $\mathbf{R}$. A non-zero `Vector3` will produce complex fields. The `k_point` vector is specified in Cartesian coordinates in units of 2π/distance. Note: this is *different* from [MPB](https://mpb.readthedocs.io), equivalent to taking MPB's `k_points` through its function `reciprocal->cartesian`.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-115-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-117-meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:118:A 2d cell (i.e., `dimensions=2`) combined with a `k_point` that has a *non-zero* component in $z$ would normally result in a 3d simulation with complex fields. However, by default (`kz_2d="complex"`), Meep will use a 2d computational cell in which $k_z$ is incorporated as an additional term in Maxwell's equations, which still results in complex fields but greatly improved performance.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-119-Setting `kz_2d="3d"` will instead use a 3d cell that is one pixel thick (with Bloch-periodic boundary conditions), which is considerably more expensive. The third possibility, `kz_2d="real/imag"`, saves an additional factor of two by storing some field components as purely real and some as purely imaginary in a "real" field, but this option requires some care to use and will be explained elsewhere in the future.
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-333-meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:334:The scale factor σ. You can also specify an anisotropic σ tensor by using the property `sigma_diag` which takes three numbers or a `Vector3` to give the σ$_n$ tensor diagonal, and `sigma_offdiag` which specifies the offdiagonal elements (defaults to 0). That is, `sigma_diag=mp.Vector3(a, b, c)` and `sigma_offdiag=mp.Vector3(u, v, w)` corresponds to a σ tensor
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-335-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-736-meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:737:Specify the direction of the boundaries to put the PML layers next to. e.g. if `X`, then specifies PML on the $\pm x$ boundaries (depending on the value of `side`, below). Default is the special value `ALL`, which puts PML layers on the boundaries in all directions.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-738-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-740-meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:741:Specify which side, `Low` or `High` of the boundary or boundaries to put PML on. e.g. if side is `Low` and direction is `X`, then a PML layer is added to the $-x$ boundary. Default is the special value `ALL`, which puts PML layers on both sides.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-742-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-748-meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:749:By default, Meep turns on the PML conductivity quadratically within the PML layer &mdash; one doesn't want to turn it on suddenly, because that exacerbates reflections due to the discretization. More generally, with `pml_profile` one can specify an arbitrary PML "profile" function $f(u)$ that determines the shape of the PML absorption profile up to an overall constant factor. *u* goes from 0 to 1 at the start and end of the PML, and the default is $f(u) = u^2$. In some cases where a very thick PML is required, such as in a periodic medium (where there is technically no such thing as a true PML, only a pseudo-PML), it can be advantageous to turn on the PML absorption more smoothly. See [Optics Express, Vol. 16, pp. 11376-92, 2008](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). For example, one can use a cubic profile $f(u) = u^3$ by specifying `pml_profile=lambda u: u*u*u`.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-750-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-764-
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:765:The `Source` class is used to specify the current sources via the `Simulation.sources` attribute. Note that all sources in Meep are separable in time and space, i.e. of the form $\mathbf{J}(\mathbf{x},t) = \mathbf{A}(\mathbf{x}) \cdot f(t)$ for some functions $\mathbf{A}$ and $f$. Non-separable sources can be simulated, however, by modifying the sources after each time step. When real fields are being used (which is the default in many cases; see `Simulation.force_complex_fields`), only the real part of the current source is used.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-766-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-806-
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:807:This is a subclass of `Source` and has **all of the properties** of `Source` above. However, you normally do not specify a `component`. Instead of `component`, the current source components and amplitude profile are computed by calling MPB to compute the modes, $\mathbf{u}_{n,\mathbf{k}}(\mathbf{r}) e^{i \mathbf{k} \cdot \mathbf{r}}$, of the dielectric profile in the region given by the `size` and `center` of the source, with the modes computed as if the *source region were repeated periodically in all directions*. If an `amplitude` and/or `amp_func` are supplied, they are *multiplied* by this current profile. The desired eigenmode and other features are specified by the following properties:
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-808-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-814-meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:815:By default (if `eig_match_freq` is `True`), Meep tries to find a mode with the same frequency ω<sub>*n*</sub>(**k**) as the `src` property (above), by scanning **k** vectors in the given `direction` using MPB's `find_k` functionality. Alternatively, if `eig_kpoint` is supplied, it is used as an initial guess for **k**. By default, `direction` is the direction normal to the source region, assuming `size` is $d$–1 dimensional in a $d$-dimensional simulation (e.g. a plane in 3d). If `direction` is set to `mp.NO_DIRECTION`, then `eig_kpoint` is not only the initial guess and the search direction of the **k** vectors, but is also taken to be the direction of the waveguide, allowing you to [launch modes in oblique ridge waveguides](Python_Tutorials/Eigenmode_Source.md#index-guided-modes-in-a-ridge-waveguide) (not perpendicular to the source plane).  If `eig_match_freq` is `False`, then the specific **k** vector of the desired mode is specified with  `eig_kpoint` (in Meep units of 2π/(unit length)). By default, the **k** components in the plane of the source region are zero.  However, if the source region spans the *entire* cell in some directions, and the cell has Bloch-periodic boundary conditions via the `k_point` parameter, then the mode's **k** components in those directions will match `k_point` so that the mode satisfies the Meep boundary conditions, regardless of `eig_kpoint`. Note that once **k** is either found by MPB, or specified by `eig_kpoint`, the field profile used to create the current sources corresponds to the [Bloch mode](https://en.wikipedia.org/wiki/Bloch_wave), $\mathbf{u}_{n,\mathbf{k}}(\mathbf{r})$, multiplied by the appropriate exponential factor, $e^{i \mathbf{k} \cdot \mathbf{r}}$.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-816-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-818-meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:819:The parity (= polarization in 2d) of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry *in the source region*, with respect to the `center` of the source region.  (In particular, it does not matter if your simulation as a whole has that symmetry, only the cross section where you are introducing the source.) If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `EVEN_Z + ODD_Y`. Default is `NO_PARITY`, in which case MPB computes all of the bands which will still be even or odd if the structure has mirror symmetry, of course. This is especially useful in 2d simulations to restrict yourself to a desired polarization.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-820-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-900-meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:901:How many `width`s the current decays for before it is cut off and set to zero &mdash; this applies for both turn-on and turn-off of the pulse. Default is 5.0. A larger value of `cutoff` will reduce the amount of high-frequency components that are introduced by the start/stop of the source, but will of course lead to longer simulation times. The peak of the Gaussian is reached at the time $t_0$=`start_time + cutoff*width`.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-902-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-915-$$
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:916:where $G(t)$ is the current (not the dipole moment). In this formula, $\Delta f$ is the `fwidth` of the source, $\omega_0$ is $2\pi$ times its `frequency,` and $t_0$ is the peak time discussed above. Note that this does not include any `amplitude` or `amp_func` factor that you specified for the source.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-917-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-1060-meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:1061:Given a `direction` constant, and a `mp.Volume`, returns the flux (the integral of $\Re [\mathbf{E}^* \times \mathbf{H}]$) in that volume. Most commonly, you specify a volume that is a plane or a line, and a direction perpendicular to it, e.g. `flux_in_box(d=mp.X,mp.Volume(center=mp.Vector3(0,0,0),size=mp.Vector3(0,1,1)))`. If the `center` and `size` arguments are provided instead of `box`, Meep will construct the appropriate volume for you.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-1062-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-1064-meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:1065:Given a `mp.Volume`, returns the integral of the electric-field energy $\mathbf{E}^* \cdot \mathbf{D}/2$ in the given volume. If the volume has zero size along a dimension, a lower-dimensional integral is used. If the `center` and `size` arguments are provided instead of `box`, Meep will construct the appropriate volume for you.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-1066-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-1068-meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:1069:Given a `mp.Volume`, returns the integral of the magnetic-field energy $\mathbf{H}^* \cdot \mathbf{B}/2$ in the given volume. If the volume has zero size along a dimension, a lower-dimensional integral is used. If the `center` and `size` arguments are provided instead of `box`, Meep will construct the appropriate volume for you.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-1070-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-1072-meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:1073:Given a `mp.Volume`, returns the integral of the electric- and magnetic-field energy $\mathbf{E}^* \cdot \mathbf{D}/2 + \mathbf{H}^* \cdot \mathbf{B}/2$ in the given volume. If the volume has zero size along a dimension, a lower-dimensional integral is used. If the `center` and `size` arguments are provided instead of `box`, Meep will construct the appropriate volume for you.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-1074-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-1221-
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:1222:The flux object should be created using `add_mode_monitor`.  (You could also use `add_flux`, but with `add_flux` you need to be more careful about symmetries that bisect the flux plane: the `add_flux` object should only be used with `get_eigenmode_coefficients` for modes of the same symmetry, e.g. constrained via `eig_parity`.  On the other hand, the performance of `add_flux` planes benefits more from symmetry.) `eig_vol` is the volume passed to [MPB](https://mpb.readthedocs.io) for the eigenmode calculation (based on interpolating the discretized materials from the Yee grid); in most cases this will simply be the volume over which the frequency-domain fields are tabulated, which is the default (i.e. `flux.where`). `eig_parity` should be one of [`mp.NO_PARITY` (default), `mp.EVEN_Z`, `mp.ODD_Z`, `mp.EVEN_Y`, `mp.ODD_Y`]. It is the parity (= polarization in 2d) of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry *in the source region*, just as for `EigenmodeSource` above. If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `EVEN_Z+ODD_Y`. Default is `NO_PARITY`, in which case MPB computes all of the bands which will still be even or odd if the structure has mirror symmetry, of course. This is especially useful in 2d simulations to restrict yourself to a desired polarization. `eig_resolution` is the spatial resolution to use in MPB for the eigenmode calculations. This defaults to the same resolution as Meep, but you can use a higher resolution in which case the structure is linearly interpolated from the Meep pixels. `eig_tolerance` is the tolerance to use in the MPB eigensolver. MPB terminates when the eigenvalues stop changing to less than this fractional tolerance. Defaults to `1e-12`.  (Note that this is the tolerance for the frequency eigenvalue ω; the tolerance for the mode profile is effectively the square root of this.) For examples, see [Tutorial/Mode Decomposition](Python_Tutorials/Mode_Decomposition.md).
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-1223-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-1324-
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:1325:Most commonly, you will want to **normalize** the force spectrum in some way, just as for flux spectra. Most simply, you could divide two different force spectra to compute the ratio of forces on two objects. Often, you will divide a force spectrum by a flux spectrum, to divide the force $F$ by the incident power $P$ on an object, in order to compute the useful dimensionless ratio $Fc$/$P$ where $c=1$ in Meep units. For example, it is a simple exercise to show that the force $F$ on a perfectly reflecting mirror with normal-incident power $P$ satisfies $Fc$/$P=2$, and for a perfectly absorbing (black) surface $Fc$/$P=1$.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-1326-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-1464-meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:1465:Given an HDF5 file name `fname` (does *not* include the `.h5` suffix), a `Volume` given by `where` (may be 0d, 1d, 2d, or 3d), and a `resolution` (in grid points / distance unit), outputs the far fields in `where` (which may lie *outside* the cell) in a grid with the given resolution (which may differ from the FDTD grid resolution) to the HDF5 file as a set of twelve array datasets `ex.r`, `ex.i`, ..., `hz.r`, `hz.i`, giving the real and imaginary parts of the Fourier-transformed $E$ and $H$ fields on this grid. Each dataset is an nx&#215;ny&#215;nz&#215;nfreq 4d array of space&#215;frequency although dimensions that =1 are omitted. The volume can optionally be specified via `center` and `size`.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-1466-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-1760-meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:1761:Given a list of `Vector3`, `k_points` of *k* vectors, runs a simulation for each *k* point (i.e. specifying Bloch-periodic boundary conditions) and extracts the eigen-frequencies, and returns a list of the complex frequencies. In particular, you should have specified one or more Gaussian sources. It will run the simulation until the sources are turned off plus an additional $t$ time units. It will run [Harminv](#harminv) at the same point/component as the first Gaussian source and look for modes in the union of the frequency ranges for all sources. Returns a list of lists of frequencies (one list of frequencies for each *k*). Also prints out a comma-delimited list of frequencies, prefixed by `freqs:`, and their imaginary parts, prefixed by `freqs-im:`. See [Tutorial/Resonant Modes and Transmission in a Waveguide Cavity](Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md).
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-1762-
##############################################
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-1817-
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md:1818:It is often useful to use the h5topng `-C` or `-A` options to overlay the dielectric function when outputting fields. To do this, you need to know the name of the dielectric-function `.h5` file which must have been previously output by `output_epsilon`. To make this easier, a built-in shell variable `$EPS` is provided which refers to the last-output dielectric-function `.h5` file. So, for example `output_png(mp.Ez,"-C $EPS")` will output the $E_z$ field and overlay the dielectric contours.
meep-mpi-default-1.12.0/doc/docs/Python_User_Interface.md-1819-
##############################################
meep-mpi-default-1.12.0/doc/docs/Replacements.vim-22-:%s/\\)/$/g
meep-mpi-default-1.12.0/doc/docs/Replacements.vim:23::%s/^`\(.*\)`$/```\r\1\r```\r/g
meep-mpi-default-1.12.0/doc/docs/Replacements.vim-24-:%s/```\n\n```\n//g
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Basics.md-72-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Basics.md:73:We gave the source a frequency of 0.15, and specified a `continuous-src` which is just a fixed-frequency sinusoid $\exp(-i \omega t)$ that by default is turned on at $t$=0. Recall that, in [Meep units](../Introduction.md#units-in-meep), frequency is specified in units of 2πc, which is equivalent to the inverse of the vacuum wavelength. Thus, 0.15 corresponds to a vacuum wavelength of about 1/0.15=6.67 μm, or a wavelength of about 2 μm in the ε=12 material &mdash; thus, our waveguide is half a wavelength wide, which should hopefully make it single mode. In fact, the cutoff for single-mode behavior in this waveguide is analytically solvable, and corresponds to a frequency of 1/2√11 or roughly 0.15076. Note also that to specify a J<sub>z</sub>, we specify a component $Ez$ (e.g. if we wanted a magnetic current, we would specify `Hx`, `Hy`, or `Hz`). The current is located at (-7,0), which is 1 μm to the right of the left edge of the cell &mdash; we always want to leave a little space between sources and the cell boundaries, to keep the boundary conditions from interfering with them.
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Basics.md-74-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Basics.md-170-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Basics.md:171:That is, the file contains a single dataset `ez` that is a 160$\times$160$\times$333 array, where the last dimension is time. This is rather a large file, 66MB; later, we'll see ways to reduce this size if we only want images. We have a number of choices of how to output the fields. To output a single time slice, we can use the same `h5topng` command as before, but with an additional `-t` option to specify the time index: e.g. `h5topng -t 332` will output the last time slice, similar to before. Instead, let's create an animation of the fields as a function of time. First, we have to create images for *all* of the time slices:
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Basics.md-172-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Basics.md-602-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Basics.md:603:The signal processing is performed by the `harminv` function, which takes four arguments: the field component E<sub>z</sub> and position ($r$+0.1,0) to analyze, and a frequency range given by a center frequency and bandwidth (same as the source pulse). Note that we wrap `harminv` in `(after-sources ...)`, since we only want to analyze the frequencies in the source-free system (the presence of a source will distort the analysis). At the end of the run, `harminv` prints a series of lines (beginning with `harminv0:`, to make it easy to `grep` for) listing the frequencies it found:
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Basics.md-604-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-143-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md:144:where $c_n = 1$ if $n=0$ and $c_n=2$ otherwise, $L$ is the side length (if each side has a different length, then the functions $f_n(x)$ will differ for each side). An illustration of these functions for the system under consideration, compared to point sources, is shown below:
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-145-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-446-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md:447:This new function $g(t)$ is computed in the function `make-casimir-g-kz`; use this value of $g(t)$ in `casimir-force-contrib`:
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-448-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-479-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md:480:In cylindrical coordinates, all source surfaces and objects have size `no-size` in the $phi$-direction. Also, the source index passed to `casimir-force-contrib` is given by:
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-481-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-516-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md:517:The arguments are similar to `casimir-force-contrib`, except that now we pass in the Bloch vector (which will be set inside of the function), and instead of a side index we simply pass in $S$, which is only one side of the source surface. As the program cannot detect the orientation of the surface if there is only one side, we have to explicitly multiply by the normal vector (given by `curr-side`). Otherwise, the computation proceeds as in the above cases, with the integration over $k_x$ and $k_y$ done outside of the program.
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-518-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Eigenmode_Source.md-146-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Eigenmode_Source.md:147:Note that this example involves a `continuous-source` for the time profile. For a pulsed source, the oblique planewave is incident at a given angle for only a *single* frequency component of the source. This is a fundamental feature of FDTD simulations and not of Meep per se. Thus, to simulate an incident planewave at multiple angles for a given frequency ω, you will need to do separate simulations involving different values of $\vec{k}$ (`k-point`) since each set of ($\vec{k}$,ω) specifying the Bloch-periodic boundaries and the frequency of the source will produce a different angle of the planewave. For more details, refer to Section 4.5 ("Efficient Frequency-Angle Coverage") in [Chapter 4](https://arxiv.org/abs/1301.5366) ("Electromagnetic Wave Source Conditions") of [Advances in FDTD Computational Electrodynamics: Photonics and Nanotechnology](https://www.amazon.com/Advances-FDTD-Computational-Electrodynamics-Nanotechnology/dp/1608071707).
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Eigenmode_Source.md-148-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Local_Density_of_States.md-14-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Local_Density_of_States.md:15:where $Q^{(n)}=\omega^{(n)}/2\gamma^{(n)}$ is the dimensionless [quality factor](https://en.wikipedia.org/wiki/Q_factor) and $V^{(n)}$ is the modal volume. This represents another way to compute the LDOS. In this tutorial, we will verify this expression by comparing it to the earlier one.
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Local_Density_of_States.md-16-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Local_Density_of_States.md-18-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Local_Density_of_States.md:19:We will validate both this prediction and the LDOS calculations above by computing the LDOS at the center of the cavity, the point of peak $|\vec{E}|$, in two ways. First, we compute the LDOS directly from the power radiated by a dipole, Fourier-transforming the result of a pulse using the `dft-ldos` command. Second, we compute the cavity mode and its lifetime $Q$ using `harminv` and then compute the LDOS by the Purcell formula shown above. The latter technique is much more efficient for high Q (small $w$), since one must run the simulation for a very long time to directly accumulate the Fourier transform of a slowly-decaying mode. The two calculations, we will demonstrate, agree to within discretization error, verifying the LDOS analysis above, and $Q/V$ is asymptotically linear on a semilog scale versus $1/w$ as predicted.
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Local_Density_of_States.md-20-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Material_Dispersion.md-150-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Material_Dispersion.md:151:The `run-k-points` function returns a *list of lists* of frequencies &mdash; one list of complex frequencies for each *k* point &mdash; which we store in the `all-freqs` variable. Finally, we want to loop over this list and print out the corresponding ε via the ratio (ck/ω)$^2$ as described above. To do this, we will use the Scheme `map` function, which applies a given function to every element of a list (or lists), and since we have a list of lists we'll actually nest two `map` functions:
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Material_Dispersion.md-152-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Mode_Decomposition.md-262-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Mode_Decomposition.md:263:Note the use of the keyword parameter argument `#eig-parity (+ ODD-Z EVEN-Y)` in the call to `get-eigenmode-coefficients`. This is important for specifying **non-degenerate** modes in MPB since the `k-point` is (0,0,0). `ODD-Z` is for modes with $E_z$ polarization. `EVEN-Y` is necessary since each diffraction order which is based on a given k<sub>x</sub> consists of *two* modes: one going in the +y direction and the other in the -y direction. `EVEN-Y` forces MPB to compute only the +k<sub>y</sub> + -k<sub>y</sub> (cosine) mode. As a result, the total transmittance must be halved in this case to obtain the transmittance for the individual +k<sub>y</sub> or -k<sub>y</sub> mode. For `ODD-Y`, MPB will compute the +k<sub>y</sub> - -k<sub>y</sub> (sine) mode but this will have zero power because the source is even. If the $y$ parity is left out, MPB will return a random superposition of the cosine and sine modes. Alternatively, in this example an input planewave with H<sub>z</sub> instead of $E_z$ polarization can be used which requires `#eig_parity (+ EVEN-Z ODD-Y)` as well as an odd mirror symmetry plane in *y*. Finally, note the use of `add-flux` instead of `add-mode-monitor` when using symmetries.
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Mode_Decomposition.md-264-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Near_to_Far_Field_Spectra.md-107-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Near_to_Far_Field_Spectra.md:108:From the far fields at each point $\mathbf{r}$, we compute using Matlab/Octave the outgoing or radial flux: $\sqrt{P_x^2+P_y^2}$, where P$_x$ and P$_y$ are the components of the Poynting vector $\mathbf{P}(\mathbf{r})=(P_x,P_y,P_z)=\mathrm{Re}\, \mathbf{E}(\mathbf{r})^*\times\mathbf{H}(\mathbf{r})$. Note that $P_z$ is always 0 since this is a 2d simulation. The total flux is then computed and displayed:
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Near_to_Far_Field_Spectra.md-109-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-83-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:84:The source will now be the usual Gaussian pulse centered at `fcen`, located at one edge of the cell just outside the PML, at `x = -0.5*sx + dpml`. Ideally, we would excite exactly the fundamental mode of the waveguide, but it is good enough to just excite it with a line source. Moreover, since we are interested in the $P$ polarization (electric field in the plane), we will excite it with a $J_y$ current source (transverse to the propagation direction), which is specified as `Ey`:
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-85-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-260-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:261:The results, shown above, are exactly what we expected: at first, an exponential increase of $Q$ with `N`, and then a saturation at $Q_r \approx 8750$. However, when we look at the Harminv output for larger `N`, something strange happens &mdash; it starts to find *more modes*! For example, at `N=16`, the output is:
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-262-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-289-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:290:Let us briefly review the problem. In a periodic system of this sort, the eigen-solutions can be expressed in the form of *Bloch modes*: a periodic *Bloch envelope* multiplied by a planewave $\exp[i(\mathbf{k}\cdot\mathbf{x}-ω t)]$, where **k** is the *Bloch wavevector*. We wish to find the *bands* $ω(\mathbf{k})$. In this case, there is only *one* direction of periodicity, so we only have one wavevector component $k_x$. Moreover, the solutions are periodic functions of this wavevector: for a unit-period structure, $k_x$ and $k_x+2\pi$ are redundant. Also, $k_x$ and $-k_x$ are redundant by time-reversal symmetry, so we only need to look for solutions in the *irreducible Brillouin zone* from $k_x=0$ to $k_x=\pi$.
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-291-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-350-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:351:Here, we have used [libctl](https://libctl.readthedocs.io)'s built-in `interpolate` function to interpolate a set of 19 $\mathbf{k}$ points between $\mathbf{k} = 0$ and $\mathbf{k} = 0.5 \cdot 2π \hat{\mathbf{x}}$, to cover the irreducible Brillouin zone. `run-k-points` automatically runs `harminv`, using the frequency range and location taken from the Gaussian source in the `sources` list. It also calls `output-epsilon`. The output is not only the usual `harminv:` lines, but it also outputs a series of lines like:
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-352-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-29-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md:30:The key thing is to set the `dimensions` parameter to `CYLINDRICAL`. This means that all vectors will represent ($r$,φ,$z$) coordinates instead of ($x$,$y$,$z$). The computational cell in the $r$ direction is of size `sr = r + w + pad + dpml`, and runs from `0` to `sr` (by default) rather than from `-sr/2` to `sr/2` as it would for any other dimension. Note that our $z$ size is `no-size` because it is in 2d. The φ size is also `no-size`, corresponding to the continuous rotational symmetry. A finite φ size might correspond to discrete rotational symmetry, but this is not currently supported.
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-31-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-69-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md:70:At the very end, we'll also output one period of the fields to make movies, etcetera. A single field output would be a 1d dataset along the $r$ direction, so to make things more interesting we'll use `to-appended` to append these datasets to a single HDF5 file to get an $r \times t$ 2d dataset. We'll also use `in-volume` to specify a larger output volume than just the computational cell: in particular, we'll output from `-sr` to `sr` in the $r$ direction, where Meep will automatically infer the $-r$ field values from the reflection symmetry.
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-71-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-105-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md:106:The problem is twofold. First, there is some signal-processing error in determining $Q$ in the 2d case, as indicated by the "error" column of the `harminv` output which is only 4e-7 for the 2d simulation vs. 6e-11 for the cylindrical case. We can bring this error down by running with a narrower bandwidth source, which excites just one mode and gives a cleaner signal, or by analyzing over a longer time than 200. Doing the former, we find that the 2d value of $Q$ at a resolution of 20 should really be $Q$=343. Second, [PML](../Perfectly_Matched_Layer.md) absorbing layers are really designed to absorb planewaves incident on flat interfaces, but here we have a *cylindrical* PML layer. Because of this, there are larger numerical reflections from the PML in the cylindrical simulation, which we can rectify by pushing the PML out to a larger radius (i.e. using a larger value of `pad`) and/or increasing the PML thickness (increasing `dpml`) so that it turns on more adiabatically. In the cylindrical simulation for `resolution=20`, if we increase to `dpml=16`, we get $Q$=343, which is in much better agreement with the 2d calculation and if we increase to `dpml=32` we get the same $Q$=343, so it seems to be converged.
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-107-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md-6-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md:7:Since this is a 1d calculation, we could implement it via a 2d cell of `(size S no-size no-size)`, specifying periodic boundary conditions in the $y$ direction. However, this is slightly inefficient since the $y$ periodic boundaries are implemented internally via extra "ghost pixels" in the $y$ direction. Instead, Meep has special support for 1d simulations in the $z$ direction. To use this, we must explicitly set `dimensions` to `1`, and in that case we can *only* use $E_x$ (and $D_x$) and $H_y$ field components. This involves no loss of generality because of the symmetry of the problem.
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md-8-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md-85-
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md:86:We could print these with more `display-fluxes` lines, but it is nice to print these on a single line along with χ$^{(3)}$ and the amplitude, so that we can eventually put them all into one table in our plotting program. To do this, we'll use the lower-level function `(get-fluxes trans1)`, which returns a list of the flux values, and take the first element of the list since there is only one:
meep-mpi-default-1.12.0/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md-87-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-49-meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:50:Explicitly specifies the dimensionality of the simulation, if the value is less than 3. If the value is 3 (the default), then the dimensions are automatically reduced to 2 if possible when `geometry-lattice` size in the $z$ direction is `no-size`. If `dimensions` is the special value of `CYLINDRICAL`, then cylindrical coordinates are used and the $x$ and $z$ dimensions are interpreted as $r$ and $z$, respectively. If `dimensions` is 1, then the cell must be along the $z$ direction and only $E_x$ and $H_y$ field components are permitted. If `dimensions` is 2, then the cell must be in the $xy$ plane.
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-51-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-53-meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:54:For `CYLINDRICAL` simulations, specifies that the angular $\phi$ dependence of the fields is of the form $e^{im\phi}$ (default is `m=0`). If the simulation cell includes the origin $r=0$, then `m` must be an integer.
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-55-
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-56-**`accurate-fields-near-cylorigin?` [`boolean`]**
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:57:—For `CYLINDRICAL` simulations with |*m*| &gt; 1, compute more accurate fields near the origin $r=0$ at the expense of requiring a smaller Courant factor. Empirically, when this option is set to `true`, a Courant factor of roughly $\min[0.5, 1 / (|m| + 0.5)]$ or smaller seems to be needed. Default is `false`, in which case the $D_r$, $D_z$, and $B_r$ fields within |*m*| pixels of the origin are forced to zero, which usually ensures stability with the default Courant factor of 0.5, at the expense of slowing convergence of the fields near $r=0$.
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-58-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-64-meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:65:If `false` (the default), then the boundaries are perfect metallic (zero electric field). If a `vector3`, then the boundaries are Bloch-periodic: the fields at one side are $\exp(i\mathbf{k}\cdot\mathbf{R})$ times the fields at the other side, separated by the lattice vector $\mathbf{R}$. A non-zero `vector3` will produce complex fields. The `k-point` vector is specified in Cartesian coordinates in units of 2π/distance. Note: this is *different* from [MPB](https://mpb.readthedocs.io), equivalent to taking MPB's `k-points` through its function `reciprocal->cartesian`.
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-66-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-68-meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:69:By default, a 2d cell (i.e., `dimensions` is `2`) combined with a `k-point` that has a *non-zero* component in $z$ results in a 3d simulation with complex fields. However, by setting `special-kz?` to `true`, Meep will use a 2d cell and real fields (if the $x$ and $y$ components of `k-point` are zero) which improves performance.
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-70-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-271-meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:272:The scale factor σ. You can also specify an anisotropic σ tensor by using the property `sigma-diag` which takes three numbers or a `vector3` to give the σ$_n$ tensor diagonal, and `sigma-offdiag` which specifies the offdiagonal elements (defaults to 0). That is, `(sigma-diag a b c)` and `(sigma-offdiag u v w)` corresponds to a σ tensor
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-273-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-591-meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:592:Specify the direction of the boundaries to put the PML layers next to. e.g. if `X`, then specifies PML on the $\pm x$ boundaries (depending on the value of `side`, below). Default is the special value `ALL`, which puts PML layers on the boundaries in all directions.
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-593-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-595-meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:596:Specify which side, `Low` or `High` of the boundary or boundaries to put PML on. e.g. if side is `Low` and direction is `X`, then a PML layer is added to the $-x$ boundary. Default is the special value `ALL`, which puts PML layers on both sides.
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-597-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-607-meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:608:By default, Meep turns on the PML conductivity quadratically within the PML layer &mdash; one doesn't want to turn it on suddenly, because that exacerbates reflections due to the discretization. More generally, with `pml-profile` one can specify an arbitrary PML "profile" function $f(u)$ that determines the shape of the PML absorption profile up to an overall constant factor. *u* goes from 0 to 1 at the start and end of the PML, and the default is $f(u) = u^2$. In some cases where a very thick PML is required, such as in a periodic medium (where there is technically no such thing as a true PML, only a pseudo-PML), it can be advantageous to turn on the PML absorption more smoothly. See [Optics Express, Vol. 16, pp. 11376-92, 2008](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). For example, one can use a cubic profile $f(u) = u^3$ by specifying `(pml-profile (lambda (u) (* u u u)))`.
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-609-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-623-
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:624:The `source` class is used to specify the current sources via the `sources` input variable. Note that all sources in Meep are separable in time and space, i.e. of the form $\mathbf{J}(\mathbf{x},t) = \mathbf{A}(\mathbf{x}) \cdot f(t)$ for some functions $\mathbf{A}$ and $f$. Non-separable sources can be simulated, however, by modifying the sources after each time step. When real fields are being used (which is the default in many cases; see the `force-complex-fields?` input variable), only the real part of the current source is used.
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-625-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-659-
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:660:This is a subclass of `source` and has **all of the properties** of `source` above. However, you normally do not specify a `component`. Instead of `component`, the current source components and amplitude profile are computed by calling MPB to compute the modes, $\mathbf{u}_{n,\mathbf{k}}(\mathbf{r}) e^{i \mathbf{k} \cdot \mathbf{r}}$, of the dielectric profile in the region given by the `size` and `center` of the source, with the modes computed as if the *source region were repeated periodically in all directions*. If an `amplitude` and/or `amp-func` are supplied, they are *multiplied* by this current profile. The desired eigenmode and other features are specified by the following properties:
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-661-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-667-meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:668:By default (if `eig-match-freq?` is `true`), Meep tries to find a mode with the same frequency ω<sub>*n*</sub>(**k**) as the `src` property (above), by scanning **k** vectors in the given `direction` using MPB's `find-k` functionality. Alternatively, if `eig-kpoint` is supplied, it is used as an initial guess for **k**. By default, `direction` is the direction normal to the source region, assuming `size` is $d$–1 dimensional in a $d$-dimensional simulation (e.g. a plane in 3d). If `direction` is set to `NO-DIRECTION`, then `eig_kpoint` is not only the initial guess and the search direction of the **k** vectors, but is also taken to be the direction of the waveguide, allowing you to [launch modes in oblique ridge waveguides](Scheme_Tutorials/Eigenmode_Source.md#index-guided-modes-in-a-ridge-waveguide) (not perpendicular to the source plane). If `eig-match-freq?` is `false`, then the specific **k** vector of the desired mode is specified with `eig-kpoint` (in Meep units of 2π/(unit length)). By default, the **k** components in the plane of the source region are zero.  However, if the source region spans the *entire* cell in some directions, and the cell has Bloch-periodic boundary conditions via the `k-point` parameter, then the mode's **k** components in those directions will match `k-point` so that the mode satisfies the Meep boundary conditions, regardless of `eig-kpoint`. Note that once **k** is either found by MPB, or specified by `eig-kpoint`, the field profile used to create the current sources corresponds to the [Bloch mode](https://en.wikipedia.org/wiki/Bloch_wave), $\mathbf{u}_{n,\mathbf{k}}(\mathbf{r})$, multiplied by the appropriate exponential factor, $e^{i \mathbf{k} \cdot \mathbf{r}}$.
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-669-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-671-meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:672:The parity (= polarization in 2d) of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry *in the source region*, with respect to the `center` of the source region.  (In particular, it does not matter if your simulation as a whole has that symmetry, only the cross section where you are introducing the source.) If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `EVEN-Z + ODD-Y`. Default is `NO-PARITY`, in which case MPB computes all of the bands which will still be even or odd if the structure has mirror symmetry, of course. This is especially useful in 2d simulations to restrict yourself to a desired polarization.
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-673-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-735-meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:736:How many `width`s the current decays for before it is cut off and set to zero &mdash; this applies for both turn-on and turn-off of the pulse. Default is 5.0. A larger value of `cutoff` will reduce the amount of high-frequency components that are introduced by the start/stop of the source, but will of course lead to longer simulation times. The peak of the Gaussian is reached at the time $t_0$=`start-time + cutoff*width`.
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-737-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-864-meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:865:Given a `direction` constant, and a `meep::volume*`, returns the flux (the integral of $\Re [\mathbf{E}^* \times \mathbf{H}]$) in that volume. Most commonly, you specify a volume that is a plane or a line, and a direction perpendicular to it, e.g. `(flux-in-box `X (volume (center 0) (size 0 1 1)))`.
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-866-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-1001-```
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:1002:The flux object must be created using `add-mode-monitor`.  (You could also use `add-flux`, but with `add_flux` you need to be more careful about symmetries that bisect the flux plane: the `add-flux` object should only be used with `get-eigenmode-coefficients` for modes of the same symmetry, e.g. constrained via `eig_parity`.  On the other hand, the performance of `add-flux` planes benefits more from symmetry.) `eig-vol` is the volume passed to [MPB](https://mpb.readthedocs.io) for the eigenmode calculation (based on interpolating the discretized materials from the Yee grid); in most cases this will simply be the volume over which the frequency-domain fields are tabulated, which is the default (i.e. `(meep-dft-flux-where-get flux)`). `eig-parity` should be one of [`NO-PARITY` (default), `EVEN-Z`, `ODD-Z`, `EVEN-Y`, `ODD-Y`]. It is the parity (= polarization in 2d) of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry *in the source region*, just as for `eigenmode-source` above. If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `(+ EVEN-Z ODD-Y)`. Default is `NO-PARITY`, in which case MPB computes all of the bands which will still be even or odd if the structure has mirror symmetry, of course. This is especially useful in 2d simulations to restrict yourself to a desired polarization. `eig-resolution` is the spatial resolution to use in MPB for the eigenmode calculations. This defaults to the same resolution as Meep, but you can use a higher resolution in which case the structure is linearly interpolated from the Meep pixels. `eig-tolerance` is the tolerance to use in the MPB eigensolver. MPB terminates when the eigenvalues stop changing to less than this fractional tolerance. Defaults to `1e-12`.  (Note that this is the tolerance for the frequency eigenvalue ω; the tolerance for the mode profile is effectively the square root of this.)
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-1003-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-1089-
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:1090:Most commonly, you will want to **normalize** the force spectrum in some way, just as for flux spectra. Most simply, you could divide two different force spectra to compute the ratio of forces on two objects. Often, you will divide a force spectrum by a flux spectrum, to divide the force $F$ by the incident power $P$ on an object, in order to compute the useful dimensionless ratio $Fc$/$P$ where $c=1$ in Meep units. For example, it is a simple exercise to show that the force $F$ on a perfectly reflecting mirror with normal-incident power $P$ satisfies $Fc$/$P=2$, and for a perfectly absorbing (black) surface $Fc$/$P=1$.
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-1091-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-1364-
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:1365:It is often useful to use the `h5topng` `-C` or `-A` options to overlay the dielectric function when outputting fields. To do this, you need to know the name of the dielectric-function `.h5` file which must have been previously output by `output-epsilon`. To make this easier, a built-in shell variable `$EPS` is provided which refers to the last-output dielectric-function `.h5` file. So, for example `(output-png Ez "-C $EPS")` will output the $E_z$ field and overlay the dielectric contours.
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-1366-
##############################################
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-1388-meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md:1389:Returns a step function that collects data from the field component `c` (e.g. $E_x$, etc.) at the given point `pt` (a `vector3`). Then, at the end of the run, it uses Harminv to look for modes in the given frequency range (center `fcen` and width `df`), printing the results to standard output (prefixed by `harminv:`) as comma-delimited text, and also storing them to the variable `harminv-results`. The optional argument `maxbands` is the maximum number of modes to search for. Defaults to 100.
meep-mpi-default-1.12.0/doc/docs/Scheme_User_Interface.md-1390-
##############################################
meep-mpi-default-1.12.0/doc/docs/Subpixel_Smoothing.md-25-
meep-mpi-default-1.12.0/doc/docs/Subpixel_Smoothing.md:26:where $\textbf{P}$ is the projection matrix $P_{ij}=n_{i}n_{j}$ onto the normal $\vec{n}$. The $\langle\cdots\rangle$ denotes an average over the voxel $sΔx\times sΔy\times sΔz$ surrounding the grid point in question where $s$ is a smoothing diameter in grid units equal to 1/`resolution`. If the initial materials are anisotropic (via `epsilon_diag` and `epsilon_offdiag`), a more complicated formula is used. They key point is that, even if the structure consists entirely of isotropic materials, the discretized structure will use anisotropic materials. For interface pixels, Meep computes the effective permittivity tensor automatically at the start of the simulation prior to time stepping via analytic expressions for the filling fraction and local normal vector. For details involving derivation of the effective permittivity tensor and its implementation in Meep/FDTD, see [Optics Letters, Vol. 36, pp. 2972-4, 2006](https://www.osapublishing.org/ol/abstract.cfm?uri=ol-31-20-2972) and [Optics Letters, Vol. 35, pp. 2778-80, 2009](https://www.osapublishing.org/abstract.cfm?uri=ol-34-18-2778).
meep-mpi-default-1.12.0/doc/docs/Subpixel_Smoothing.md-27-
##############################################
meep-mpi-default-1.12.0/doc/docs/Units_and_Nonlinearity.md-23-
meep-mpi-default-1.12.0/doc/docs/Units_and_Nonlinearity.md:24:where $n_0$ is the linear refractive index $n_0=\sqrt{\varepsilon}$. See, for example, Section 4.1 of [Nonlinear Optics (third edition)](https://www.amazon.com/Nonlinear-Optics-Third-Robert-Boyd/dp/0123694701) by R. W. Boyd.
meep-mpi-default-1.12.0/doc/docs/Units_and_Nonlinearity.md-25-
##############################################
meep-mpi-default-1.12.0/m4/ax_compiler_vendor.m4-20-  for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do 
meep-mpi-default-1.12.0/m4/ax_compiler_vendor.m4:21:    vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
meep-mpi-default-1.12.0/m4/ax_compiler_vendor.m4-22-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
##############################################
meep-mpi-default-1.12.0/m4/ax_compiler_vendor.m4-25-#endif
meep-mpi-default-1.12.0/m4/ax_compiler_vendor.m4:26:])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
meep-mpi-default-1.12.0/m4/ax_compiler_vendor.m4-27-  done
##############################################
meep-mpi-default-1.12.0/m4/ax_gcc_archflag.m4-114-     AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/])
meep-mpi-default-1.12.0/m4/ax_gcc_archflag.m4:115:     cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null`
meep-mpi-default-1.12.0/m4/ax_gcc_archflag.m4:116:     cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters`
meep-mpi-default-1.12.0/m4/ax_gcc_archflag.m4-117-     case $cputype in
##############################################
meep-mpi-default-1.12.0/m4/ax_gcc_archflag.m4-138-     cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null`
meep-mpi-default-1.12.0/m4/ax_gcc_archflag.m4:139:     cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'`
meep-mpi-default-1.12.0/m4/ax_gcc_archflag.m4-140-     case $cputype in
##############################################
meep-mpi-default-1.12.0/m4/pkg.m4-27-            AC_MSG_CHECKING($1_CFLAGS)
meep-mpi-default-1.12.0/m4/pkg.m4:28:            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
meep-mpi-default-1.12.0/m4/pkg.m4-29-            AC_MSG_RESULT($$1_CFLAGS)
##############################################
meep-mpi-default-1.12.0/m4/pkg.m4-31-            AC_MSG_CHECKING($1_LIBS)
meep-mpi-default-1.12.0/m4/pkg.m4:32:            $1_LIBS=`$PKG_CONFIG --libs "$2"`
meep-mpi-default-1.12.0/m4/pkg.m4-33-            AC_MSG_RESULT($$1_LIBS)
##############################################
meep-mpi-default-1.12.0/m4/pkg.m4-38-            ## do set a variable so people can do so.
meep-mpi-default-1.12.0/m4/pkg.m4:39:            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
meep-mpi-default-1.12.0/m4/pkg.m4-40-            ifelse([$4], ,echo $$1_PKG_ERRORS,)
##############################################
meep-mpi-default-1.12.0/python/examples/antenna-radiation.ipynb-201-   "source": [
meep-mpi-default-1.12.0/python/examples/antenna-radiation.ipynb:202:    "For the second of two cases, we use the `get_farfield` routine to compute the far fields by looping over a set of 100 equally-spaced points along the circumference of a circle with radius of 1 mm. The six far field components ($E_x$, $E_y$, $E_z$, $H_x$, $H_y$, $H_z$) are stored as separate arrays of complex numbers. From the far fields at each point $r$, we compute the outgoing or radial flux: $P^2_x+P^2_y$, where $P_x$ and $P_y$ are the components of the Poynting vector $P(r)=(P_x,P_y,P_z)=\\Re(E(r) \\times H(r))$. Note that $P_z$ is always 0 since this is a 2d simulation. The total flux is computed and the three flux values are displayed."
meep-mpi-default-1.12.0/python/examples/antenna-radiation.ipynb-203-   ]
##############################################
meep-mpi-default-1.12.0/python/examples/binary_grating.ipynb-294-   "source": [
meep-mpi-default-1.12.0/python/examples/binary_grating.ipynb:295:    "Note the use of the keyword parameter argument `eig_parity=mp.ODD_Z+mp.EVEN_Y` in the call to `get_eigenmode_coefficients`. This is important for specifying **non-degenerate** modes in MPB since the `k_point` is (0,0,0). `ODD_Z` is for modes with E<sub>z</sub> polarization. `EVEN_Y` is necessary since each diffraction order which is based on a given k<sub>x</sub> consists of *two* modes: one going in the +y direction and the other in the -y direction. `EVEN_Y` forces MPB to compute only the +k<sub>y</sub> + -k<sub>y</sub> (cosine) mode. As a result, the total transmittance must be halved in this case to obtain the transmittance for the individual +k<sub>y</sub> or -k<sub>y</sub> mode. For `ODD_Y`, MPB will compute the +k<sub>y</sub> - -k<sub>y</sub> (sine) mode but this will have zero power because the source is even. If the $y$ parity is left out, MPB will return a random superposition of the cosine and sine modes. Alternatively, in this example an input planewave with H<sub>z</sub> instead of E<sub>z</sub> polarization can be used which requires `eig_parity=mp.EVEN_Z+mp.ODD_Y` as well as an odd mirror symmetry plane in *y*. Finally, note the use of `add_flux` instead of `add_mode_monitor` when using symmetries.\n",
meep-mpi-default-1.12.0/python/examples/binary_grating.ipynb-296-    "\n",
##############################################
meep-mpi-default-1.12.0/python/examples/binary_grating.ipynb-343-    "\n",
meep-mpi-default-1.12.0/python/examples/binary_grating.ipynb:344:    "The diffraction orders/modes are a finite set of propagating planewaves. The wavevector $k_x$ of these modes can be computed analytically: for a frequency of $ω$ (in $c$=1 units), these propagating modes are the **real** solutions of sqrt(ω²n²-($k_y$+2π$m$/$Λ$)²) where $m$ is the diffraction order (an integer), $Λ$ is the periodicity of the grating, and $n$ is the refractive index of the propagating medium. In this example, $n$=1, $k_y$=0, and $Λ$=10 μm. Thus, at a wavelength of 0.5 μm there are a total of 20 diffraction orders of which we only computed the first 10. The wavevector $k_x$ is used to compute the angle of the diffraction order as cos<sup>-1</sup>($k_x$/($ωn$)). Evanescent modes, those with an imaginary k<sub>x</sub>, exist for |$m$|>20 but these modes carry no power. Note that currently Meep does not compute the number of propagating modes for you. If the mode number passed to `get_eigenmode_coefficients` is larger than the number of propagating modes at a given frequency/wavelength, MPB's Newton solver will fail to converge and will return zero for the mode\\ coefficient. It is therefore a good idea to know beforehand the number of propagating modes.\n",
meep-mpi-default-1.12.0/python/examples/binary_grating.ipynb-345-    "\n",
##############################################
meep-mpi-default-1.12.0/python/examples/coupler.ipynb-1010-   "source": [
meep-mpi-default-1.12.0/python/examples/coupler.ipynb:1011:    "For a given waveguide separation distance (`d`), the simulation computes the transmittance of Ports 2, 3, and 4. The transmittance is the square of the [S-parameter](https://en.wikipedia.org/wiki/Scattering_parameters) which is equivalent to the [mode coefficient](https://meep.readthedocs.io/en/latest/Mode_Decomposition). There is an additional mode monitor at Port 1 to compute the input power from the adjacent eigenmode source; this is used for normalization when computing the transmittance. The eight layers of the GDSII file are each converted to a `Simulation` object: the upper and lower branches of the coupler are defined as a collection of [`Prism`](https://meep.readthedocs.io/en/latest/Python_User_Interface/#prism)s, the rectilinear regions of the source and flux monitor as a [`Volume`](https://meep.readthedocs.io/en/latest/Python_User_Interface/#volume) and [`FluxRegion`](https://meep.readthedocs.io/en/latest/Python_User_Interface/#fluxregion). The size of the cell in the $y$ direction is dependent on `d`. The default dimensionality is 2d. An optional input parameter (`three_d`) converts the geometry to 3d by extruding the coupler geometry in the *z* direction and adding an oxide layer beneath similar to a [silicon on insulator](https://en.wikipedia.org/wiki/Silicon_on_insulator) (SOI) substrate. A schematic of the coupler design in 3d generated using MayaVi is shown below.\n",
meep-mpi-default-1.12.0/python/examples/coupler.ipynb-1012-    "\n",
##############################################
meep-mpi-default-1.12.0/python/examples/holey-wvg-bands.ipynb-10-    "\n",
meep-mpi-default-1.12.0/python/examples/holey-wvg-bands.ipynb:11:    "Let us briefly review the problem. In a periodic system of this sort, the eigen-solutions can be expressed in the form of Bloch modes: a periodic Bloch envelope multiplied by a planewave $exp[i(k⋅x−\\omega t)]$, where $k$ is the Bloch wavevector. We wish to find the bands $\\omega(k)$. In this case, there is only one direction of periodicity, so we only have one wavevector component $k_x$. Moreover, the solutions are periodic functions of this wavevector: for a unit-period structure, $k_x$ and $k_x+2\\pi$ are redundant. Also, $k_x$ and $−k_x$ are redundant by time-reversal symmetry, so we only need to look for solutions in the irreducible Brillouin zone from $k_x=0$ to $k_x=\\pi$.\n",
meep-mpi-default-1.12.0/python/examples/holey-wvg-bands.ipynb-12-    "\n",
##############################################
meep-mpi-default-1.12.0/python/examples/metal-cavity-ldos.ipynb-18-    "\n",
meep-mpi-default-1.12.0/python/examples/metal-cavity-ldos.ipynb:19:    "where $Q^{(n)}=\\omega^{(n)}/2\\gamma^{(n)}$ is the dimensionless [quality factor](https://en.wikipedia.org/wiki/Q_factor) and $V^{(n)}$ is the modal volume. This represents another way to compute the LDOS. In this tutorial, we will verify this expression by comparing it to the earlier one.\n",
meep-mpi-default-1.12.0/python/examples/metal-cavity-ldos.ipynb-20-    "\n",
##############################################
meep-mpi-default-1.12.0/python/examples/metal-cavity-ldos.ipynb-22-    "\n",
meep-mpi-default-1.12.0/python/examples/metal-cavity-ldos.ipynb:23:    "We will validate both this prediction and the LDOS calculations above by computing the LDOS at the center of the cavity, the point of peak $|\\vec{E}|$, in two ways. First, we compute the LDOS directly from the power radiated by a dipole, Fourier-transforming the result of a pulse using the `dft_ldos` command. Second, we compute the cavity mode and its lifetime $Q$ using `Harminv` and then compute the LDOS by the Purcell formula shown above. The latter technique is much more efficient for high Q (small $w$), since one must run the simulation for a very long time to directly accumulate the Fourier transform of a slowly-decaying mode. The two calculations, we will demonstrate, agree to within discretization error, verifying the LDOS analysis above, and $Q/V$ is asymptotically linear on a semilog scale versus $1/w$ as predicted."
meep-mpi-default-1.12.0/python/examples/metal-cavity-ldos.ipynb-24-   ]
##############################################
meep-mpi-default-1.12.0/python/examples/oblique-planewave.ipynb-229-   "source": [
meep-mpi-default-1.12.0/python/examples/oblique-planewave.ipynb:230:    "Note that this example involves a `ContinuousSource` for the time profile. For a pulsed source, the oblique planewave is incident at a given angle for only a *single* frequency component of the source. This is a fundamental feature of FDTD simulations and not of Meep per se. Thus, to simulate an incident planewave at multiple angles for a given frequency ω, you will need to do separate simulations involving different values of $\\vec{k}$ (`k_point`) since each set of ($\\vec{k}$,ω) specifying the Bloch-periodic boundaries and the frequency of the source will produce a different angle of the planewave. For more details, refer to Section 4.5 (\"Efficient Frequency-Angle Coverage\") in [Chapter 4](https://arxiv.org/abs/1301.5366) (\"Electromagnetic Wave Source Conditions\") of [Advances in FDTD Computational Electrodynamics: Photonics and Nanotechnology](https://www.amazon.com/Advances-FDTD-Computational-Electrodynamics-Nanotechnology/dp/1608071707)."
meep-mpi-default-1.12.0/python/examples/oblique-planewave.ipynb-231-   ]
##############################################
meep-mpi-default-1.12.0/python/examples/parallel-wvgs-force.ipynb-127-   "source": [
meep-mpi-default-1.12.0/python/examples/parallel-wvgs-force.ipynb:128:    "There are two important items to note in `parallel_waveguide`: (1) a single flux surface is used to compute the Poynting flux in $z$ which spans an area slightly larger than both waveguides rather than two separate flux surfaces (one for each waveguide). This is because in the limit of small separation, two flux surfaces overlap whereas the total power through a single flux surface need, by symmetry, only be halved in order to determine the value for just one of the two waveguides. (2) Instead of defining a closed, four-sided \"box\" surrounding the waveguides, the MST is computed along just two $y$-oriented lines (to obtain the force in the $x$ direction) with different `weight` values to correctly sum the total force. By symmetry, the force in the $y$ direction is zero and need not be computed. Choosing a suitable runtime requires some care. A large runtime is necessary to obtain the steady-state response but this will also lead to large values for the discrete Fourier-transformed fields used to compute both the flux and the MST. Large floating-point numbers may contain [roundoff errors](https://en.wikipedia.org/wiki/Round-off_error).\n",
meep-mpi-default-1.12.0/python/examples/parallel-wvgs-force.ipynb-129-    "\n",
##############################################
meep-mpi-default-1.12.0/python/examples/ring.ipynb-67-   "source": [
meep-mpi-default-1.12.0/python/examples/ring.ipynb:68:    "Later objects in the `geometry` object take precedence over or rather lie \"on top of\" earlier objects, so the second `air` ($\\epsilon$=1) cylinder cuts a circular hole out of the larger cylinder, leaving a ring of width `w`.\n",
meep-mpi-default-1.12.0/python/examples/ring.ipynb-69-    "\n",
##############################################
meep-openmpi-1.12.0/configure.ac-282-else
meep-openmpi-1.12.0/configure.ac:283:  GUILE_LIBS=`$GUILE_CONFIG link`
meep-openmpi-1.12.0/configure.ac:284:  GUILE_CPPFLAGS=`$GUILE_CONFIG compile`
meep-openmpi-1.12.0/configure.ac-285-  CPPFLAGS="$CPPFLAGS $GUILE_CPPFLAGS"
##############################################
meep-openmpi-1.12.0/configure.ac-533-      AC_MSG_CHECKING([for Python include directory])
meep-openmpi-1.12.0/configure.ac:534:      pinc=`echo "import distutils.sysconfig; print (distutils.sysconfig.get_python_inc())" | $PYTHON - 2>/dev/null`
meep-openmpi-1.12.0/configure.ac-535-      AC_MSG_RESULT([${pinc:-unknown}])
##############################################
meep-openmpi-1.12.0/configure.ac-543-        AC_MSG_CHECKING([for Numpy include directory])
meep-openmpi-1.12.0/configure.ac:544:        pinc=`echo "import numpy; print (numpy.get_include())" | $PYTHON - 2>/dev/null`
meep-openmpi-1.12.0/configure.ac-545-        AC_MSG_RESULT([${pinc:-unknown}])
##############################################
meep-openmpi-1.12.0/doc/docs/Build_From_Source.md-19-
meep-openmpi-1.12.0/doc/docs/Build_From_Source.md:20:Most of the software below, including Meep, installs under `/usr/local` by default. That is, libraries go in `/usr/local/lib`, programs in `/usr/local/bin`, etc. If you don't have `root` privileges on your machine, you may need to install somewhere else, e.g. under `$HOME/install` (the `install/` subdirectory of your home directory). Most of the programs below use a GNU-style `configure` script, which means that all you would do to install there would be:
meep-openmpi-1.12.0/doc/docs/Build_From_Source.md-21-
##############################################
meep-openmpi-1.12.0/doc/docs/Build_From_Source.md-25-
meep-openmpi-1.12.0/doc/docs/Build_From_Source.md:26:when configuring the program. The directories `$HOME/install/lib` etc. are created automatically as needed.
meep-openmpi-1.12.0/doc/docs/Build_From_Source.md-27-
##############################################
meep-openmpi-1.12.0/doc/docs/Build_From_Source.md-29-
meep-openmpi-1.12.0/doc/docs/Build_From_Source.md:30:There are two further complications. First, if you install dependencies in a non-standard location like `$HOME/install/lib`, you will need to tell the compilers where to find the libraries and header files that you installed. You do this by passing two variables to `./configure`:
meep-openmpi-1.12.0/doc/docs/Build_From_Source.md-31-
##############################################
meep-openmpi-1.12.0/doc/docs/Build_From_Source.md-48-
meep-openmpi-1.12.0/doc/docs/Build_From_Source.md:49:There are several ways to do this.  Suppose that you installed libraries into the directory `$HOME/install/lib`.   The most robust option is probably to include this path in the linker flags:
meep-openmpi-1.12.0/doc/docs/Build_From_Source.md-50-
##############################################
meep-openmpi-1.12.0/doc/docs/Build_From_Source.md-56-
meep-openmpi-1.12.0/doc/docs/Build_From_Source.md:57:On many systems, you can also specify directories to the runtime linker via the `LD_LIBRARY_PATH` environment variable. In particular, by `export LD_LIBRARY_PATH="$HOME/install/lib:$LD_LIBRARY_PATH"`; you can add this to your `.profile` file (depending on your shell) to make it run every time you run your shell. On MacOS, a security feature called [System Integrity Protection](https://en.wikipedia.org/wiki/System_Integrity_Protection) causes the value of `LD_LIBRARY_PATH` to be ignored, so using environment variables won't work there.
meep-openmpi-1.12.0/doc/docs/Build_From_Source.md-58-
##############################################
meep-openmpi-1.12.0/doc/docs/Exploiting_Symmetry.md-45-
meep-openmpi-1.12.0/doc/docs/Exploiting_Symmetry.md:46:In a cylindrical simulation, fields can be written in the form of a function of ($r$,$z$) multiplied by a function $\exp(im\phi)$ for the $\phi$ dependence, where $m$ is a user-specified parameter (related to the angular momentum of the field). If the cell includes the $r$=0 origin, then $m$ must be an integer to be single-valued at the origin. Otherwise, $m$ can be arbitrary (this is useful e.g. for bend simulations).
meep-openmpi-1.12.0/doc/docs/Exploiting_Symmetry.md-47-
##############################################
meep-openmpi-1.12.0/doc/docs/FAQ.md-483-
meep-openmpi-1.12.0/doc/docs/FAQ.md:484:To model e.g., fiber waveguides with 2d claddings, diffractive binary gratings with arbitrary incident planewaves in 3d, etc. in Cartesian coordinates, you would create a 2d cell in the $xy$ plane and specify a `k_point` with *non-zero* component in $z$. The resulting 3d simulation involves all electromagnetic fields (rather than a 2d simulation which involves a subset of the fields determined by the polarization of the current source). Performance can be improved by specifying `special_kz=True` in the `Simulation` constructor; this results in a 2d simulation with real rather than complex fields (as long as the $x$ and $y$ components of `k_point` are zero).
meep-openmpi-1.12.0/doc/docs/FAQ.md-485-
##############################################
meep-openmpi-1.12.0/doc/docs/Guile_and_Scheme_Information.md-83-
meep-openmpi-1.12.0/doc/docs/Guile_and_Scheme_Information.md:84:``for x in `seq a dx b`; do meep x=$x myfile.ctl; done``
##############################################
meep-openmpi-1.12.0/doc/docs/Introduction.md-51-
meep-openmpi-1.12.0/doc/docs/Introduction.md:52:For example, suppose we are describing some photonic structure at [infrared](https://en.wikipedia.org/wiki/Infrared) frequencies, where it is convenient to specify distances in [microns](https://en.wikipedia.org/wiki/Micrometre). Thus, we let $a$ = 1 μm. Then, if we want to specify a source corresponding to λ = 1.55 μm, we specify the frequency *f* as 1/1.55 = 0.6452. If we want to run our simulation for 100 periods, we then run it for 155 time units (= 100/*f*). At a grid resolution ($Δx$) of 10 pixels/μm and [Courant factor](https://en.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E2%80%93Lewy_condition) ($S$) of 0.5, one timestep is 0.05 time units or 166.67 μs ($cΔ t = SΔ x$).
meep-openmpi-1.12.0/doc/docs/Introduction.md-53-
##############################################
meep-openmpi-1.12.0/doc/docs/Introduction.md-62-
meep-openmpi-1.12.0/doc/docs/Introduction.md:63:With ordinary [periodic boundaries](FAQ.md#how-does-k_point-define-the-phase-relation-between-adjacent-unit-cells) in a cell of size $L$, the field components satisfy $f(x+L) = f(x)$. **Bloch periodicity** is a generalization where $f(x+L) = e^{ik_x L} f(x)$ for some *Bloch wavevector* $\mathbf{k}$. This can be used to solve for the modes of waveguides, gratings, and so on, much like in [MPB](https://mpb.readthedocs.io). See Chapter 3 of [Photonic Crystals: Molding the Flow of Light (second edition)](http://ab-initio.mit.edu/book).
meep-openmpi-1.12.0/doc/docs/Introduction.md-64-
##############################################
meep-openmpi-1.12.0/doc/docs/Materials.md-33-
meep-openmpi-1.12.0/doc/docs/Materials.md:34:where σ$_D$ is the electric conductivity, ω$_n$ and γ$_n$ are user-specified constants. Actually, the numbers that one specifies are f$_n$ = ω$_n$/2π and γ$_n$/2π. The  σ$_n(\mathbf{x})$ is a user-specified function of position giving the strength of the *n*-th resonance. The σ parameters can be anisotropic (real-symmetric) tensors, while the frequency-independent term ε$_\infty$ can be an arbitrary real-symmetric tensor as well. This corresponds to evolving **P** via the equations:
meep-openmpi-1.12.0/doc/docs/Materials.md-35-
##############################################
meep-openmpi-1.12.0/doc/docs/Materials.md-59-
meep-openmpi-1.12.0/doc/docs/Materials.md:60:where λ is the vacuum wavelength, each term containing two coefficients (B<sub>n</sub> and C<sub>n</sub>) can be directly transferred to a Lorentzian polarization field using a simple substitution of variables: ω<sub>n</sub>=1/$\sqrt{C_n}$, γ<sub>n</sub>=0, and σ<sub>n</sub>=B<sub>n</sub>. Several examples of importing Sellmeier coefficients from published fitting data including [germanium](https://github.com/NanoComp/meep/blob/master/python/materials.py#L870-L886) (Ge) and [gallium nitride](https://github.com/NanoComp/meep/blob/master/python/materials.py#L1148-L1173) (GaN) are provided in the [Materials Library](#materials-library).
meep-openmpi-1.12.0/doc/docs/Materials.md-61-
##############################################
meep-openmpi-1.12.0/doc/docs/Materials.md-96-
meep-openmpi-1.12.0/doc/docs/Materials.md:97:**Note**: the "conductivity" in Meep is slightly different from the conductivity you might find in a textbook, because for computational convenience it appears as $\sigma_D \mathbf{D}$ in our Maxwell equations rather than the more-conventional $\sigma \mathbf{E}$; this just means that our definition is different from the usual electric conductivity by a factor of ε. Also, just as Meep uses the dimensionless relative permittivity for ε, it uses nondimensionalized units of 1/*a* (where *a* is your unit of distance) for the conductivities $\sigma_{D,B}$. If you have the electric conductivity $\sigma$ in SI units and want to convert to $\sigma_D$ in Meep units, you can simply use the formula: $\sigma_D = (a/c) \sigma / \varepsilon_r \varepsilon_0$ where *a* is your unit of distance in meters, *c* is the vacuum speed of light in m/s, $\varepsilon_0$ is the SI vacuum permittivity, and $\varepsilon_r$ is the real relative permittivity.
meep-openmpi-1.12.0/doc/docs/Materials.md-98-
##############################################
meep-openmpi-1.12.0/doc/docs/Materials.md-133-
meep-openmpi-1.12.0/doc/docs/Materials.md:134:where $\Delta N(\mathbf{x},t) = N_{\textrm{upper}} - N_{\textrm{lower}}$ is the inversion of the two atomic energy levels which comprise the $n$th lasing transition, $\omega_n$ is the central frequency of the atomic transition, $\Gamma_n$ is the full width half-maximum of the width of the transition, and $\boldsymbol{\sigma}_n$ is the strength and orientation of the $n$th transition which couples the electric field and the atomic medium. Note that this polarization equation is only modeling the nonlinear, saturable portion of the polarization. The atomic level population densities, $N_i(\mathbf{x},t)$, each satisfy a rate equation of the form:
meep-openmpi-1.12.0/doc/docs/Materials.md-135-
##############################################
meep-openmpi-1.12.0/doc/docs/Mode_Decomposition.md-66-
meep-openmpi-1.12.0/doc/docs/Mode_Decomposition.md:67:+ `parity` is the parity of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry in the source region. If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `ODD_Z+EVEN_Y`. This is especially useful in 2d simulations to restrict yourself to a desired polarization
meep-openmpi-1.12.0/doc/docs/Mode_Decomposition.md-68-
##############################################
meep-openmpi-1.12.0/doc/docs/Mode_Decomposition.md-72-
meep-openmpi-1.12.0/doc/docs/Mode_Decomposition.md:73:+ `coeffs` is a user-allocated array of type `std::complex<double>` (shortened hereafter to `cdouble`) of length `2*num_freqs*num_bands` where `num_freqs` is the number of frequencies stored in the `flux` object (equivalent to `flux->Nfreq`) and `num_bands` is the length of the `bands` input array. The expansion coefficients for the mode with frequency `nf` and band index `nb`  are stored sequentially as α$^+$, α$^-$ starting at slot `2*nb*num_freqs+nf` of this array
meep-openmpi-1.12.0/doc/docs/Mode_Decomposition.md-74-
##############################################
meep-openmpi-1.12.0/doc/docs/Mode_Decomposition.md-86-
meep-openmpi-1.12.0/doc/docs/Mode_Decomposition.md:87:+ `kdom_list` is a user allocated array of `meep::vec` objects of length (`num_bands` * `num_freqs`). If non-null, this array is filled in with the wavevectors of the dominant planewave in the Fourier series expansion for each band from 1 to (`num_bands` * `num_freqs`). `kdom_list[nb*num_freqs + nf]` is the dominant planewave of the mode with frequency `nf` and band index `nb`. (Defaults to `NULL`.)  This is especially useful for interpreting the modes computed in a uniform medium, because those modes are exactly planewaves proportional to $exp(2\pi i \mathrm{kdom}\cdot \vec{x})$ where `kdom` is the wavevector.
meep-openmpi-1.12.0/doc/docs/Mode_Decomposition.md-88-
##############################################
meep-openmpi-1.12.0/doc/docs/Mode_Decomposition.md-203-
meep-openmpi-1.12.0/doc/docs/Mode_Decomposition.md:204:where $S$ is any surface transverse to the direction of propagation and $\hat{\mathbf{n}}$ is the unit normal vector to $S$ (i.e. $\hat{\mathbf{z}}$ in the case considered above). The normalization constant $C_{m}$ is a matter of convention, but in MPB it is taken to be the group velocity of the mode, $v_m$, times the area $A_S$ of the cross-sectional surface $S$: $$C_m = v_m A_S$$.
meep-openmpi-1.12.0/doc/docs/Mode_Decomposition.md-205-
##############################################
meep-openmpi-1.12.0/doc/docs/Perfectly_Matched_Layer.md-27-
meep-openmpi-1.12.0/doc/docs/Perfectly_Matched_Layer.md:28:For sources extending into the PML, such as planewaves which must span the entire width of the cell with Bloch-periodic boundary conditions (see e.g. [Tutorials/Basics/Mie Scattering of a Lossless Dielectric Sphere](Python_Tutorials/Basics.md#mie-scattering-of-a-lossless-dielectric-sphere)), the `is_integrated` parameter of the `Source` object must be set to `True` in order to generate planar wavefronts. This is demonstrated in the following example for an $E_z$-polarized planewave propagating in the $x$ direction in a 2d cell surrounded by PML. A side-by-side comparison of the $E_z$ field profile indicates that the wavefronts are not planar for `is_integrated=False` (the default).
meep-openmpi-1.12.0/doc/docs/Perfectly_Matched_Layer.md-29-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Basics.md-51-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Basics.md:52:The waveguide is specified by a `Block` (parallelepiped) of size $\infty \times 1 \times \infty$, with $ε=12$, centered at (0,0) which is the center of the cell. By default, any place where there are no objects there is air ($ε=1$), although this can be changed by setting the `default_material` variable. The resulting structure is shown below.
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Basics.md-53-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Basics.md-63-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Basics.md:64:We gave the source a frequency of 0.15, and specified a [`ContinuousSource`](../Python_User_Interface.md#continuoussource) which is just a fixed-frequency sinusoid $\exp(-i \omega t)$ that by default is turned on at $t=0$. Recall that, in [Meep units](../Introduction.md#units-in-meep), frequency is specified in units of 2πc, which is equivalent to the inverse of the vacuum wavelength. Thus, 0.15 corresponds to a vacuum wavelength of about 1/0.15=6.67 μm, or a wavelength of about 2 μm in the ε=12 material &mdash; thus, our waveguide is half a wavelength wide, which should hopefully make it single mode. In fact, the cutoff for single-mode behavior in this waveguide is analytically solvable, and corresponds to a frequency of 1/2√11 or roughly 0.15076. Note also that to specify a J<sub>z</sub>, we specify a component `Ez` (e.g., if we wanted a magnetic current, we would specify `Hx`, `Hy`, or `Hz`). The current is located at (-7,0), which is 1 μm to the right of the left edge of the cell &mdash; we always want to leave a little space between sources and the cell boundaries, to keep the boundary conditions from interfering with them.
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Basics.md-65-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Basics.md-806-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Basics.md:807:The signal processing is performed by the `Harminv` routine, which takes four arguments: the field component E<sub>z</sub> and position ($r$+0.1,0) to analyze, and a frequency range given by a center frequency and bandwidth (same as the source pulse). Note that we wrap `Harminv` in `after_sources(...)`, since we only want to analyze the frequencies in the source-free system (the presence of a source will distort the analysis). At the end of the run, `Harminv` prints a series of lines (beginning with `harminv0:`) listing the frequencies it found:
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Basics.md-808-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Eigenmode_Source.md-164-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Eigenmode_Source.md:165:Note that this example involves a `ContinuousSource` for the time profile. For a pulsed source, the oblique planewave is incident at a given angle for only a *single* frequency component of the source. This is a fundamental feature of FDTD simulations and not of Meep per se. Thus, to simulate an incident planewave at multiple angles for a given frequency ω, you will need to do separate simulations involving different values of $\vec{k}$ (`k_point`) since each set of ($\vec{k}$,ω) specifying the Bloch-periodic boundaries and the frequency of the source will produce a different angle of the planewave. For more details, refer to Section 4.5 ("Efficient Frequency-Angle Coverage") in [Chapter 4](https://arxiv.org/abs/1301.5366) ("Electromagnetic Wave Source Conditions") of [Advances in FDTD Computational Electrodynamics: Photonics and Nanotechnology](https://www.amazon.com/Advances-FDTD-Computational-Electrodynamics-Nanotechnology/dp/1608071707).
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Eigenmode_Source.md-166-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/GDSII_Import.md-152-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/GDSII_Import.md:153:For a given waveguide separation distance (`d`), the simulation computes the transmittance of Ports 2, 3, and 4. The transmittance is the square of the [S-parameter](https://en.wikipedia.org/wiki/Scattering_parameters) which is equivalent to the [mode coefficient](Mode_Decomposition.md). There is an additional mode monitor at Port 1 to compute the input power from the adjacent eigenmode source; this is used for normalization when computing the transmittance. The eight layers of the GDSII file are each converted to a `Simulation` object: the upper and lower branches of the coupler are defined as a collection of [`Prism`](../Python_User_Interface.md#prism)s, the rectilinear regions of the source and flux monitor as a [`Volume`](../Python_User_Interface.md#volume) and [`FluxRegion`](../Python_User_Interface.md#fluxregion). The size of the cell in the $y$ direction is dependent on `d`. The default dimensionality is 2d. An optional input parameter (`three_d`) converts the geometry to 3d by extruding the coupler geometry in the *z* direction and adding an oxide layer beneath similar to a [silicon on insulator](https://en.wikipedia.org/wiki/Silicon_on_insulator) (SOI) substrate. A schematic of the coupler design in 3d generated using MayaVi is shown below.
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/GDSII_Import.md-154-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Local_Density_of_States.md-14-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Local_Density_of_States.md:15:where $Q^{(n)}=\omega^{(n)}/2\gamma^{(n)}$ is the dimensionless [quality factor](https://en.wikipedia.org/wiki/Q_factor) and $V^{(n)}$ is the modal volume. This represents another way to compute the LDOS. In this tutorial, we will verify this expression by comparing it to the earlier one.
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Local_Density_of_States.md-16-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Local_Density_of_States.md-18-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Local_Density_of_States.md:19:We will validate both this prediction and the LDOS calculations above by computing the LDOS at the center of the cavity, the point of peak $|\vec{E}|$, in two ways. First, we compute the LDOS directly from the power radiated by a dipole, Fourier-transforming the result of a pulse using the `dft_ldos` command. Second, we compute the cavity mode and its lifetime $Q$ using `Harminv` and then compute the LDOS by the Purcell formula shown above. The latter technique is much more efficient for high Q (small $w$), since one must run the simulation for a very long time to directly accumulate the Fourier transform of a slowly-decaying mode. The two calculations, we will demonstrate, agree to within discretization error, verifying the LDOS analysis above, and $Q/V$ is asymptotically linear on a semilog scale versus $1/w$ as predicted.
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Local_Density_of_States.md-20-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Material_Dispersion.md-161-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Material_Dispersion.md:162:The `run_k_points` function returns a *list of lists* of frequencies &mdash; one list of complex frequencies for each *k* point &mdash; which we store in the `all_freqs` variable. Finally, we want to loop over this list and print out the corresponding ε via the ratio (ck/ω)$^2$ as described above. To do this, we will use Python's `zip` function which combines multiple lists into one:
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Material_Dispersion.md-163-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Mode_Decomposition.md-249-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Mode_Decomposition.md:250:Note the use of the keyword parameter argument `eig_parity=mp.ODD_Z+mp.EVEN_Y` in the call to `get_eigenmode_coefficients`. This is important for specifying **non-degenerate** modes in MPB since the `k_point` is (0,0,0). `ODD_Z` is for modes with $E_z$ polarization. `EVEN_Y` is necessary since each diffraction order which is based on a given k<sub>x</sub> consists of *two* modes: one going in the +y direction and the other in the -y direction. `EVEN_Y` forces MPB to compute only the +k<sub>y</sub> + -k<sub>y</sub> (cosine) mode. As a result, the total transmittance must be halved in this case to obtain the transmittance for the individual +k<sub>y</sub> or -k<sub>y</sub> mode. For `ODD_Y`, MPB will compute the +k<sub>y</sub> - -k<sub>y</sub> (sine) mode but this will have zero power because the source is even. If the $y$ parity is left out, MPB will return a random superposition of the cosine and sine modes. Alternatively, in this example an input planewave with H<sub>z</sub> instead of $E_z$ polarization can be used which requires `eig_parity=mp.EVEN_Z+mp.ODD_Y` as well as an odd mirror symmetry plane in *y*. Finally, note the use of `add_flux` instead of `add_mode_monitor` when using symmetries.
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Mode_Decomposition.md-251-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md-92-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md:93:For the second of two cases, we use the `get_farfield` routine to compute the far fields by looping over a set of 100 equally-spaced points along the circumference of a circle with radius of 1 mm. The six far field components ($E_x$, $E_y$, $E_z$, $H_x$, $H_y$, $H_z$) are stored as separate arrays of complex numbers. From the far fields at each point $\mathbf{r}$, we compute the outgoing or radial flux: $\sqrt{P_x^2+P_y^2}$, where $P_x$ and $P_y$ are the components of the Poynting vector $\mathbf{P}(\mathbf{r})=(P_x,P_y,P_z)=\mathrm{Re}\, \mathbf{E}(\mathbf{r})^*\times\mathbf{H}(\mathbf{r})$. Note that $P_z$ is always 0 since this is a 2d simulation. The total flux is computed and the three flux values are displayed.
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Near_to_Far_Field_Spectra.md-94-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Optical_Forces.md-117-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Optical_Forces.md:118:There are two important items to note in `parallel_waveguide`: (1) a single flux surface is used to compute the Poynting flux in $z$ which spans an area slightly larger than both waveguides rather than two separate flux surfaces (one for each waveguide). This is because in the limit of small separation, two flux surfaces overlap whereas the total power through a single flux surface need, by symmetry, only be halved in order to determine the value for just one of the two waveguides. (2) Instead of defining a closed, four-sided "box" surrounding the waveguides, the MST is computed along just two $y$-oriented lines (to obtain the force in the $x$ direction) with different `weight` values to correctly sum the total force. By symmetry, the force in the $y$ direction is zero and need not be computed. Choosing a suitable runtime requires some care. A large runtime is necessary to obtain the steady-state response but this will also lead to large values for the discrete Fourier-transformed fields used to compute both the flux and the MST. Large floating-point numbers may contain [roundoff errors](https://en.wikipedia.org/wiki/Round-off_error).
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Optical_Forces.md-119-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-88-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:89:The source will now be the usual Gaussian pulse centered at `fcen`, located at one edge of the cell just outside the PML, at `x = - 0.5 * sx + dpml`. Ideally, we would excite exactly the fundamental mode of the waveguide, but it is good enough to just excite it with a line source. Moreover, since we are interested in the $P$ polarization (electric field in the plane), we will excite it with a $J_y$ current source (transverse to the propagation direction), which is specified as `Ey`:
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-90-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-277-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:278:The results, shown above, are exactly what we expected: at first, an exponential increase of $Q$ with `N`, and then a saturation at $Q_r \approx 8750$. However, when we look at the Harminv output for larger `N`, something strange happens &mdash; it starts to find *more modes*! For example, at `N=16`, the output is:
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-279-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-306-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:307:Let us briefly review the problem. In a periodic system of this sort, the eigen-solutions can be expressed in the form of *Bloch modes*: a periodic *Bloch envelope* multiplied by a planewave $\exp[i(\mathbf{k}\cdot\mathbf{x}-ω t)]$, where **k** is the *Bloch wavevector*. We wish to find the *bands* $ω(\mathbf{k})$. In this case, there is only *one* direction of periodicity, so we only have one wavevector component $k_x$. Moreover, the solutions are periodic functions of this wavevector: for a unit-period structure, $k_x$ and $k_x+2\pi$ are redundant. Also, $k_x$ and $-k_x$ are redundant by time-reversal symmetry, so we only need to look for solutions in the *irreducible Brillouin zone* from $k_x=0$ to $k_x=\pi$.
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-308-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-374-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:375:Here, we have used Meep's built-in `interpolate` function to interpolate a set of 19 $\mathbf{k}$ points between $\mathbf{k} = 0$ and $\mathbf{k} = 0.5 \cdot 2π \hat{\mathbf{x}}$, to cover the irreducible Brillouin zone. This function automatically runs Harminv, using the frequency range and location taken from the Gaussian source in the `sources` list. It also calls `output_epsilon`. The output is not only the usual `harminv:` lines, but it also outputs a series of lines like:
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-376-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-38-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md:39:The key thing is to set the `dimensions` parameter to `CYLINDRICAL`. This means that all vectors will represent ($r$,φ,$z$) coordinates instead of ($x$,$y$,$z$). The computational cell in the $r$ direction is of size `sr = r + w + pad + dpml`, and runs from `0` to `sr` (by default) rather than from `-sr/2` to `sr/2` as it would for any other dimension. Note that our $z$ size is 0 because it is in 2d. The φ size is also 0, corresponding to the continuous rotational symmetry. A finite φ size might correspond to discrete rotational symmetry, but this is not currently supported.
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-40-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-86-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md:87:At the very end, we'll also output one period of the fields to make movies, etcetera. A single field output would be a 1d dataset along the $r$ direction, so to make things more interesting we'll use `to_appended` to append these datasets to a single HDF5 file to get an $r \times t$ 2d dataset. We'll also use `in_volume` to specify a larger output volume than just the computational cell: in particular, we'll output from `-sr` to `sr` in the $r$ direction, where Meep will automatically infer the $-r$ field values from the reflection symmetry.
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-88-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-133-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md:134:The problem is twofold. First, there is some signal-processing error in determining $Q$ in the 2d case, as indicated by the "error" column of the `harminv` output which is only 4e-7 for the 2d simulation vs. 6e-11 for the cylindrical case. We can bring this error down by running with a narrower bandwidth source, which excites just one mode and gives a cleaner signal, or by analyzing over a longer time than 200. Doing the former, we find that the 2d value of $Q$ at a resolution of 20 should really be $Q$=343. Second, [PML](../Perfectly_Matched_Layer.md) absorbing layers are really designed to absorb planewaves incident on flat interfaces, but here we have a *cylindrical* PML layer. Because of this, there are larger numerical reflections from the PML in the cylindrical simulation, which we can rectify by pushing the PML out to a larger radius (i.e. using a larger value of `pad`) and/or increasing the PML thickness (increasing `dpml`) so that it turns on more adiabatically. In the cylindrical simulation for `resolution = 20`, if we increase to `dpml = 16`, we get $Q$=343, which is in much better agreement with the 2d calculation and if we increase to `dpml = 32` we get the same $Q$=343, so it seems to be converged.
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-135-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md-6-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md:7:Since this is a 1d calculation, we could implement it via a 2d cell of `Vector3(S,0,0)`, specifying periodic boundary conditions in the $y$ direction. However, this is slightly inefficient since the $y$ periodic boundaries are implemented internally via extra "ghost pixels" in the $y$ direction. Instead, Meep has special support for 1d simulations in the $z$ direction. To use this, we must explicitly set `dimensions` to `1`, and in that case we can *only* use $E_x$ (and $D_x$) and $H_y$ field components. This involves no loss of generality because of the symmetry of the problem.
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md-8-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md-98-
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md:99:We could print these with more `display_fluxes` lines, but it is nice to print these on a single line along with χ$^{(3)}$ and the amplitude, so that we can eventually put them all into one table in our plotting program. To do this, we'll use the lower-level function `get_fluxes(trans1)`, which returns a list of the flux values, and take the first element of the list since there is only one:
meep-openmpi-1.12.0/doc/docs/Python_Tutorials/Third_Harmonic_Generation.md-100-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-97-meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:98:Explicitly specifies the dimensionality of the simulation, if the value is less than 3. If the value is 3 (the default), then the dimensions are automatically reduced to 2 if possible when `cell_size` in the $z$ direction is `0`. If `dimensions` is the special value of `CYLINDRICAL`, then cylindrical coordinates are used and the $x$ and $z$ dimensions are interpreted as $r$ and $z$, respectively. If `dimensions` is 1, then the cell must be along the $z$ direction and only $E_x$ and $H_y$ field components are permitted. If `dimensions` is 2, then the cell must be in the $xy$ plane.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-99-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-101-meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:102:For `CYLINDRICAL` simulations, specifies that the angular $\phi$ dependence of the fields is of the form $e^{im\phi}$ (default is `m=0`). If the simulation cell includes the origin $r=0$, then `m` must be an integer.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-103-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-105-meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:106:For `CYLINDRICAL` simulations with |*m*| &gt; 1, compute more accurate fields near the origin $r=0$ at the expense of requiring a smaller Courant factor. Empirically, when this option is set to `True`, a Courant factor of roughly $\min[0.5, 1 / (|m| + 0.5)]$ or smaller seems to be needed. Default is `False`, in which case the $D_r$, $D_z$, and $B_r$ fields within |*m*| pixels of the origin are forced to zero, which usually ensures stability with the default Courant factor of 0.5, at the expense of slowing convergence of the fields near $r=0$.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-107-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-113-meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:114:If `False` (the default), then the boundaries are perfect metallic (zero electric field). If a `Vector3`, then the boundaries are Bloch-periodic: the fields at one side are $\exp(i\mathbf{k}\cdot\mathbf{R})$ times the fields at the other side, separated by the lattice vector $\mathbf{R}$. A non-zero `Vector3` will produce complex fields. The `k_point` vector is specified in Cartesian coordinates in units of 2π/distance. Note: this is *different* from [MPB](https://mpb.readthedocs.io), equivalent to taking MPB's `k_points` through its function `reciprocal->cartesian`.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-115-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-117-meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:118:A 2d cell (i.e., `dimensions=2`) combined with a `k_point` that has a *non-zero* component in $z$ would normally result in a 3d simulation with complex fields. However, by default (`kz_2d="complex"`), Meep will use a 2d computational cell in which $k_z$ is incorporated as an additional term in Maxwell's equations, which still results in complex fields but greatly improved performance.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-119-Setting `kz_2d="3d"` will instead use a 3d cell that is one pixel thick (with Bloch-periodic boundary conditions), which is considerably more expensive. The third possibility, `kz_2d="real/imag"`, saves an additional factor of two by storing some field components as purely real and some as purely imaginary in a "real" field, but this option requires some care to use and will be explained elsewhere in the future.
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-333-meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:334:The scale factor σ. You can also specify an anisotropic σ tensor by using the property `sigma_diag` which takes three numbers or a `Vector3` to give the σ$_n$ tensor diagonal, and `sigma_offdiag` which specifies the offdiagonal elements (defaults to 0). That is, `sigma_diag=mp.Vector3(a, b, c)` and `sigma_offdiag=mp.Vector3(u, v, w)` corresponds to a σ tensor
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-335-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-736-meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:737:Specify the direction of the boundaries to put the PML layers next to. e.g. if `X`, then specifies PML on the $\pm x$ boundaries (depending on the value of `side`, below). Default is the special value `ALL`, which puts PML layers on the boundaries in all directions.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-738-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-740-meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:741:Specify which side, `Low` or `High` of the boundary or boundaries to put PML on. e.g. if side is `Low` and direction is `X`, then a PML layer is added to the $-x$ boundary. Default is the special value `ALL`, which puts PML layers on both sides.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-742-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-748-meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:749:By default, Meep turns on the PML conductivity quadratically within the PML layer &mdash; one doesn't want to turn it on suddenly, because that exacerbates reflections due to the discretization. More generally, with `pml_profile` one can specify an arbitrary PML "profile" function $f(u)$ that determines the shape of the PML absorption profile up to an overall constant factor. *u* goes from 0 to 1 at the start and end of the PML, and the default is $f(u) = u^2$. In some cases where a very thick PML is required, such as in a periodic medium (where there is technically no such thing as a true PML, only a pseudo-PML), it can be advantageous to turn on the PML absorption more smoothly. See [Optics Express, Vol. 16, pp. 11376-92, 2008](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). For example, one can use a cubic profile $f(u) = u^3$ by specifying `pml_profile=lambda u: u*u*u`.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-750-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-764-
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:765:The `Source` class is used to specify the current sources via the `Simulation.sources` attribute. Note that all sources in Meep are separable in time and space, i.e. of the form $\mathbf{J}(\mathbf{x},t) = \mathbf{A}(\mathbf{x}) \cdot f(t)$ for some functions $\mathbf{A}$ and $f$. Non-separable sources can be simulated, however, by modifying the sources after each time step. When real fields are being used (which is the default in many cases; see `Simulation.force_complex_fields`), only the real part of the current source is used.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-766-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-806-
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:807:This is a subclass of `Source` and has **all of the properties** of `Source` above. However, you normally do not specify a `component`. Instead of `component`, the current source components and amplitude profile are computed by calling MPB to compute the modes, $\mathbf{u}_{n,\mathbf{k}}(\mathbf{r}) e^{i \mathbf{k} \cdot \mathbf{r}}$, of the dielectric profile in the region given by the `size` and `center` of the source, with the modes computed as if the *source region were repeated periodically in all directions*. If an `amplitude` and/or `amp_func` are supplied, they are *multiplied* by this current profile. The desired eigenmode and other features are specified by the following properties:
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-808-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-814-meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:815:By default (if `eig_match_freq` is `True`), Meep tries to find a mode with the same frequency ω<sub>*n*</sub>(**k**) as the `src` property (above), by scanning **k** vectors in the given `direction` using MPB's `find_k` functionality. Alternatively, if `eig_kpoint` is supplied, it is used as an initial guess for **k**. By default, `direction` is the direction normal to the source region, assuming `size` is $d$–1 dimensional in a $d$-dimensional simulation (e.g. a plane in 3d). If `direction` is set to `mp.NO_DIRECTION`, then `eig_kpoint` is not only the initial guess and the search direction of the **k** vectors, but is also taken to be the direction of the waveguide, allowing you to [launch modes in oblique ridge waveguides](Python_Tutorials/Eigenmode_Source.md#index-guided-modes-in-a-ridge-waveguide) (not perpendicular to the source plane).  If `eig_match_freq` is `False`, then the specific **k** vector of the desired mode is specified with  `eig_kpoint` (in Meep units of 2π/(unit length)). By default, the **k** components in the plane of the source region are zero.  However, if the source region spans the *entire* cell in some directions, and the cell has Bloch-periodic boundary conditions via the `k_point` parameter, then the mode's **k** components in those directions will match `k_point` so that the mode satisfies the Meep boundary conditions, regardless of `eig_kpoint`. Note that once **k** is either found by MPB, or specified by `eig_kpoint`, the field profile used to create the current sources corresponds to the [Bloch mode](https://en.wikipedia.org/wiki/Bloch_wave), $\mathbf{u}_{n,\mathbf{k}}(\mathbf{r})$, multiplied by the appropriate exponential factor, $e^{i \mathbf{k} \cdot \mathbf{r}}$.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-816-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-818-meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:819:The parity (= polarization in 2d) of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry *in the source region*, with respect to the `center` of the source region.  (In particular, it does not matter if your simulation as a whole has that symmetry, only the cross section where you are introducing the source.) If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `EVEN_Z + ODD_Y`. Default is `NO_PARITY`, in which case MPB computes all of the bands which will still be even or odd if the structure has mirror symmetry, of course. This is especially useful in 2d simulations to restrict yourself to a desired polarization.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-820-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-900-meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:901:How many `width`s the current decays for before it is cut off and set to zero &mdash; this applies for both turn-on and turn-off of the pulse. Default is 5.0. A larger value of `cutoff` will reduce the amount of high-frequency components that are introduced by the start/stop of the source, but will of course lead to longer simulation times. The peak of the Gaussian is reached at the time $t_0$=`start_time + cutoff*width`.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-902-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-915-$$
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:916:where $G(t)$ is the current (not the dipole moment). In this formula, $\Delta f$ is the `fwidth` of the source, $\omega_0$ is $2\pi$ times its `frequency,` and $t_0$ is the peak time discussed above. Note that this does not include any `amplitude` or `amp_func` factor that you specified for the source.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-917-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-1060-meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:1061:Given a `direction` constant, and a `mp.Volume`, returns the flux (the integral of $\Re [\mathbf{E}^* \times \mathbf{H}]$) in that volume. Most commonly, you specify a volume that is a plane or a line, and a direction perpendicular to it, e.g. `flux_in_box(d=mp.X,mp.Volume(center=mp.Vector3(0,0,0),size=mp.Vector3(0,1,1)))`. If the `center` and `size` arguments are provided instead of `box`, Meep will construct the appropriate volume for you.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-1062-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-1064-meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:1065:Given a `mp.Volume`, returns the integral of the electric-field energy $\mathbf{E}^* \cdot \mathbf{D}/2$ in the given volume. If the volume has zero size along a dimension, a lower-dimensional integral is used. If the `center` and `size` arguments are provided instead of `box`, Meep will construct the appropriate volume for you.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-1066-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-1068-meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:1069:Given a `mp.Volume`, returns the integral of the magnetic-field energy $\mathbf{H}^* \cdot \mathbf{B}/2$ in the given volume. If the volume has zero size along a dimension, a lower-dimensional integral is used. If the `center` and `size` arguments are provided instead of `box`, Meep will construct the appropriate volume for you.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-1070-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-1072-meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:1073:Given a `mp.Volume`, returns the integral of the electric- and magnetic-field energy $\mathbf{E}^* \cdot \mathbf{D}/2 + \mathbf{H}^* \cdot \mathbf{B}/2$ in the given volume. If the volume has zero size along a dimension, a lower-dimensional integral is used. If the `center` and `size` arguments are provided instead of `box`, Meep will construct the appropriate volume for you.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-1074-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-1221-
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:1222:The flux object should be created using `add_mode_monitor`.  (You could also use `add_flux`, but with `add_flux` you need to be more careful about symmetries that bisect the flux plane: the `add_flux` object should only be used with `get_eigenmode_coefficients` for modes of the same symmetry, e.g. constrained via `eig_parity`.  On the other hand, the performance of `add_flux` planes benefits more from symmetry.) `eig_vol` is the volume passed to [MPB](https://mpb.readthedocs.io) for the eigenmode calculation (based on interpolating the discretized materials from the Yee grid); in most cases this will simply be the volume over which the frequency-domain fields are tabulated, which is the default (i.e. `flux.where`). `eig_parity` should be one of [`mp.NO_PARITY` (default), `mp.EVEN_Z`, `mp.ODD_Z`, `mp.EVEN_Y`, `mp.ODD_Y`]. It is the parity (= polarization in 2d) of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry *in the source region*, just as for `EigenmodeSource` above. If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `EVEN_Z+ODD_Y`. Default is `NO_PARITY`, in which case MPB computes all of the bands which will still be even or odd if the structure has mirror symmetry, of course. This is especially useful in 2d simulations to restrict yourself to a desired polarization. `eig_resolution` is the spatial resolution to use in MPB for the eigenmode calculations. This defaults to the same resolution as Meep, but you can use a higher resolution in which case the structure is linearly interpolated from the Meep pixels. `eig_tolerance` is the tolerance to use in the MPB eigensolver. MPB terminates when the eigenvalues stop changing to less than this fractional tolerance. Defaults to `1e-12`.  (Note that this is the tolerance for the frequency eigenvalue ω; the tolerance for the mode profile is effectively the square root of this.) For examples, see [Tutorial/Mode Decomposition](Python_Tutorials/Mode_Decomposition.md).
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-1223-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-1324-
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:1325:Most commonly, you will want to **normalize** the force spectrum in some way, just as for flux spectra. Most simply, you could divide two different force spectra to compute the ratio of forces on two objects. Often, you will divide a force spectrum by a flux spectrum, to divide the force $F$ by the incident power $P$ on an object, in order to compute the useful dimensionless ratio $Fc$/$P$ where $c=1$ in Meep units. For example, it is a simple exercise to show that the force $F$ on a perfectly reflecting mirror with normal-incident power $P$ satisfies $Fc$/$P=2$, and for a perfectly absorbing (black) surface $Fc$/$P=1$.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-1326-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-1464-meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:1465:Given an HDF5 file name `fname` (does *not* include the `.h5` suffix), a `Volume` given by `where` (may be 0d, 1d, 2d, or 3d), and a `resolution` (in grid points / distance unit), outputs the far fields in `where` (which may lie *outside* the cell) in a grid with the given resolution (which may differ from the FDTD grid resolution) to the HDF5 file as a set of twelve array datasets `ex.r`, `ex.i`, ..., `hz.r`, `hz.i`, giving the real and imaginary parts of the Fourier-transformed $E$ and $H$ fields on this grid. Each dataset is an nx&#215;ny&#215;nz&#215;nfreq 4d array of space&#215;frequency although dimensions that =1 are omitted. The volume can optionally be specified via `center` and `size`.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-1466-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-1760-meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:1761:Given a list of `Vector3`, `k_points` of *k* vectors, runs a simulation for each *k* point (i.e. specifying Bloch-periodic boundary conditions) and extracts the eigen-frequencies, and returns a list of the complex frequencies. In particular, you should have specified one or more Gaussian sources. It will run the simulation until the sources are turned off plus an additional $t$ time units. It will run [Harminv](#harminv) at the same point/component as the first Gaussian source and look for modes in the union of the frequency ranges for all sources. Returns a list of lists of frequencies (one list of frequencies for each *k*). Also prints out a comma-delimited list of frequencies, prefixed by `freqs:`, and their imaginary parts, prefixed by `freqs-im:`. See [Tutorial/Resonant Modes and Transmission in a Waveguide Cavity](Python_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md).
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-1762-
##############################################
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-1817-
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md:1818:It is often useful to use the h5topng `-C` or `-A` options to overlay the dielectric function when outputting fields. To do this, you need to know the name of the dielectric-function `.h5` file which must have been previously output by `output_epsilon`. To make this easier, a built-in shell variable `$EPS` is provided which refers to the last-output dielectric-function `.h5` file. So, for example `output_png(mp.Ez,"-C $EPS")` will output the $E_z$ field and overlay the dielectric contours.
meep-openmpi-1.12.0/doc/docs/Python_User_Interface.md-1819-
##############################################
meep-openmpi-1.12.0/doc/docs/Replacements.vim-22-:%s/\\)/$/g
meep-openmpi-1.12.0/doc/docs/Replacements.vim:23::%s/^`\(.*\)`$/```\r\1\r```\r/g
meep-openmpi-1.12.0/doc/docs/Replacements.vim-24-:%s/```\n\n```\n//g
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Basics.md-72-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Basics.md:73:We gave the source a frequency of 0.15, and specified a `continuous-src` which is just a fixed-frequency sinusoid $\exp(-i \omega t)$ that by default is turned on at $t$=0. Recall that, in [Meep units](../Introduction.md#units-in-meep), frequency is specified in units of 2πc, which is equivalent to the inverse of the vacuum wavelength. Thus, 0.15 corresponds to a vacuum wavelength of about 1/0.15=6.67 μm, or a wavelength of about 2 μm in the ε=12 material &mdash; thus, our waveguide is half a wavelength wide, which should hopefully make it single mode. In fact, the cutoff for single-mode behavior in this waveguide is analytically solvable, and corresponds to a frequency of 1/2√11 or roughly 0.15076. Note also that to specify a J<sub>z</sub>, we specify a component $Ez$ (e.g. if we wanted a magnetic current, we would specify `Hx`, `Hy`, or `Hz`). The current is located at (-7,0), which is 1 μm to the right of the left edge of the cell &mdash; we always want to leave a little space between sources and the cell boundaries, to keep the boundary conditions from interfering with them.
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Basics.md-74-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Basics.md-170-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Basics.md:171:That is, the file contains a single dataset `ez` that is a 160$\times$160$\times$333 array, where the last dimension is time. This is rather a large file, 66MB; later, we'll see ways to reduce this size if we only want images. We have a number of choices of how to output the fields. To output a single time slice, we can use the same `h5topng` command as before, but with an additional `-t` option to specify the time index: e.g. `h5topng -t 332` will output the last time slice, similar to before. Instead, let's create an animation of the fields as a function of time. First, we have to create images for *all* of the time slices:
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Basics.md-172-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Basics.md-602-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Basics.md:603:The signal processing is performed by the `harminv` function, which takes four arguments: the field component E<sub>z</sub> and position ($r$+0.1,0) to analyze, and a frequency range given by a center frequency and bandwidth (same as the source pulse). Note that we wrap `harminv` in `(after-sources ...)`, since we only want to analyze the frequencies in the source-free system (the presence of a source will distort the analysis). At the end of the run, `harminv` prints a series of lines (beginning with `harminv0:`, to make it easy to `grep` for) listing the frequencies it found:
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Basics.md-604-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-143-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md:144:where $c_n = 1$ if $n=0$ and $c_n=2$ otherwise, $L$ is the side length (if each side has a different length, then the functions $f_n(x)$ will differ for each side). An illustration of these functions for the system under consideration, compared to point sources, is shown below:
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-145-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-446-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md:447:This new function $g(t)$ is computed in the function `make-casimir-g-kz`; use this value of $g(t)$ in `casimir-force-contrib`:
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-448-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-479-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md:480:In cylindrical coordinates, all source surfaces and objects have size `no-size` in the $phi$-direction. Also, the source index passed to `casimir-force-contrib` is given by:
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-481-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-516-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md:517:The arguments are similar to `casimir-force-contrib`, except that now we pass in the Bloch vector (which will be set inside of the function), and instead of a side index we simply pass in $S$, which is only one side of the source surface. As the program cannot detect the orientation of the surface if there is only one side, we have to explicitly multiply by the normal vector (given by `curr-side`). Otherwise, the computation proceeds as in the above cases, with the integration over $k_x$ and $k_y$ done outside of the program.
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Casimir_Forces.md-518-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Eigenmode_Source.md-146-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Eigenmode_Source.md:147:Note that this example involves a `continuous-source` for the time profile. For a pulsed source, the oblique planewave is incident at a given angle for only a *single* frequency component of the source. This is a fundamental feature of FDTD simulations and not of Meep per se. Thus, to simulate an incident planewave at multiple angles for a given frequency ω, you will need to do separate simulations involving different values of $\vec{k}$ (`k-point`) since each set of ($\vec{k}$,ω) specifying the Bloch-periodic boundaries and the frequency of the source will produce a different angle of the planewave. For more details, refer to Section 4.5 ("Efficient Frequency-Angle Coverage") in [Chapter 4](https://arxiv.org/abs/1301.5366) ("Electromagnetic Wave Source Conditions") of [Advances in FDTD Computational Electrodynamics: Photonics and Nanotechnology](https://www.amazon.com/Advances-FDTD-Computational-Electrodynamics-Nanotechnology/dp/1608071707).
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Eigenmode_Source.md-148-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Local_Density_of_States.md-14-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Local_Density_of_States.md:15:where $Q^{(n)}=\omega^{(n)}/2\gamma^{(n)}$ is the dimensionless [quality factor](https://en.wikipedia.org/wiki/Q_factor) and $V^{(n)}$ is the modal volume. This represents another way to compute the LDOS. In this tutorial, we will verify this expression by comparing it to the earlier one.
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Local_Density_of_States.md-16-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Local_Density_of_States.md-18-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Local_Density_of_States.md:19:We will validate both this prediction and the LDOS calculations above by computing the LDOS at the center of the cavity, the point of peak $|\vec{E}|$, in two ways. First, we compute the LDOS directly from the power radiated by a dipole, Fourier-transforming the result of a pulse using the `dft-ldos` command. Second, we compute the cavity mode and its lifetime $Q$ using `harminv` and then compute the LDOS by the Purcell formula shown above. The latter technique is much more efficient for high Q (small $w$), since one must run the simulation for a very long time to directly accumulate the Fourier transform of a slowly-decaying mode. The two calculations, we will demonstrate, agree to within discretization error, verifying the LDOS analysis above, and $Q/V$ is asymptotically linear on a semilog scale versus $1/w$ as predicted.
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Local_Density_of_States.md-20-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Material_Dispersion.md-150-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Material_Dispersion.md:151:The `run-k-points` function returns a *list of lists* of frequencies &mdash; one list of complex frequencies for each *k* point &mdash; which we store in the `all-freqs` variable. Finally, we want to loop over this list and print out the corresponding ε via the ratio (ck/ω)$^2$ as described above. To do this, we will use the Scheme `map` function, which applies a given function to every element of a list (or lists), and since we have a list of lists we'll actually nest two `map` functions:
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Material_Dispersion.md-152-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Mode_Decomposition.md-262-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Mode_Decomposition.md:263:Note the use of the keyword parameter argument `#eig-parity (+ ODD-Z EVEN-Y)` in the call to `get-eigenmode-coefficients`. This is important for specifying **non-degenerate** modes in MPB since the `k-point` is (0,0,0). `ODD-Z` is for modes with $E_z$ polarization. `EVEN-Y` is necessary since each diffraction order which is based on a given k<sub>x</sub> consists of *two* modes: one going in the +y direction and the other in the -y direction. `EVEN-Y` forces MPB to compute only the +k<sub>y</sub> + -k<sub>y</sub> (cosine) mode. As a result, the total transmittance must be halved in this case to obtain the transmittance for the individual +k<sub>y</sub> or -k<sub>y</sub> mode. For `ODD-Y`, MPB will compute the +k<sub>y</sub> - -k<sub>y</sub> (sine) mode but this will have zero power because the source is even. If the $y$ parity is left out, MPB will return a random superposition of the cosine and sine modes. Alternatively, in this example an input planewave with H<sub>z</sub> instead of $E_z$ polarization can be used which requires `#eig_parity (+ EVEN-Z ODD-Y)` as well as an odd mirror symmetry plane in *y*. Finally, note the use of `add-flux` instead of `add-mode-monitor` when using symmetries.
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Mode_Decomposition.md-264-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Near_to_Far_Field_Spectra.md-107-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Near_to_Far_Field_Spectra.md:108:From the far fields at each point $\mathbf{r}$, we compute using Matlab/Octave the outgoing or radial flux: $\sqrt{P_x^2+P_y^2}$, where P$_x$ and P$_y$ are the components of the Poynting vector $\mathbf{P}(\mathbf{r})=(P_x,P_y,P_z)=\mathrm{Re}\, \mathbf{E}(\mathbf{r})^*\times\mathbf{H}(\mathbf{r})$. Note that $P_z$ is always 0 since this is a 2d simulation. The total flux is then computed and displayed:
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Near_to_Far_Field_Spectra.md-109-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-83-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:84:The source will now be the usual Gaussian pulse centered at `fcen`, located at one edge of the cell just outside the PML, at `x = -0.5*sx + dpml`. Ideally, we would excite exactly the fundamental mode of the waveguide, but it is good enough to just excite it with a line source. Moreover, since we are interested in the $P$ polarization (electric field in the plane), we will excite it with a $J_y$ current source (transverse to the propagation direction), which is specified as `Ey`:
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-85-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-260-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:261:The results, shown above, are exactly what we expected: at first, an exponential increase of $Q$ with `N`, and then a saturation at $Q_r \approx 8750$. However, when we look at the Harminv output for larger `N`, something strange happens &mdash; it starts to find *more modes*! For example, at `N=16`, the output is:
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-262-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-289-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:290:Let us briefly review the problem. In a periodic system of this sort, the eigen-solutions can be expressed in the form of *Bloch modes*: a periodic *Bloch envelope* multiplied by a planewave $\exp[i(\mathbf{k}\cdot\mathbf{x}-ω t)]$, where **k** is the *Bloch wavevector*. We wish to find the *bands* $ω(\mathbf{k})$. In this case, there is only *one* direction of periodicity, so we only have one wavevector component $k_x$. Moreover, the solutions are periodic functions of this wavevector: for a unit-period structure, $k_x$ and $k_x+2\pi$ are redundant. Also, $k_x$ and $-k_x$ are redundant by time-reversal symmetry, so we only need to look for solutions in the *irreducible Brillouin zone* from $k_x=0$ to $k_x=\pi$.
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-291-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-350-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md:351:Here, we have used [libctl](https://libctl.readthedocs.io)'s built-in `interpolate` function to interpolate a set of 19 $\mathbf{k}$ points between $\mathbf{k} = 0$ and $\mathbf{k} = 0.5 \cdot 2π \hat{\mathbf{x}}$, to cover the irreducible Brillouin zone. `run-k-points` automatically runs `harminv`, using the frequency range and location taken from the Gaussian source in the `sources` list. It also calls `output-epsilon`. The output is not only the usual `harminv:` lines, but it also outputs a series of lines like:
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Resonant_Modes_and_Transmission_in_a_Waveguide_Cavity.md-352-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-29-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md:30:The key thing is to set the `dimensions` parameter to `CYLINDRICAL`. This means that all vectors will represent ($r$,φ,$z$) coordinates instead of ($x$,$y$,$z$). The computational cell in the $r$ direction is of size `sr = r + w + pad + dpml`, and runs from `0` to `sr` (by default) rather than from `-sr/2` to `sr/2` as it would for any other dimension. Note that our $z$ size is `no-size` because it is in 2d. The φ size is also `no-size`, corresponding to the continuous rotational symmetry. A finite φ size might correspond to discrete rotational symmetry, but this is not currently supported.
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-31-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-69-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md:70:At the very end, we'll also output one period of the fields to make movies, etcetera. A single field output would be a 1d dataset along the $r$ direction, so to make things more interesting we'll use `to-appended` to append these datasets to a single HDF5 file to get an $r \times t$ 2d dataset. We'll also use `in-volume` to specify a larger output volume than just the computational cell: in particular, we'll output from `-sr` to `sr` in the $r$ direction, where Meep will automatically infer the $-r$ field values from the reflection symmetry.
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-71-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-105-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md:106:The problem is twofold. First, there is some signal-processing error in determining $Q$ in the 2d case, as indicated by the "error" column of the `harminv` output which is only 4e-7 for the 2d simulation vs. 6e-11 for the cylindrical case. We can bring this error down by running with a narrower bandwidth source, which excites just one mode and gives a cleaner signal, or by analyzing over a longer time than 200. Doing the former, we find that the 2d value of $Q$ at a resolution of 20 should really be $Q$=343. Second, [PML](../Perfectly_Matched_Layer.md) absorbing layers are really designed to absorb planewaves incident on flat interfaces, but here we have a *cylindrical* PML layer. Because of this, there are larger numerical reflections from the PML in the cylindrical simulation, which we can rectify by pushing the PML out to a larger radius (i.e. using a larger value of `pad`) and/or increasing the PML thickness (increasing `dpml`) so that it turns on more adiabatically. In the cylindrical simulation for `resolution=20`, if we increase to `dpml=16`, we get $Q$=343, which is in much better agreement with the 2d calculation and if we increase to `dpml=32` we get the same $Q$=343, so it seems to be converged.
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Ring_Resonator_in_Cylindrical_Coordinates.md-107-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md-6-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md:7:Since this is a 1d calculation, we could implement it via a 2d cell of `(size S no-size no-size)`, specifying periodic boundary conditions in the $y$ direction. However, this is slightly inefficient since the $y$ periodic boundaries are implemented internally via extra "ghost pixels" in the $y$ direction. Instead, Meep has special support for 1d simulations in the $z$ direction. To use this, we must explicitly set `dimensions` to `1`, and in that case we can *only* use $E_x$ (and $D_x$) and $H_y$ field components. This involves no loss of generality because of the symmetry of the problem.
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md-8-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md-85-
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md:86:We could print these with more `display-fluxes` lines, but it is nice to print these on a single line along with χ$^{(3)}$ and the amplitude, so that we can eventually put them all into one table in our plotting program. To do this, we'll use the lower-level function `(get-fluxes trans1)`, which returns a list of the flux values, and take the first element of the list since there is only one:
meep-openmpi-1.12.0/doc/docs/Scheme_Tutorials/Third_Harmonic_Generation.md-87-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-49-meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:50:Explicitly specifies the dimensionality of the simulation, if the value is less than 3. If the value is 3 (the default), then the dimensions are automatically reduced to 2 if possible when `geometry-lattice` size in the $z$ direction is `no-size`. If `dimensions` is the special value of `CYLINDRICAL`, then cylindrical coordinates are used and the $x$ and $z$ dimensions are interpreted as $r$ and $z$, respectively. If `dimensions` is 1, then the cell must be along the $z$ direction and only $E_x$ and $H_y$ field components are permitted. If `dimensions` is 2, then the cell must be in the $xy$ plane.
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-51-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-53-meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:54:For `CYLINDRICAL` simulations, specifies that the angular $\phi$ dependence of the fields is of the form $e^{im\phi}$ (default is `m=0`). If the simulation cell includes the origin $r=0$, then `m` must be an integer.
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-55-
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-56-**`accurate-fields-near-cylorigin?` [`boolean`]**
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:57:—For `CYLINDRICAL` simulations with |*m*| &gt; 1, compute more accurate fields near the origin $r=0$ at the expense of requiring a smaller Courant factor. Empirically, when this option is set to `true`, a Courant factor of roughly $\min[0.5, 1 / (|m| + 0.5)]$ or smaller seems to be needed. Default is `false`, in which case the $D_r$, $D_z$, and $B_r$ fields within |*m*| pixels of the origin are forced to zero, which usually ensures stability with the default Courant factor of 0.5, at the expense of slowing convergence of the fields near $r=0$.
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-58-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-64-meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:65:If `false` (the default), then the boundaries are perfect metallic (zero electric field). If a `vector3`, then the boundaries are Bloch-periodic: the fields at one side are $\exp(i\mathbf{k}\cdot\mathbf{R})$ times the fields at the other side, separated by the lattice vector $\mathbf{R}$. A non-zero `vector3` will produce complex fields. The `k-point` vector is specified in Cartesian coordinates in units of 2π/distance. Note: this is *different* from [MPB](https://mpb.readthedocs.io), equivalent to taking MPB's `k-points` through its function `reciprocal->cartesian`.
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-66-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-68-meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:69:By default, a 2d cell (i.e., `dimensions` is `2`) combined with a `k-point` that has a *non-zero* component in $z$ results in a 3d simulation with complex fields. However, by setting `special-kz?` to `true`, Meep will use a 2d cell and real fields (if the $x$ and $y$ components of `k-point` are zero) which improves performance.
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-70-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-271-meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:272:The scale factor σ. You can also specify an anisotropic σ tensor by using the property `sigma-diag` which takes three numbers or a `vector3` to give the σ$_n$ tensor diagonal, and `sigma-offdiag` which specifies the offdiagonal elements (defaults to 0). That is, `(sigma-diag a b c)` and `(sigma-offdiag u v w)` corresponds to a σ tensor
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-273-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-591-meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:592:Specify the direction of the boundaries to put the PML layers next to. e.g. if `X`, then specifies PML on the $\pm x$ boundaries (depending on the value of `side`, below). Default is the special value `ALL`, which puts PML layers on the boundaries in all directions.
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-593-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-595-meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:596:Specify which side, `Low` or `High` of the boundary or boundaries to put PML on. e.g. if side is `Low` and direction is `X`, then a PML layer is added to the $-x$ boundary. Default is the special value `ALL`, which puts PML layers on both sides.
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-597-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-607-meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:608:By default, Meep turns on the PML conductivity quadratically within the PML layer &mdash; one doesn't want to turn it on suddenly, because that exacerbates reflections due to the discretization. More generally, with `pml-profile` one can specify an arbitrary PML "profile" function $f(u)$ that determines the shape of the PML absorption profile up to an overall constant factor. *u* goes from 0 to 1 at the start and end of the PML, and the default is $f(u) = u^2$. In some cases where a very thick PML is required, such as in a periodic medium (where there is technically no such thing as a true PML, only a pseudo-PML), it can be advantageous to turn on the PML absorption more smoothly. See [Optics Express, Vol. 16, pp. 11376-92, 2008](http://www.opticsinfobase.org/abstract.cfm?URI=oe-16-15-11376). For example, one can use a cubic profile $f(u) = u^3$ by specifying `(pml-profile (lambda (u) (* u u u)))`.
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-609-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-623-
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:624:The `source` class is used to specify the current sources via the `sources` input variable. Note that all sources in Meep are separable in time and space, i.e. of the form $\mathbf{J}(\mathbf{x},t) = \mathbf{A}(\mathbf{x}) \cdot f(t)$ for some functions $\mathbf{A}$ and $f$. Non-separable sources can be simulated, however, by modifying the sources after each time step. When real fields are being used (which is the default in many cases; see the `force-complex-fields?` input variable), only the real part of the current source is used.
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-625-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-659-
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:660:This is a subclass of `source` and has **all of the properties** of `source` above. However, you normally do not specify a `component`. Instead of `component`, the current source components and amplitude profile are computed by calling MPB to compute the modes, $\mathbf{u}_{n,\mathbf{k}}(\mathbf{r}) e^{i \mathbf{k} \cdot \mathbf{r}}$, of the dielectric profile in the region given by the `size` and `center` of the source, with the modes computed as if the *source region were repeated periodically in all directions*. If an `amplitude` and/or `amp-func` are supplied, they are *multiplied* by this current profile. The desired eigenmode and other features are specified by the following properties:
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-661-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-667-meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:668:By default (if `eig-match-freq?` is `true`), Meep tries to find a mode with the same frequency ω<sub>*n*</sub>(**k**) as the `src` property (above), by scanning **k** vectors in the given `direction` using MPB's `find-k` functionality. Alternatively, if `eig-kpoint` is supplied, it is used as an initial guess for **k**. By default, `direction` is the direction normal to the source region, assuming `size` is $d$–1 dimensional in a $d$-dimensional simulation (e.g. a plane in 3d). If `direction` is set to `NO-DIRECTION`, then `eig_kpoint` is not only the initial guess and the search direction of the **k** vectors, but is also taken to be the direction of the waveguide, allowing you to [launch modes in oblique ridge waveguides](Scheme_Tutorials/Eigenmode_Source.md#index-guided-modes-in-a-ridge-waveguide) (not perpendicular to the source plane). If `eig-match-freq?` is `false`, then the specific **k** vector of the desired mode is specified with `eig-kpoint` (in Meep units of 2π/(unit length)). By default, the **k** components in the plane of the source region are zero.  However, if the source region spans the *entire* cell in some directions, and the cell has Bloch-periodic boundary conditions via the `k-point` parameter, then the mode's **k** components in those directions will match `k-point` so that the mode satisfies the Meep boundary conditions, regardless of `eig-kpoint`. Note that once **k** is either found by MPB, or specified by `eig-kpoint`, the field profile used to create the current sources corresponds to the [Bloch mode](https://en.wikipedia.org/wiki/Bloch_wave), $\mathbf{u}_{n,\mathbf{k}}(\mathbf{r})$, multiplied by the appropriate exponential factor, $e^{i \mathbf{k} \cdot \mathbf{r}}$.
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-669-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-671-meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:672:The parity (= polarization in 2d) of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry *in the source region*, with respect to the `center` of the source region.  (In particular, it does not matter if your simulation as a whole has that symmetry, only the cross section where you are introducing the source.) If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `EVEN-Z + ODD-Y`. Default is `NO-PARITY`, in which case MPB computes all of the bands which will still be even or odd if the structure has mirror symmetry, of course. This is especially useful in 2d simulations to restrict yourself to a desired polarization.
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-673-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-735-meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:736:How many `width`s the current decays for before it is cut off and set to zero &mdash; this applies for both turn-on and turn-off of the pulse. Default is 5.0. A larger value of `cutoff` will reduce the amount of high-frequency components that are introduced by the start/stop of the source, but will of course lead to longer simulation times. The peak of the Gaussian is reached at the time $t_0$=`start-time + cutoff*width`.
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-737-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-864-meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:865:Given a `direction` constant, and a `meep::volume*`, returns the flux (the integral of $\Re [\mathbf{E}^* \times \mathbf{H}]$) in that volume. Most commonly, you specify a volume that is a plane or a line, and a direction perpendicular to it, e.g. `(flux-in-box `X (volume (center 0) (size 0 1 1)))`.
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-866-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-1001-```
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:1002:The flux object must be created using `add-mode-monitor`.  (You could also use `add-flux`, but with `add_flux` you need to be more careful about symmetries that bisect the flux plane: the `add-flux` object should only be used with `get-eigenmode-coefficients` for modes of the same symmetry, e.g. constrained via `eig_parity`.  On the other hand, the performance of `add-flux` planes benefits more from symmetry.) `eig-vol` is the volume passed to [MPB](https://mpb.readthedocs.io) for the eigenmode calculation (based on interpolating the discretized materials from the Yee grid); in most cases this will simply be the volume over which the frequency-domain fields are tabulated, which is the default (i.e. `(meep-dft-flux-where-get flux)`). `eig-parity` should be one of [`NO-PARITY` (default), `EVEN-Z`, `ODD-Z`, `EVEN-Y`, `ODD-Y`]. It is the parity (= polarization in 2d) of the mode to calculate, assuming the structure has $z$ and/or $y$ mirror symmetry *in the source region*, just as for `eigenmode-source` above. If the structure has both $y$ and $z$ mirror symmetry, you can combine more than one of these, e.g. `(+ EVEN-Z ODD-Y)`. Default is `NO-PARITY`, in which case MPB computes all of the bands which will still be even or odd if the structure has mirror symmetry, of course. This is especially useful in 2d simulations to restrict yourself to a desired polarization. `eig-resolution` is the spatial resolution to use in MPB for the eigenmode calculations. This defaults to the same resolution as Meep, but you can use a higher resolution in which case the structure is linearly interpolated from the Meep pixels. `eig-tolerance` is the tolerance to use in the MPB eigensolver. MPB terminates when the eigenvalues stop changing to less than this fractional tolerance. Defaults to `1e-12`.  (Note that this is the tolerance for the frequency eigenvalue ω; the tolerance for the mode profile is effectively the square root of this.)
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-1003-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-1089-
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:1090:Most commonly, you will want to **normalize** the force spectrum in some way, just as for flux spectra. Most simply, you could divide two different force spectra to compute the ratio of forces on two objects. Often, you will divide a force spectrum by a flux spectrum, to divide the force $F$ by the incident power $P$ on an object, in order to compute the useful dimensionless ratio $Fc$/$P$ where $c=1$ in Meep units. For example, it is a simple exercise to show that the force $F$ on a perfectly reflecting mirror with normal-incident power $P$ satisfies $Fc$/$P=2$, and for a perfectly absorbing (black) surface $Fc$/$P=1$.
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-1091-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-1364-
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:1365:It is often useful to use the `h5topng` `-C` or `-A` options to overlay the dielectric function when outputting fields. To do this, you need to know the name of the dielectric-function `.h5` file which must have been previously output by `output-epsilon`. To make this easier, a built-in shell variable `$EPS` is provided which refers to the last-output dielectric-function `.h5` file. So, for example `(output-png Ez "-C $EPS")` will output the $E_z$ field and overlay the dielectric contours.
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-1366-
##############################################
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-1388-meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md:1389:Returns a step function that collects data from the field component `c` (e.g. $E_x$, etc.) at the given point `pt` (a `vector3`). Then, at the end of the run, it uses Harminv to look for modes in the given frequency range (center `fcen` and width `df`), printing the results to standard output (prefixed by `harminv:`) as comma-delimited text, and also storing them to the variable `harminv-results`. The optional argument `maxbands` is the maximum number of modes to search for. Defaults to 100.
meep-openmpi-1.12.0/doc/docs/Scheme_User_Interface.md-1390-
##############################################
meep-openmpi-1.12.0/doc/docs/Subpixel_Smoothing.md-25-
meep-openmpi-1.12.0/doc/docs/Subpixel_Smoothing.md:26:where $\textbf{P}$ is the projection matrix $P_{ij}=n_{i}n_{j}$ onto the normal $\vec{n}$. The $\langle\cdots\rangle$ denotes an average over the voxel $sΔx\times sΔy\times sΔz$ surrounding the grid point in question where $s$ is a smoothing diameter in grid units equal to 1/`resolution`. If the initial materials are anisotropic (via `epsilon_diag` and `epsilon_offdiag`), a more complicated formula is used. They key point is that, even if the structure consists entirely of isotropic materials, the discretized structure will use anisotropic materials. For interface pixels, Meep computes the effective permittivity tensor automatically at the start of the simulation prior to time stepping via analytic expressions for the filling fraction and local normal vector. For details involving derivation of the effective permittivity tensor and its implementation in Meep/FDTD, see [Optics Letters, Vol. 36, pp. 2972-4, 2006](https://www.osapublishing.org/ol/abstract.cfm?uri=ol-31-20-2972) and [Optics Letters, Vol. 35, pp. 2778-80, 2009](https://www.osapublishing.org/abstract.cfm?uri=ol-34-18-2778).
meep-openmpi-1.12.0/doc/docs/Subpixel_Smoothing.md-27-
##############################################
meep-openmpi-1.12.0/doc/docs/Units_and_Nonlinearity.md-23-
meep-openmpi-1.12.0/doc/docs/Units_and_Nonlinearity.md:24:where $n_0$ is the linear refractive index $n_0=\sqrt{\varepsilon}$. See, for example, Section 4.1 of [Nonlinear Optics (third edition)](https://www.amazon.com/Nonlinear-Optics-Third-Robert-Boyd/dp/0123694701) by R. W. Boyd.
meep-openmpi-1.12.0/doc/docs/Units_and_Nonlinearity.md-25-
##############################################
meep-openmpi-1.12.0/m4/ax_compiler_vendor.m4-20-  for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do 
meep-openmpi-1.12.0/m4/ax_compiler_vendor.m4:21:    vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
meep-openmpi-1.12.0/m4/ax_compiler_vendor.m4-22-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
##############################################
meep-openmpi-1.12.0/m4/ax_compiler_vendor.m4-25-#endif
meep-openmpi-1.12.0/m4/ax_compiler_vendor.m4:26:])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
meep-openmpi-1.12.0/m4/ax_compiler_vendor.m4-27-  done
##############################################
meep-openmpi-1.12.0/m4/ax_gcc_archflag.m4-114-     AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/])
meep-openmpi-1.12.0/m4/ax_gcc_archflag.m4:115:     cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null`
meep-openmpi-1.12.0/m4/ax_gcc_archflag.m4:116:     cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters`
meep-openmpi-1.12.0/m4/ax_gcc_archflag.m4-117-     case $cputype in
##############################################
meep-openmpi-1.12.0/m4/ax_gcc_archflag.m4-138-     cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null`
meep-openmpi-1.12.0/m4/ax_gcc_archflag.m4:139:     cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'`
meep-openmpi-1.12.0/m4/ax_gcc_archflag.m4-140-     case $cputype in
##############################################
meep-openmpi-1.12.0/m4/pkg.m4-27-            AC_MSG_CHECKING($1_CFLAGS)
meep-openmpi-1.12.0/m4/pkg.m4:28:            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
meep-openmpi-1.12.0/m4/pkg.m4-29-            AC_MSG_RESULT($$1_CFLAGS)
##############################################
meep-openmpi-1.12.0/m4/pkg.m4-31-            AC_MSG_CHECKING($1_LIBS)
meep-openmpi-1.12.0/m4/pkg.m4:32:            $1_LIBS=`$PKG_CONFIG --libs "$2"`
meep-openmpi-1.12.0/m4/pkg.m4-33-            AC_MSG_RESULT($$1_LIBS)
##############################################
meep-openmpi-1.12.0/m4/pkg.m4-38-            ## do set a variable so people can do so.
meep-openmpi-1.12.0/m4/pkg.m4:39:            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
meep-openmpi-1.12.0/m4/pkg.m4-40-            ifelse([$4], ,echo $$1_PKG_ERRORS,)
##############################################
meep-openmpi-1.12.0/python/examples/antenna-radiation.ipynb-201-   "source": [
meep-openmpi-1.12.0/python/examples/antenna-radiation.ipynb:202:    "For the second of two cases, we use the `get_farfield` routine to compute the far fields by looping over a set of 100 equally-spaced points along the circumference of a circle with radius of 1 mm. The six far field components ($E_x$, $E_y$, $E_z$, $H_x$, $H_y$, $H_z$) are stored as separate arrays of complex numbers. From the far fields at each point $r$, we compute the outgoing or radial flux: $P^2_x+P^2_y$, where $P_x$ and $P_y$ are the components of the Poynting vector $P(r)=(P_x,P_y,P_z)=\\Re(E(r) \\times H(r))$. Note that $P_z$ is always 0 since this is a 2d simulation. The total flux is computed and the three flux values are displayed."
meep-openmpi-1.12.0/python/examples/antenna-radiation.ipynb-203-   ]
##############################################
meep-openmpi-1.12.0/python/examples/binary_grating.ipynb-294-   "source": [
meep-openmpi-1.12.0/python/examples/binary_grating.ipynb:295:    "Note the use of the keyword parameter argument `eig_parity=mp.ODD_Z+mp.EVEN_Y` in the call to `get_eigenmode_coefficients`. This is important for specifying **non-degenerate** modes in MPB since the `k_point` is (0,0,0). `ODD_Z` is for modes with E<sub>z</sub> polarization. `EVEN_Y` is necessary since each diffraction order which is based on a given k<sub>x</sub> consists of *two* modes: one going in the +y direction and the other in the -y direction. `EVEN_Y` forces MPB to compute only the +k<sub>y</sub> + -k<sub>y</sub> (cosine) mode. As a result, the total transmittance must be halved in this case to obtain the transmittance for the individual +k<sub>y</sub> or -k<sub>y</sub> mode. For `ODD_Y`, MPB will compute the +k<sub>y</sub> - -k<sub>y</sub> (sine) mode but this will have zero power because the source is even. If the $y$ parity is left out, MPB will return a random superposition of the cosine and sine modes. Alternatively, in this example an input planewave with H<sub>z</sub> instead of E<sub>z</sub> polarization can be used which requires `eig_parity=mp.EVEN_Z+mp.ODD_Y` as well as an odd mirror symmetry plane in *y*. Finally, note the use of `add_flux` instead of `add_mode_monitor` when using symmetries.\n",
meep-openmpi-1.12.0/python/examples/binary_grating.ipynb-296-    "\n",
##############################################
meep-openmpi-1.12.0/python/examples/binary_grating.ipynb-343-    "\n",
meep-openmpi-1.12.0/python/examples/binary_grating.ipynb:344:    "The diffraction orders/modes are a finite set of propagating planewaves. The wavevector $k_x$ of these modes can be computed analytically: for a frequency of $ω$ (in $c$=1 units), these propagating modes are the **real** solutions of sqrt(ω²n²-($k_y$+2π$m$/$Λ$)²) where $m$ is the diffraction order (an integer), $Λ$ is the periodicity of the grating, and $n$ is the refractive index of the propagating medium. In this example, $n$=1, $k_y$=0, and $Λ$=10 μm. Thus, at a wavelength of 0.5 μm there are a total of 20 diffraction orders of which we only computed the first 10. The wavevector $k_x$ is used to compute the angle of the diffraction order as cos<sup>-1</sup>($k_x$/($ωn$)). Evanescent modes, those with an imaginary k<sub>x</sub>, exist for |$m$|>20 but these modes carry no power. Note that currently Meep does not compute the number of propagating modes for you. If the mode number passed to `get_eigenmode_coefficients` is larger than the number of propagating modes at a given frequency/wavelength, MPB's Newton solver will fail to converge and will return zero for the mode\\ coefficient. It is therefore a good idea to know beforehand the number of propagating modes.\n",
meep-openmpi-1.12.0/python/examples/binary_grating.ipynb-345-    "\n",
##############################################
meep-openmpi-1.12.0/python/examples/coupler.ipynb-1010-   "source": [
meep-openmpi-1.12.0/python/examples/coupler.ipynb:1011:    "For a given waveguide separation distance (`d`), the simulation computes the transmittance of Ports 2, 3, and 4. The transmittance is the square of the [S-parameter](https://en.wikipedia.org/wiki/Scattering_parameters) which is equivalent to the [mode coefficient](https://meep.readthedocs.io/en/latest/Mode_Decomposition). There is an additional mode monitor at Port 1 to compute the input power from the adjacent eigenmode source; this is used for normalization when computing the transmittance. The eight layers of the GDSII file are each converted to a `Simulation` object: the upper and lower branches of the coupler are defined as a collection of [`Prism`](https://meep.readthedocs.io/en/latest/Python_User_Interface/#prism)s, the rectilinear regions of the source and flux monitor as a [`Volume`](https://meep.readthedocs.io/en/latest/Python_User_Interface/#volume) and [`FluxRegion`](https://meep.readthedocs.io/en/latest/Python_User_Interface/#fluxregion). The size of the cell in the $y$ direction is dependent on `d`. The default dimensionality is 2d. An optional input parameter (`three_d`) converts the geometry to 3d by extruding the coupler geometry in the *z* direction and adding an oxide layer beneath similar to a [silicon on insulator](https://en.wikipedia.org/wiki/Silicon_on_insulator) (SOI) substrate. A schematic of the coupler design in 3d generated using MayaVi is shown below.\n",
meep-openmpi-1.12.0/python/examples/coupler.ipynb-1012-    "\n",
##############################################
meep-openmpi-1.12.0/python/examples/holey-wvg-bands.ipynb-10-    "\n",
meep-openmpi-1.12.0/python/examples/holey-wvg-bands.ipynb:11:    "Let us briefly review the problem. In a periodic system of this sort, the eigen-solutions can be expressed in the form of Bloch modes: a periodic Bloch envelope multiplied by a planewave $exp[i(k⋅x−\\omega t)]$, where $k$ is the Bloch wavevector. We wish to find the bands $\\omega(k)$. In this case, there is only one direction of periodicity, so we only have one wavevector component $k_x$. Moreover, the solutions are periodic functions of this wavevector: for a unit-period structure, $k_x$ and $k_x+2\\pi$ are redundant. Also, $k_x$ and $−k_x$ are redundant by time-reversal symmetry, so we only need to look for solutions in the irreducible Brillouin zone from $k_x=0$ to $k_x=\\pi$.\n",
meep-openmpi-1.12.0/python/examples/holey-wvg-bands.ipynb-12-    "\n",
##############################################
meep-openmpi-1.12.0/python/examples/metal-cavity-ldos.ipynb-18-    "\n",
meep-openmpi-1.12.0/python/examples/metal-cavity-ldos.ipynb:19:    "where $Q^{(n)}=\\omega^{(n)}/2\\gamma^{(n)}$ is the dimensionless [quality factor](https://en.wikipedia.org/wiki/Q_factor) and $V^{(n)}$ is the modal volume. This represents another way to compute the LDOS. In this tutorial, we will verify this expression by comparing it to the earlier one.\n",
meep-openmpi-1.12.0/python/examples/metal-cavity-ldos.ipynb-20-    "\n",
##############################################
meep-openmpi-1.12.0/python/examples/metal-cavity-ldos.ipynb-22-    "\n",
meep-openmpi-1.12.0/python/examples/metal-cavity-ldos.ipynb:23:    "We will validate both this prediction and the LDOS calculations above by computing the LDOS at the center of the cavity, the point of peak $|\\vec{E}|$, in two ways. First, we compute the LDOS directly from the power radiated by a dipole, Fourier-transforming the result of a pulse using the `dft_ldos` command. Second, we compute the cavity mode and its lifetime $Q$ using `Harminv` and then compute the LDOS by the Purcell formula shown above. The latter technique is much more efficient for high Q (small $w$), since one must run the simulation for a very long time to directly accumulate the Fourier transform of a slowly-decaying mode. The two calculations, we will demonstrate, agree to within discretization error, verifying the LDOS analysis above, and $Q/V$ is asymptotically linear on a semilog scale versus $1/w$ as predicted."
meep-openmpi-1.12.0/python/examples/metal-cavity-ldos.ipynb-24-   ]
##############################################
meep-openmpi-1.12.0/python/examples/oblique-planewave.ipynb-229-   "source": [
meep-openmpi-1.12.0/python/examples/oblique-planewave.ipynb:230:    "Note that this example involves a `ContinuousSource` for the time profile. For a pulsed source, the oblique planewave is incident at a given angle for only a *single* frequency component of the source. This is a fundamental feature of FDTD simulations and not of Meep per se. Thus, to simulate an incident planewave at multiple angles for a given frequency ω, you will need to do separate simulations involving different values of $\\vec{k}$ (`k_point`) since each set of ($\\vec{k}$,ω) specifying the Bloch-periodic boundaries and the frequency of the source will produce a different angle of the planewave. For more details, refer to Section 4.5 (\"Efficient Frequency-Angle Coverage\") in [Chapter 4](https://arxiv.org/abs/1301.5366) (\"Electromagnetic Wave Source Conditions\") of [Advances in FDTD Computational Electrodynamics: Photonics and Nanotechnology](https://www.amazon.com/Advances-FDTD-Computational-Electrodynamics-Nanotechnology/dp/1608071707)."
meep-openmpi-1.12.0/python/examples/oblique-planewave.ipynb-231-   ]
##############################################
meep-openmpi-1.12.0/python/examples/parallel-wvgs-force.ipynb-127-   "source": [
meep-openmpi-1.12.0/python/examples/parallel-wvgs-force.ipynb:128:    "There are two important items to note in `parallel_waveguide`: (1) a single flux surface is used to compute the Poynting flux in $z$ which spans an area slightly larger than both waveguides rather than two separate flux surfaces (one for each waveguide). This is because in the limit of small separation, two flux surfaces overlap whereas the total power through a single flux surface need, by symmetry, only be halved in order to determine the value for just one of the two waveguides. (2) Instead of defining a closed, four-sided \"box\" surrounding the waveguides, the MST is computed along just two $y$-oriented lines (to obtain the force in the $x$ direction) with different `weight` values to correctly sum the total force. By symmetry, the force in the $y$ direction is zero and need not be computed. Choosing a suitable runtime requires some care. A large runtime is necessary to obtain the steady-state response but this will also lead to large values for the discrete Fourier-transformed fields used to compute both the flux and the MST. Large floating-point numbers may contain [roundoff errors](https://en.wikipedia.org/wiki/Round-off_error).\n",
meep-openmpi-1.12.0/python/examples/parallel-wvgs-force.ipynb-129-    "\n",
##############################################
meep-openmpi-1.12.0/python/examples/ring.ipynb-67-   "source": [
meep-openmpi-1.12.0/python/examples/ring.ipynb:68:    "Later objects in the `geometry` object take precedence over or rather lie \"on top of\" earlier objects, so the second `air` ($\\epsilon$=1) cylinder cuts a circular hole out of the larger cylinder, leaving a ring of width `w`.\n",
meep-openmpi-1.12.0/python/examples/ring.ipynb-69-    "\n",