tidy3d.EMEPeriodicitySweep#
- class EMEPeriodicitySweep[source]#
Bases:
EMESweepSpecSpec for sweeping number of repetitions of EME subgrids.
- Parameters:
num_reps (list[dict[str, PositiveInt]]) – Number of periodic repetitions of named subgrids in this EME grid. At each sweep index, contains a dict mapping the name of a subgrid to the number of repetitions of that subgrid at that sweep index.
Notes
Useful for simulating long periodic structures like Bragg gratings, as it allows the EME solver to reuse the modes and cell interface scattering matrices.
Compared to setting
num_repsdirectly in theeme_grid_spec, this sweep spec allows varying the number of repetitions, effectively simulating multiple structures in a single EME simulation.For bent EME cells, this reuse remains valid only if the local mode problem is unchanged in each repeated copy. Bent anisotropic cells are therefore rejected when the reused mode would see a different tensor orientation in another copy, and bent custom media are only supported when no global-frame remapping of custom data is required.
Example
>>> n_list = [1, 50, 100] >>> sweep_spec = EMEPeriodicitySweep(num_reps=[{"unit_cell": n} for n in n_list])
Attributes
- num_reps#
- property num_sweep#
Number of sweep indices.