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.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.