tidy3d.EMEUniformGrid#
- class EMEUniformGrid[source]#
Bases:
EMEGridSpecSpecification for a uniform EME grid.
- Parameters:
num_reps (PositiveInt = 1) – Number of periodic repetitions of this EME grid. Useful for efficiently simulating long periodic structures like Bragg gratings. Instead of explicitly repeating the cells, setting ‘num_reps’ allows the EME solver to reuse the modes and cell interface scattering matrices.
name (Optional[str] = None) – Name of this ‘EMEGridSpec’. Used in ‘EMEPeriodicitySweep’.
num_cells (PositiveInt) – Number of cells in the uniform EME grid.
mode_spec (
EMEModeSpec) – Mode specification for the uniform EME grid.
Example
>>> from tidy3d import EMEModeSpec >>> mode_spec = EMEModeSpec(num_modes=10) >>> eme_grid = EMEUniformGrid(num_cells=10, mode_spec=mode_spec)
Attributes
Number of real cells in this EME grid spec.
num_repsnameMethods
make_grid(center, size, axis)Generate EME grid from the EME grid spec.
- num_cells#
- mode_spec#
- make_grid(center, size, axis)[source]#
Generate EME grid from the EME grid spec.
- Parameters:
center (
Coordinate) – Center of the EME simulation.size (
Size) – Size of the EME simulation.axis (
Literal[0, 1, 2]) – Propagation axis for the EME simulation.
- Returns:
An EME grid dividing the EME simulation into cells, as defined by the EME grid spec.
- Return type:
- property num_real_cells#
Number of real cells in this EME grid spec.