legume.GuidedModeExp.set_run_options¶
-
GuidedModeExp.
set_run_options
(gmode_compute='exact', gmode_inds: list = [0], gmode_npts: int = 1000, gmode_step: float = 0.01, gmode_tol: float = 1e-10, numeig: int = 10, compute_im: bool = True, gradients='exact', eig_solver='eigh', eig_sigma: float = 0.0, eps_eff='average', verbose: bool = True)¶ Set multiple options for the guided-mode expansion.
Parameters: - gmode_compute ({'exact', 'interp'}, optional) – Define whether the guided modes are computed exactly at every k-step (‘exact’), or computed in the beginning and then interpolated (‘interp’).
- gmode_inds (list or np.ndarray, optional) – Indexes of modes to be included in the expansion. Default is [0].
- gmode_npts (int, optional) – Number of points over which guided modes are computed. Default is 1000.
- gmode_step (float, optional) – Step in frequency in the search for guided mode solutions. Default is 1e-2.
- gmode_tol (float, optional) – Tolerance in the minimum and maximum frequency value when looking for the guided-mode solutions. Default is 1e-10.
- numeig (int, optional) – Number of eigen-frequencies to be stored (starting from lowest). Default is 10.
- compute_im (bool, optional) – Should the imaginary parts of the frequencies also be computed. Default is True.
- gradients ({'exact', 'approx'}, optional) – Whether to compute ‘exact’ gradients, or ‘approx’ (faster).
- eig_solver ({'eigh', 'eigsh'}, optional) – Eigenvalue solver, ‘eigh’ (numpy.linalg.eigh) or ‘eigsh’ (scipy.sparse.linalg.eigsh)
- eig_sigma (float, optional) – Target eigenvalue; numeig eigenvalues closest to eig_sigma are stored. Default is 0.
- eps_eff ({'average', 'background'}, optional) – Using the ‘average’ or the ‘background’ permittivity of the layers in the guided mode computation.
- verbose (bool, optional) – Print information at intermmediate steps. Default is True.